text
stringlengths
184
4.48M
# When you run this get_data.py, you have to wait for 30min to scrape social media post comments based on the realtime weibo data prestored in the data folder. # If you do not want to wait, do not run this file and go directly to clean_features.py to process data import pandas as pd import os from utils.weibo_comment_...
package practice; import java.util.Stack; public class CheckParenthesisProblem { public static void main(String[] args) { String str="{[(())]"; if(isParenthesis(str)){ System.out.println("true"); } else { System.out.println("false"); } /* Stack<Character> stack=new Stack<Character>(); ...
<?php namespace JDEV; /** * Class RTEConfig * * @package JDEV */ class RTEConfig { public function __construct() { add_filter('mce_css', [$this, 'unloadDefaultStyles']); add_filter('mce_external_plugins', [$this, 'registerExternalPlugins']); add_filter('acf/fields/wysiwyg/toolbars', [$this, 'configureBasi...
// // UsersViewModel.swift // iOS Test Assessment // // Created by Shabbir Ahmad on 03/05/24. // import Foundation class UsersViewModel : ObservableObject { //MARK: - Properties @Published var users : [User] = [] var pageLimit = 10 var page : Int = 1 var limitExceed = false init()...
# 扩展方法 ```C# public static Vector3 ToVector3(this Vector4 vec4) { return new Vector3(vec4.x, vec4.y, vec4.z); } // static void Main() { Vector4 vec4; Vector3 vec3 = vec4.ToVector3(); } ``` # 运算符重载 > CRE:有些C++能重载的运算符在C#是不能重载或者受限的。 > 能重载的一元运算符:`+`、`-`、`!`、`~`、`++`、`--`、`True`、`False` ...
"""q_learning_agents.py Author: Rei Armenia, Matthew James Harrison Class: CSI-480 AI Assignment: MDPs and Reinforcement Learning Programming Assignment Due Date: November 1, 2017 Description: Pacman seeks reward. Should he eat or should he run? When in doubt, Q-learn. Certification of Authenticity: I certify that t...
# Text Alchemy Text Alchemy App is a mobile application developed with Flutter. This application uses Google ML Kit to identify text in images taken from the gallery or camera. Users can capture images or select images from their device's gallery, and the application then identifies the text in the image and presents ...
import anndata import diffrax import equinox as eqx import jax import jax.numpy as jnp import optax from diffrax import diffeqsolve, Euler, Dopri8, Tsit5 from jax import random, grad, jit from joblib import Parallel, delayed from tqdm import tqdm import numpy as np import warnings warnings.filterwarnings('ignore') fr...
using Atilim.Services.Identity.Application.Dtos.LessonDtos; using Atilim.Services.Identity.Application.Interfaces.StudentInterfaces; using Atilim.Shared.Dtos; using AutoMapper; using MediatR; namespace Atilim.Services.Identity.Application.Features.Queries.LessonQueries { public class GetLessonByIdQuery : IRequest...
from fastapi import FastAPI, HTTPException, Request from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse from exceptions import StoryException from routers import blog_get, blog_post, user, article, product, file, dependencies from auth import authentication from templates import templates from d...
/** * FlexSpy 1.4-beta * * <p>Code released under WTFPL [http://sam.zoy.org/wtfpl/]</p> * @author Arnaud Pichery [http://coderpeon.ovh.org] * @author Frédéric Thomas */ package com.flexspy { import com.flexspy.impl.ComponentTreeWnd; import flash.display.DisplayObject; import flash.events.KeyboardEvent; import f...
require "random_data" 5.times do User.create!( name: RandomData.random_name, email: RandomData.random_email, password: RandomData.random_sentence ) end users = User.all 15.times do Topic.create!( name: RandomData.random_sentence, description: RandomData.random_paragraph ) end topics = Topic.all 50.t...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateTicketsTable extends Migration { /** * Run the migrations. * * @return void */ public function up(): void { Schema::create('tickets',...
import tensorflow as tf from tensorflow import keras from matplotlib import pyplot as plt import numpy as np import argparse import os from transfer_learning import load_model import random import sys sys.path.insert(1, 'path/to/TFRecord/') from reading_with_ParseFromString import count_total_num_samples BATCH_SIZE ...
import os # Function to display the banner def display_banner(): print("======TO DO LIST======") # Function to add a new task def add_new_task(): os.system('cls' if os.name == 'nt' else 'clear') display_banner() task = input("Enter your new task: ") save = input("Save? (y/n): ") if save.lower(...
// // NetworkManager.swift // GetOutfit // // Created by Алёна Максимова on 07.04.2022. // import Foundation protocol OccasionManagerDelegate { func didUpdateWeather(_ occasionManager: OccasionManager, occasion: OccasionModel) func didFailWithError(error: Error) } struct OccasionManager { // spb...
// // SignUpViewController.swift // BEERLY // // Created by Zhansuluu Kydyrova on 14/7/23. // import UIKit import SnapKit class SignUpViewController: UIViewController { var presentor: SignUpPresentorDelegate? private var phoneNumber: String? private var isPasswordHidden = true init(p...
import * as axios from "axios"; import * as qs from "qs"; import { getSession } from './localstorage'; export default class Api { constructor() { this.api_url = 'https://api.cabanesdev.tk'; const token = getSession(); if (token) { this.headers = { 'bearer-token': getSession(), }; ...
const { createClient } = supabase const _supabase = createClient('https://pfwnyxmmxgydkohyqrto.supabase.co', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBmd255eG1teGd5ZGtvaHlxcnRvIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTk3MTg5NjMsImV4cCI6MjAxNTI5NDk2M30.v--PqHL9B8GMFNNW-bp-mMcr7p30V_5hKXVUSRTBG...
package com.atifzia.bikerental.models; import java.util.Set; import com.atifzia.bikerental.enums.Role; import jakarta.persistence.*; import lombok.*; @Entity @Getter @Setter @Builder @AllArgsConstructor @NoArgsConstructor @Table(name = "users") public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO)...
/* * Copyright (c) 2023. Selldone® Business OS™ * * Author: M.Pajuhaan * Web: https://selldone.com * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ * * All rights reserved. In the weave of time, where traditions and innovations intermingle, this content was crafted. * From the essence of thought, throug...
function snf=snirfcreate(varargin) % % snf=snirfcreate % or % snf=snirfcreate(option) % snf=snirfcreate('Format',format,'Param1',value1, 'Param2',value2,...) % % Create a empty SNIRF data structure defined in the SNIRF % specification: https://github.com/fNIRS/snirf % % author: Qianqian Fang (q...
package monster; import java.util.Random; import entity.Entity; import main.GamePanel; import object.OBJ_Coin_Bronze; import object.OBJ_Heart; import object.OBJ_SpellSlot; public class MON_Mimic extends Entity{ GamePanel gp; public MON_Mimic(GamePanel gp) { super(gp); this.gp = gp; type = type_obstacle...
#include "stm32_unict_lib.h" #include <stdio.h> typedef enum { st_OFF, st_ON } t_state; t_state current_state; int pb_X_event; int timer; void setup(void) { DISPLAY_init(); GPIO_init(GPIOC); GPIO_config_output(GPIOC, 2); GPIO_init(GPIOB); GPIO_config_output(GPIOB, 0); GPIO_config_input(GPIOB,10); GPIO_c...
package kr.ac.kopo.webapplication.controller; import kr.ac.kopo.webapplication.dto.SampleDTO; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.spri...
import { Body, Controller, Delete, Get, Inject, NotFoundException, Param, Post, Put, UseGuards, forwardRef } from '@nestjs/common'; import { UserService } from './user.service'; import { User } from './user.entity'; import { UserDto } from './user.dto'; import { JwtAuthGuard } from 'src/auth/jwt-auth.guard'; @Controll...
import logging from django.shortcuts import render, redirect from django.conf import settings from django.contrib.auth import login, logout, authenticate from django.contrib.auth.hashers import make_password from django.core.paginator import Paginator, InvalidPage, EmptyPage, PageNotAnInteger from django.db.models impo...
import { DataSource } from 'typeorm'; import { config } from 'dotenv'; config({ path: '.env.dev' }); const connectionOptions = { host: process.env.DATABASE_HOST, port: Number(process.env.DATABASE_PORT), username: process.env.DATABASE_USER, password: process.env.DATABASE_PASS, database: process.env.DATABASE_...
import { SlashCommandBuilder } from 'discord.js'; import { TicTacToe } from 'discord-gamecord'; import { handleGameEnd } from "../../Utils/money.js"; export default { data: new SlashCommandBuilder().setName('tictactoe').setDescription('Spiele TicTacToe').setDMPermission(false) .addUserOption((option) => option...
/* This file or code within this file was originally part of Qt Creator. Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com> Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). Copyright (c) 2009 Bertjan Broeksema <b.broeksema@kdemail.net> GNU Lesser General Public License Usage ...
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Barang extends Model { use HasFactory; protected $fillable = ['id_satuan', 'id_unit', 'kode_barang', 'jenis_barang', 'nama_barang', 'posisi_pi', 'tgl_beli', 'umur_ekonomis', 'harg...
package DynamicProgramming; public class LongestCommonSubsequence { public static void main(String[] args) { String[] X = { "E", "B", "T", "B", "C", "A", "D", "F" }; String[] Y = { "A", "B", "B", "C", "D", "6", "F" }; /** * Brute force recursion method * Find all the subs...
import { Service, Inject } from 'typedi'; import jwt from 'jsonwebtoken'; import config from '../config'; import argon2 from 'argon2'; import { IUser } from '../interfaces/IUser'; import { UserRepository } from '../repository/userRepository'; @Service() export default class AuthService { constructor( private u...
#!/usr/local/bin/Rscript # This Rscript generates a spatial points video of either AOD or DQF over a # single CONUS state. The timelapse covers a single hour at ~5 minute intervals. # # Test this script from the command line with: # # ./createSpatialPointsVideo_exec.R --datetime="2019-10-29" # -s CA -x AOD -q 3 -r 2 ...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classes from './Person.css'; import withClass from '../../../hoc/withClass'; import Aux from '../../../hoc/Aux'; class Person extends Component { constructor(props) { // Inside here, can access props.XY // call super to ove...
import React, { useState, useEffect } from 'react'; import { useNavigate, useLocation } from 'react-router-dom'; const Spinner = ({path='login'}) => { const navigate = useNavigate(); const [counter, setCounter] = useState(5); const location = useLocation() useEffect(() => { const timer = setTimeout(() => ...
The bug in the provided Java code is in the for loop condition of the `isStrictlyPalindromic` method. Currently, the for loop runs from `2` to `n - 1`. However, it should run from `2` to `n` in order to include `n` as one of the bases for converting `n` to a string. To fix this bug, we need to modify the for loop c...
import { Faction } from './faction.ts' import { BaseOfOperations } from './baseOfOperations.ts' import supabaseClient from '../superbaseClient.ts' import useSystemError from '../stores/systemError.ts' import { SpecOps } from './specOps.ts' export interface Dataslate { id: number userId: string teamName: string ...
--- sidebar_position: 3 title: Cache --- # Render Cache Sometimes we cache computation results, such as with the React useMemo, useCallback Hook. By caching, we can reduce the number of computations, thus reducing CPU resource usage and enhancing the user experience. Caching the results of server-side rendering (SSR...
use super::Solution; use super::TreeNode; use std::{cell::RefCell, rc::Rc}; type Node = Option<std::rc::Rc<std::cell::RefCell<super::TreeNode>>>; struct Solution0 {} impl Solution for Solution0 { fn sorted_array_to_bst(nums: Vec<i32>) -> Node { Problem::from(&nums).divide() } } struct Problem<'a> { ...
package hindsight import ( "bytes" "crypto/rand" "encoding/base64" "fmt" "io/ioutil" "github.com/BurntSushi/toml" ) type Config struct { ListenIngestion string // host:port for API - should not be public ListenUI string // host:port for UI - could be exposed to internet DatabasePath string // path...
import React from "react"; import styles from "../css/Card.module.css"; import { Link } from "react-router-dom"; const Card = ({ image, name, id, weight, height, type }) => { return ( <Link to={`/${id}`} className={styles.cardLink}> <div className={styles.card}> <img src={image} alt="pokemon" /> ...
import React from "react"; import ChildCard from "./ChildCard"; import "./Childrens.css"; export default function Childrens() { const [books, setBooks] = React.useState([]); React.useEffect(() => { fetch("http://localhost:5000/allbook") .then((r) => r.json()) .then(setBooks); }, []); const fi...
import { verify } from "jsonwebtoken"; import { isValidObjectId } from "mongoose"; import { NextFunction, Response } from "express"; import { RequestWithAuthenticatedTutor, RequestWithAuthenticatedStudent, } from "../interface/auth.interface"; export const authenticateStudentToken = ( req: RequestWithAuthe...
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <c:url var='root' value='/' /> <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8">...
<!DOCTYPE html> <html lang="ru"> <head> <meta charset="utf-8"> <title>HTML Academy: Нёрдс</title> <link rel="stylesheet" href="css/normalize.min.css"> <link rel="stylesheet" href="css/style.min.css"> </head> <body> <h1 class="visually-hidden">Дизайн-студия Nerds</h1> <header class="header...
<!-- 提现教程 --> <template> <div class="flex flex-col h-full overflow-hidden tlw_top_bg" :style="{ paddingTop: `${top || 0}px` }" > <NavBar class="flex-shrink-0" transparent :nav-bar-props="{ title: '提现教程' }"> <template #right> <i class="z-10 text-white ml-2 icon...
import React, { useState } from 'react'; import './index.css' const CadastroMedico = () => { const estadosBrasileiros = [ 'AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MT', 'MS', 'MG', 'PA', 'PB', 'PR', 'PE', 'PI', 'RJ', 'RN', 'RS', 'RO', 'RR', 'SC', 'SP', 'SE', 'TO' ]; const [medic...
<div class="card mb-4"> <div class="card-header"><i class="fas fa-table mr-1"></i>Table 4://Add eNodeB Function (ADD ENODEBFUNCTION) </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> ...
import { Box, CircularProgress, Typography } from '@mui/material'; import { useDispatch, useSelector } from 'react-redux'; import { fetchDashboard, selectorDashboard, } from 'src/features/dashboard/dashboard-slice'; import { useEffect, useState } from 'react'; import { BorderLinearProgress } from './borderLinearSty...
<!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>{% block title %}Document{% endblock %}</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/...
using Dapper; using Microsoft.AspNetCore.Mvc; using Microsoft.Data.SqlClient; namespace API_piment.Controllers { [Route("api/[controller]")] [ApiController] public class UserController : ControllerBase { #region DI private readonly SqlConnection? _conn = null; private readon...
import classNames from 'classnames'; import React, { FC } from 'react'; import { Filter } from '../types/Filters'; type Props = { uncomplitedTodosCount: number complitedFilter: Filter setComplitedFilter: (v: Filter) => void deleteAllCompletetById:()=>void }; export const Footer: FC<Props> = React.memo((props)...
// 1) Selecionar todas as tags h2 e colocar um background verde nos elementos selecionados. // 2) Selecionar o pai da classe buttons e colocar um background vermelho no elemento selecionado. // 3) Selecionar os elementos filhos da classe module e colocar como background a cor azul. // 4) Selecionar o item da lista de í...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { Route } from './app.constants'; import { CartComponent } from './pages/cart/cart.component'; import { ConfirmationComponent } from './pages/confirmation/confirmation.component'; import { ProductItemDetailsComponen...
import React, { useEffect,useState } from "react" import "./Header.css" import { Link, useNavigate } from "react-router-dom" import { useSelector, useDispatch } from "react-redux" import Profile from "./Profile" import { unSetUserToken } from '../../features/authSlice' import { removeToken } from '../../services/LocalS...
import { ref, computed, watch } from 'vue'; import { wrapToPromise } from '~/api/helpers/wrap-to-promise'; import { useGetApiV1Bookfile, useGetApiV1BookId, useGetApiV1BookIdOverview, usePutApiV1BookMonitor, } from '~/thirdPartyApis/readarr'; import type { BookFileResource, BookResource, SearchResource, } ...
package com.PAM.kantinkoperasi.adapter import android.app.Activity import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.CheckBox import android.widget.ImageView import android.widget.TextView import androidx.cardview.widget.CardView import androidx.recyclervie...
This document outlines the design and internals of pydecnet. Rev 0.0, 4/23/2019 General structure The overall structure (modules, layers, threads) of pydecnet closely resembles the component layering used as a descriptive technique in the DECNET Architecture (DNA) documents, particularly the Phase IV documents. The...
require "rails_helper" RSpec.describe Client do let(:card_number) { '1234567812345678' } let(:last_four) { '5678' } let(:less_than_four_digits_card_number) { '159' } let(:less_than_four_digits_last_four) { '159' } let(:sample_client) { Fabricate(:client) } let(:credit_card1) { Fabricate(:credit_card) } ...
import React, { useMemo, useContext } from 'react'; import { useForm, UseForm } from '../../../../hooks'; import { ColorScheme, DeviceType } from '../../../../context'; import { ActionButton, FloatingButton, IconButton } from '../../actions'; import { Response } from '../../feedback'; import { Form, TextInput, Checkbox...
<?php namespace App\Database; use Phinx\Seed\AbstractSeed; use Illuminate\Database\Capsule\Manager; use Doctrine\DBAL\Types\{StringType, Type}; abstract class Seeder extends AbstractSeed { /** @var \Illuminate\Database\Capsule\Manager $capsule */ public $capsule; /** @var \Illuminate\Database\Schema\Builder $c...
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Patient Registration</title> <!-- google fonts --> <link href="https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Josefin+Sans:ital,wght@1,30...
from django.test import TestCase from rest_framework.test import APIRequestFactory, force_authenticate from django.contrib.auth.models import User from Manager.models import Tasks from Manager.serializer import TaskSerializer, UserSerializer from Manager.views import TaskDetail from rest_framework.authtoken.models impo...
<!doctype html> <html> <head> <meta charset="utf-8" /> <title> Gamepadible </title> <meta name="description" content="" /> <meta name="author" content="Brian Blakely, Analogy Software & Entertainment" /> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, us...
import '/auth/firebase_auth/auth_util.dart'; import '/backend/backend.dart'; import '/flutter_flow/flutter_flow_icon_button.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import '/flutter_flow/custom_functions.dart'...
Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays. Note: You can return the array with its elements in any order. Solution: function diffArray(arr1, arr2){ const newArr = []; function...
! err763_palette_bug.jnl ! See PyFerret issue 98 ! Ansley Manke 11/11/2021 ! ! Set a color palette with /PALETTE in combination with /SET. The default palette ! not restored before making the next plot. ! Define an example 2D variable to plot let var = i[i=1:5] + j[j=1:5] ! This is correct: ! After a /palette setti...
import { useEffect, useState } from 'react'; export const useWindowSize = () => { const [windowSize, setWindowSize] = useState<{ width: number; height: number }>({ width: 640, height: 480, }); useEffect(() => { if (typeof window !== 'undefined') { const handleResize = ()...
<nav class="navbar navbar-default"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> ...
import 'package:flutter/material.dart'; Widget myDrowerUser({ required Function(int index, String tittel) onItemTapped, required double widthScreen, required String name, }) { return Drawer( width: widthScreen * .535, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.zero,...
package com.example.homework5 import android.content.Intent import android.os.Bundle import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import com.example.homework5.databinding.ActivityMain3Binding import com.google.firebase.auth.FirebaseAuth class MainActivity_3 : AppCompatActivity() { ...
import sqlite3 import pandas as pd from difflib import SequenceMatcher import numpy as np import math class president_converter: def __init__(self, conn): self.conn = conn # upload input df format of data to db as a Table # if same name exists in the db. Replace it. def upload_df_to_database...
import userEvent from '@testing-library/user-event' import { render, screen } from '@testing-library/vue' import InputAccount from './InputAccount.vue' const user = userEvent.setup() test('fieldset のアクセシブルネームは、legend を引用している', () => { render(InputAccount) expect(screen.getByRole('group', { name: 'アカウント情報の入力' }))...
package main import ( "fmt" "os" ) func main() { key := "DB_CONN" defValue := `postgres://as:name@example.com/pg? sslmode=verify-full` conn, err := SetEnv(key, defValue) if err != nil { fmt.Println(err) } else { fmt.Println("Set connection:", conn) } connStr := os.Getenv(key) fmt.Printf("Connection str...
import React from 'react'; import { Box, Button, Flex, Image, Link, Spacer } from '@chakra-ui/react'; import Instagram from "./assets/social-media-icons/insta_32x32.png"; import Twitter from "./assets/social-media-icons/twitter_32x32.png"; import Email from "./assets/social-media-icons/email_32x32.png"; const NavBar =...
<article class="table-header"> <div> <h2 style="display:inline;" *ngIf="!viewMode">Prepare meal below:</h2> <h2 style="display:inline;" *ngIf="viewMode">Items in the prepared Menu:</h2> </div> <div *ngIf="!viewMode"> <button class="button-add-row" mat-raised-button (click)="addFromSaved()"> Add ...
package com.switchfully.digibooky.user.service; import com.switchfully.digibooky.user.domain.Member; import com.switchfully.digibooky.user.domain.userAttribute.Address; import com.switchfully.digibooky.user.service.dto.member.CreateMemberDto; import com.switchfully.digibooky.user.service.dto.member.MemberDto; import o...
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\Store; class StoreController extends Controller { public function store(Request $request) { $request->validate([ 'name' => 'required', 'address' => 'required', 'active' => 'required|b...
/* Copyright (c) 2017 FIRST. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted (subject to the limitations in the disclaimer below) provided that * the following conditions are met: * * Redistributions of source code must retain the above cop...
<template> <div class="register-container"> <!-- 注冊內容 --> <div class="register"> <h3>注冊新用戶 <span class="go">我有賬號,去 <a href="login.html" target="_blank">登陸</a> </span> </h3> <div class="content"> <label>手機號:</label> <!--name:要驗證的是哪一項 v-validate是否必須,驗證規則...
import mongoose from "mongoose"; import { destroyFromCloudinary } from "../utils/cloudinary.utils.js"; const commentSchema = mongoose.Schema({ text: { type: String, maxLength: [100, "length cannot exceed 100 characters"], default: "" }, media: { type: String, default...
<template> <v-container grid-list-xs class="fontPrompt" v-if="!$store.state.loadingPage"> <v-row class="mt-10"> <v-spacer></v-spacer> <h1>ประกาศเกี่ยวกับ IT และซ่อมบำรุง</h1> <v-spacer></v-spacer> </v-row> <v-row v-if=" $store.getters.policyCode === '03' || $store.getters....
/* eslint-disable react-hooks/exhaustive-deps */ import { useEffect, useState, memo, useRef } from "react"; import logo_desktop from "../../assets/logo.png"; import logo_mobile from "../../assets/logo-mobile.png"; import { Button, Login, Notification, SearchResult } from "../../components"; import { Link, NavLink, useN...
from django.contrib import admin from . models import Client, Product, Order # @admin.action(description="Добавить скидку 15%") # def add_discount(modeladmin, request, queryset): # queryset.update(price=queryset.price * 0.85) class ProductAdmin(admin.ModelAdmin): list_display = ['name', 'price', 'amount'] ...
class Animal { action() { console.log('animal running'); } } class Dog extends Animal { action() { console.log('dog running'); } } class Fish extends Animal { action() { console.log('fish swimming'); } } // 多态的目的是为了写出更具备通用性的代码 // 父类引用指向子类对象 function makeActions(animals: Animal[]) { animals....
package com.zszuev.bookshelfsber.controllers; import com.fasterxml.jackson.databind.ObjectMapper; import com.zszuev.bookshelfsber.entities.Author; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.b...
import { addressWithMidEll, checkPrivateKey, isNumber, numberFormatter, timeSince, } from '../utils' describe('utils testing', () => { it('Should check private key of wallet', () => { expect(checkPrivateKey('mykeywrongforat')).toBe(false) expect( checkPrivateKey( ...
require 'rails_helper' describe 'GET /articles/:article_id/comments', type: :request, comments: true, list: true do describe 'when user is non admin' do let(:user) { create(:user) } let(:article) { create(:article, published_at: DateTime.current) } let(:unpublished_article) { create(:article) } let!(...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>{% block title %}Welcome!{% endblock %}</title> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>"> <link r...
package com.darkonnen.app.ws.ui.controller; import java.util.Map; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframe...
import Id from "../../../@shared/domain/value-object/id.value-object"; import UseCaseInterface from "../../../@shared/usecase/use-case.interface"; import Client from "../../domain/client.entity"; import ClientGateway from "../../gateway/client.gateway"; import { AddClientInputDto, AddClientOutputDto } from "./add-clien...
package demo22_IP_UDP_TCP; import java.io.IOException; import java.net.*; /* 1.创建发送端的Socket对象(DatagramSocket) 2.创建数据,并把数据打包 3.调用DatagramSocket对象的方法发送数据 4.关闭发送端 * */ public class j2_UDP_send { public static void main(String[] args) throws IOException { //1.创建发送端的Socket对象(DatagramSocket) // Datagra...
table = "visitors" my_db_file <- "visitor_log.sqlite" test <- as.data.frame(cbind("Name" = "Person, Test", "Phone" = "604-555-5555", "Email"= "test.person@notanemail.com", "Reason4Visit" = "Other", "EntryDate" = as.character(today()), "EntryTime" = as.character(now()), "ExitTime" = NA)) # Create database saveData <- f...
import Image from "next/image"; import { useEffect, useRef, useState } from "react"; import AvatarEditor from 'react-avatar-editor' import { ImageSelectionProps } from "../types"; const CropImage = ({ imageSelected }: ImageSelectionProps) => { const [imgSrc, setImgSrc] = useState('/empty.png') const imageCroppedRe...
import { AfterViewInit, Component, ElementRef, EventEmitter, Inject, Input, OnChanges, Output, SimpleChanges, ViewChild, } from '@angular/core'; import { ErrorLogger, IErrorLogger } from '@sneat/logging'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { Tabulator, SelectR...
// import 'package:flutter/material.dart'; // import 'package:flutter/widgets.dart'; // import 'package:jmessage_flutter/jmessage_flutter.dart'; // import 'package:modal_progress_hud/modal_progress_hud.dart'; // import 'main.dart'; // class ConversationManageView extends StatefulWidget { // @override // _Convers...
use chrono::{DateTime, Local}; use clap::{arg, command, value_parser, ArgAction}; use dirs::{config_dir, home_dir}; use rev_lines::RevLines; use serde::{Deserialize, Serialize}; use std::fs::{read_to_string, write, File, OpenOptions}; use std::io::Write; use std::path::PathBuf; use toml; #[derive(Serialize, Deserializ...
<template> <div class="chart-frame"> <canvas ref="lineChartCanvas" height="252"></canvas> </div> <div class="category-container"> <div class="category-frame" @click="selectTab('수입')"> <div class="category-icon"> <CategoryIcon :class="{ 'selected-tab-image': selectedTab === '수입' }" ...
\documentclass[12pt]{otsreport} % Uncomment the following line to disable hyphenation. %\usepackage[none]{hyphenat} \usepackage{ots} \usepackage{ots-sectioning} \usepackage{amsmath} \usepackage{setspace} % to control TOC spacing % This package gives us \RaggedRight to use in place of \raggedright. % Doing so solve...