text
stringlengths
184
4.48M
import 'dart:convert'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:storage_management_system/screens/home_screen/home_screen_cubit.dart'; class ItemsCubit extends Cubit<List<ModalBottomSheetState>> { ItemsCubit() : super([]); void addItem(ModalBottomSheetState item) { List<ModalBottomShe...
\section{Big Data Analysis} Big data analytics is where advanced analytic techniques operate on big data sets. Hence, big data analytics is really about two things — \textit{big data} and \textit{analytics}. \subsection{Big Data} As the name suggests, big data is a large amount of data. There are other important a...
use lv8_parser::{Block as BlockAST, Either, Expression as ExpressionAST, Statement}; use super::{ block::Block, scope::{self, Scope, ValueType}, PrimitiveTypes, }; #[derive(Clone, Debug)] pub struct Function { name: String, body: Block, expected_parameters: Vec<String>, } impl Function { ...
import React, {useContext, useEffect, useState} from "react"; import { Link, NavLink, useNavigate, Navigate, useHistory } from "react-router-dom"; import "./Navbar.css"; import * as PATHS from "../../utils/paths"; import * as CONSTS from "../../utils/consts"; import * as CONFIG from '../../config/config' import {UserC...
/* * Aethyra * Copyright 2008 Lloyd Bryant <lloyd_bryant@netzero.net> * * This file is part of Aethyra. * * 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 L...
import {Module} from "@nestjs/common"; // import {AppController} from "./app.controllers"; // import {AppService} from "./app.service"; import { UsersModule } from './users/users.module'; import {SequelizeModule} from "@nestjs/sequelize"; import * as process from "process"; import {ConfigModule} from "@nestjs/config"; ...
import {initGame, setRounds, STATUS} from '@/redux/game'; import {MapService} from '@/services/google'; import {GamePage} from 'src/pages/game.page'; import { GoogleStreetViewFailedResponse, GoogleStreetViewResponse, } from '../payloads/google'; import { act, createMockState, createMockStore, fireEvent, r...
import { useState, useEffect } from 'react'; import Button from './Button'; import { useAppContext } from "./context/AppContext"; const ProductDetail = () => { const { selectedProduct, error, setLoading, loading, setError } = useAppContext(); const [quantity, setQuantity] = useState(1); console.log(quan...
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) ...
//contact page import React from 'react' import { useForm } from 'react-hook-form' import { motion } from 'framer-motion' import logo from "../images/logo.png" export default function Contact() { const { register, trigger, formState:{errors} }=useForm() const handleSubmit=async (e)=>...
import React from 'react'; import * as AccordionRadixUi from '@radix-ui/react-accordion'; import classNames from 'classnames'; import { Icon } from '../../atoms/icon'; import './accordion.scss'; export interface AccordionItems { /** Accordion Header Title */ headerTitle: string | React.ReactNode; /** Accordion C...
<?php /** * The header for our theme * * This is the template that displays all of the <head> section and everything up until <div id="content"> * * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials * * @package News */ ?> <!doctype html> <html <?php language_attributes(); ?...
import React from "react"; import withLoader from "./WithLoader"; import useHover from "./useHover"; function DogImages(props) { const [hoverRef, hovering] = useHover(); return ( <div ref={hoverRef} {...props}> {hovering && <div id="hover">Hovering!</div>} <div id="list"> ...
import { MongoMemoryServer } from 'mongodb-memory-server'; import mongoose from 'mongoose'; import jwt from 'jsonwebtoken'; declare global { // eslint-disable-next-line no-var var signin: () => string[]; } // eslint-disable-next-line @typescript-eslint/no-explicit-any let mongo: any; beforeAll(async () => { pr...
package org.freitas.vendas.domain.dto; import jakarta.validation.constraints.NotBlank; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.freitas.vendas.domain.enums.Role; import org.freitas.vendas.security.PasswordComplexity; /** * @author Edson ...
import { Component, OnInit } from '@angular/core'; import { ValorDominio } from '../../../core/models/dominios/valor-dominio.model'; import { ConsultarContratoResponse } from '../../../core/responses/contratos/consultar-contrato.response'; import { DominioResponse } from '../../../core/responses/dominios/dominio.respon...
/** * MIDDLEWARE * What is middleware? * How to make a middleware? * Apply middle ware on routes. * Types of middleware. */ const express = require('express'); const app = express(); const reqFilter = (req, res, next) => { if(!req.query.age){ res.send('Please provide your age!'); } else if(r...
// Setup.jsx import React, { useState } from 'react'; import { signOut } from 'firebase/auth'; import { auth } from '../config/firebaseConfig'; import { useNavigate } from 'react-router-dom'; import SetupPersonalInfo from '../components/Setup/SetupPersonalInfo'; import SetupClasses from '../components/Setup/SetupClasse...
// Copyright 2023 Ready.io /* eslint-disable import/no-unused-modules */ import type PQueue from 'p-queue' import { ConversationType } from 'types/chat' import { strictAssert } from 'utils/assert' import { isTestEnvironment } from 'utils/environment' import type { LoggerType } from 'utils/logger' import { z } from 'z...
import React from 'react'; const Service = () => { const [view, setView] = React.useState('password'); const [userInfo, setUserInfo] = React.useState({}); const getData = (e) => { setUserInfo({ ...userInfo, [e.target.name]: e.target.value }) } const passValidation = () => { const ...
<?php interface Observer { public function update($event_info = null); } interface Subject { public function attach($o); public function detach($o); public function notify(); } class User implements Subject { private $observers = []; public function attach($o) { $this->observers[] = $o;...
package com.kolip.numberle; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import androidx.annotation.Nullable; import com.kolip.numberle.clasic.BoxStatus; import java.u...
Binary search tree object methods #include "binary-search-tree.h" #include <iostream> #include <queue> #include <algorithm> BinarySearchTree::Node::Node(DataType newval) { val = newval; left = nullptr; right = nullptr; } int BinarySearchTree::getNodeDepth(Node* n) const { if(n == nullptr){ ...
// // QuakeError.swift // Earthquakes // // Created by hybrayhem. // import Foundation enum QuakeError: Error { case missingData case networkError case unexpectedError(error: Error) } extension QuakeError: LocalizedError { var errorDescription: String? { switch self { case .missing...
/* ScummVM Tools * * ScummVM Tools is the legal property of its developers, whose names * are too numerous to list here. Please refer to the COPYRIGHT * file distributed with this source distribution. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General...
import datetime import email import email.utils import json import os import re import boto3 import requests from bs4 import BeautifulSoup import llm S3_BUCKET_NAME = os.environ.get("S3_BUCKET_NAME") GCP_SECRET_NAME = os.environ.get("GCP_SECRET_NAME") TELEGRAM_SECRET_NAME = os.environ.get("TELEGRAM_SECRET_NAME") REG...
/* ''' Suppose you're a school headmaster and somebody has drafted a course list for a new program. Each course has an ID associated with it, and they may have prerequisites. There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequis...
import React, { useEffect, useState } from "react"; import 'bootstrap/dist/css/bootstrap.min.css'; import { Modal } from "react-bootstrap"; import "../style/global.css"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { useNavigate } from "react-router-dom"; import { zodResolver } from "@hook...
from django.shortcuts import render from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework import status from .models import User from .serializer import UserSerializer ################################### # GET USERS ################################### @api_vie...
const express = require("express"); const app = express(); const bodyParser = require("body-parser"); const connection = require("./database/database") const Pergunta = require("./database/Pergunta"); const Resposta = require("./database/Resposta") //database connection .authenticate() .then(() => { ...
// // Created by isaca on 7/8/2021. // #ifndef PATTERNS_TRANSPORT_HPP #define PATTERNS_TRANSPORT_HPP #include <string> class Transport { protected: int transportID; double maxSpeed; std::string origin, destination; Transport(int _transportID, double _maxSpeed, std::string _origin, ...
import React,{useState,useEffect} from 'react' // import {Link} from 'react-router-dom'; import {Form,Button,Row,Col,Table} from 'react-bootstrap' import {useDispatch,useSelector} from 'react-redux'; import Message from '../components/Message'; import Loader from '../components/Loader'; import {getUserDetails,updateUse...
import { EventEmitter, Injectable } from '@angular/core'; import { isLiveUrl } from '@editor-ui/app/common/utils/is-live-url'; import { ApplicationStateService, FolderActionsService } from '@editor-ui/app/state'; import { Node, Page, Raw } from '@gentics/cms-models'; import { defer, iif, of } from 'rxjs'; import { Obse...
"""이 모듈은 한국 표준시(KST)에 대한 날짜와 시간을 처리하는 함수와 클래스를 제공합니다. - `KSTAwareDatetime` 클래스는 한국 표준시(KST) 시간대 정보를 요구하는 datetime을 나타냅니다. - `validate` 함수는 주어진 datetime이 한국 표준시(KST) 시간대 정보를 가지고 있는지 확인합니다. - `now`, `yesterday`, `datetime` 함수는 각각 현재, 어제, 주어진 시간의 한국 표준시(KST)을 반환합니다. """ from datetime import datetime as _datetime from da...
component output = false hint = "I provide an operator that tests to see if a value matches against the given Java Regular Expression." { /** * I initialize the operator with the given target values (Java RegEx pattern text). */ public void function init( required array targetValues ) { variables.patterns = ...
<template> <nav> <router-link to="/">Home</router-link> | <router-link :to="{ name: 'about' }">About</router-link> | <router-link :to="{ name: 'jobs' }">Jobs</router-link> <!-- One of the benefits of using ':to="{ name: 'about' }"' is that even though the link ('/about' or '/about-us' or...
import { cn } from "@/lib/cn"; import { Box } from "@components/atoms/Box"; import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "@components/atoms/Collapsible"; import { HStack } from "@components/atoms/HStack"; import { ChevronDown } from "@components/atoms/Icon"; import { Stack } from "@compone...
//输入一个整数数组,实现一个函数来调整该数组中数字的顺序,使得所有奇数在数组的前半部分,所有偶数在数组的后半部分。 // // // // 示例: // // //输入:nums = [1,2,3,4] //输出:[1,3,2,4] //注:[3,1,2,4] 也是正确的答案之一。 // // // // 提示: // // // 0 <= nums.length <= 50000 // 0 <= nums[i] <= 10000 // // Related Topics 数组 双指针 排序 👍 222 👎 0 package org.harden.sort.leetcode.editor.cn; ...
import math def f(x): return x * math.exp(x) + x**2 - 1 def f_prime(x): return math.exp(x) + x * math.exp(x) + 2 * x def newton_method(f, f_prime, x0, epsilon, max_iterations): iteration = 0 while True: x1 = x0 - f(x0) / f_prime(x0) if abs(x1 - x0) < epsilon or iteration >= max_iterat...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Vue Component Example</title> </head> <body> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <div id="app"> <child-component v-bind:propdata="message"></child-component> <sibling-component v-bind:propdata2="anotherMessage...
COLLECTION FRAMEWORK ------------------- Collections - An object that groups multiple elements into a single unit. Collections are used to store, retrieve, manipulate, and communicate aggregate data. - A collections framework is a unified architecture for representing and manipulating collections [Collection Framew...
import { expect } from 'chai'; import { utils, Wallet } from 'ethers'; import { ethers } from 'hardhat'; import { evm, wallet } from '@test-utils'; import { then, when } from '@test-utils/bdd'; import { getNodeUrl } from '@utils/network'; import { IERC20, TradeFactory } from '@typechained'; import forkBlockNumber from ...
import { StyleSheet, Text, TextInput, View } from "react-native"; import { LinearGradient } from "expo-linear-gradient"; import React, { useState } from "react"; import COLORS from "./COLOR"; import { TouchableOpacity } from "react-native-gesture-handler"; import { Dropdown } from "react-native-element-dropdown"; impor...
import { memo, useState, useEffect } from "react"; import PropTypes from 'prop-types'; import DatePicker from 'react-datepicker'; import { formatDate } from "../../utils/helpers"; import { Form, Button, Modal } from "react-bootstrap"; import styles from "./taskModal.module.css"; function TaskModal(props) { const...
/* * Copyright 1995-2010 by IRSN * * This software is an application framework, with a set of integrated * reusable components, whose purpose is to simplify the task of developing * softwares of numerical mathematics and scientific computing. * * This software is governed by the CeCILL-C license under F...
package com.example.medi_mitra_v1.Login_Signup; import static android.content.ContentValues.TAG; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.content.IntentFilter; import android.net.ConnectivityManager; import android.os.Bundle; i...
// Book Allocation , Split Array , Painters problem are all same approaches. #include <bits/stdc++.h> int students_allocated(vector<int> &books, int n, int limit) { int pages = 0; int student = 1; for (int i = 0; i < n; i++) { if (pages + books[i] <= limit) { pages = pages + books[i]; } e...
import edu.princeton.cs.algs4.In; import edu.princeton.cs.algs4.StdDraw; import edu.princeton.cs.algs4.StdOut; import java.util.Arrays; import java.util.Comparator; public class FastCollinearPoints { private LineSegment[] segments; private Point[] points; public FastCollinearPoints(Point[] points) { //...
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module AtCoderBeginnerContest148.BSpec (spec) where import Data.ByteString (ByteString) import Test.Hspec (Spec, it, shouldBe) import Text.Heredoc (str) import AtCo...
<a href="#create-task" class="btn btn-pink float-right mb-3" data-toggle="modal"><i class="fal fa-tasks"></i> Add Tasks</a> @foreach ($tasks as $task) <div class="widget-list-item mb-1"> <div class="widget-list-media"> @if($task->status == 'Completed') <img src="{!! asset('assets/img/comp...
import 'package:flutter/material.dart'; import '../models/chatUsersModel.dart'; import '../widgets/conversationList.dart'; class ChatHomeScreen extends StatelessWidget { ChatHomeScreen({Key? key}); List<ChatUsers> chatUsers = const [ ChatUsers( name: "Benn kaiser", messageText: "kuna game kesh...
const showdown = require('showdown') const fs = require('fs') const path = require('path') const ncp = require('ncp').ncp ncp.limit = 16 // copy images into /docs ncp(path.join('assets', 'images'), path.join('docs', 'assets', 'images'), err => err ? console.log(err) : null) // copy css into /docs ncp(path.join('asse...
import { BrowserRouter as Router, Route, Link, Routes } from 'react-router-dom'; import GoodDesignPage from './GoodDesignPage'; import BadDesignPage from './BadDesignPage'; import mePic from './rawan_picture.jpg'; import './App.css'; function App() { return ( <Router> <div className="App"> <header className=...
import { ChangeEvent, FocusEventHandler, FormEvent, useReducer } from 'react'; import { CR_OFF, CR_ON } from './global-settings'; interface InputState { value: string, isTouched: boolean, dateValue: Date, } const initialInputState = { value: '', isTouched: false, dateValue: new Date(), }; type InputActi...
package org.skoman.ebankingbackend.entities; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.skoman.ebankingbackend.enums.AccountCurrency; import org.skoman.ebankingbackend.enums.AccountStatus; import javax.persistence.*; impor...
import { OmitType, PartialType } from "@nestjs/mapped-types"; import { IsNotEmpty, IsString, MaxLength, MinLength } from "class-validator"; import { IsShortDate } from "src/lib/decorators"; export class CreateExperienceDto { @IsString() @IsNotEmpty() @MinLength(5) @MaxLength(30) title: string; ...
110, zon 6 dec '87 CURSUS MACHINETAAL MS-DOS DEEL 4 De vorige aflevering besloten we met de instructies voor optellen en aftrekken. We vervolgen met vermenigvuldigen en delen. VERMENIGVULDIGEN EN DELEN Voor vermenigvuldigen en delen met rest zijn er de instructies MUL, IMUL, DIV EN IDIV. Die met een I houden rekeni...
import { options } from "../../config"; import { PointInterface } from "./point"; export class Point implements PointInterface { public _x: number; public _y: number; public color?: string; constructor(x: number, y: number, color?: string) { this._x = x; this._y = y; this.color = color; } s...
#include <stdio.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/msg.h> #include "msg.h" // Include the message header file with definitions #define MSG_MODE (0600) // Message queue mode int main() { int msqid, n; // Message queue ID and message size MsgType msg; // Message structure // Acces...
import gsap from "gsap"; import { useEffect, useRef } from "react"; import { useScrollContext } from "./Scroll"; import { Link } from "@tanstack/react-router"; import { useStickyContext } from "./StickyCursor/StickyContext"; export function NavBar() { const { lenis } = useScrollContext(); const timeline = useRef(g...
package com.example.mblfoods; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.Gravity; import android.view.View; import android.widget.Button; import android.widget....
package com.lagou.liuyu.service.impl; import com.lagou.liuyu.dao.LagouTokenDao; import com.lagou.liuyu.dto.ResultDTO; import com.lagou.liuyu.enums.BaseEnum; import com.lagou.liuyu.pojo.LagouToken; import com.lagou.liuyu.service.ICodeService; import com.lagou.liuyu.service.IUserService; import com.lagou.liuyu.utils.Res...
<template> <form @submit.prevent="onSubmit"> <div class="inputrow"> <label for="nickname">Pseudo :</label> <input type="text" name="nickname" placeholder="Pseudo" v-model="nickname" /> </div> <div class="inputrow"> <label for="firstname">Prénom :</label> <input type="text" name="fi...
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { of } from 'rxjs'; import { HttpHeaders, HttpResponse } from '@angular/common/http'; import { BioBaseApplicationTestModule } from '../../../test.module'; import { TraceFileComponent } from 'app/entities/trace-file/trace-file.component'; import ...
import React, { useEffect, useRef } from 'react' import * as THREE from 'three' import { Main } from './styles' import { Card } from '../../components/Card' import pokeguiaImg from '../../assets/images/pokeguia.png' import kumpelImg from '../../assets/images/kumpelMockup.png' import countriesImg from '../../assets/ima...
import { useEffect, useState, Fragment, useCallback } from "react"; import v1 from '../../../../../utils/axios-instance-v1' import { useTranslation } from 'react-i18next'; import { TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Paper, Switch, Button, Backdrop, CircularProgress, Snackbar, Alert } from...
import argparse import os import pickle import random import ssl import numpy as np import skimage import tensorflow as tf import tensorflow_probability as tfp from tensorflow.python.keras.applications import vgg16, mobilenet_v2, resnet50, vgg19, inception_v3 from tensorflow.python.keras.applications.mobilenet_v2 impo...
<?php include '../../db/db_connection.php'; if ($_SERVER['REQUEST_METHOD'] === 'PUT') { parse_str(file_get_contents("php://input"), $_PUT); // Handle PUT request for updating a user $userId = $_PUT['user_id']; $newUsername = $_PUT['username']; $password = $_PUT['password']; $userType = $_PUT['...
import 'dart:convert'; import 'dart:ui'; import 'package:http/http.dart' as http; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:weather_app/halamanRegister.dart'; import 'halamanUtama.dart'; import 'package:c...
import { useState } from 'react'; import { Dimensions, ImageBackground, StyleSheet, Switch, Text, View, } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { Information } from 'components/Information'; import { Input } from 'components/Input'; import { DefaultButton } ...
// Bryan Zublin // 828354677 // BinarySearchTree.h: Header file for BinaryBinarySearchTree.cpp // The only way to insert data in a tree is with the insert function, thus // satisfying the BST rule giving it a well behaved ordering to the type T. #ifndef BINARY_SEARCH_TREE_H #define BINARY_SEARCH_TREE_H #include <io...
import neuromancer as nm def nnQuadratic2(c, Q, d, b, A, E, F, func, alpha=100): # solution map from model parameters: sol_map(p) -> x sol_map = nm.system.Node(func, ["p"], ["x"], name="smap") # trainable components components = [sol_map] # parameters p = nm.constraint.variable("p") # varia...
// // LocationSearchView.swift // Uber // // Created by Park Junsuk on 2022/10/06. // import SwiftUI struct LocationSearchView: View { @State var startLocation = "" @Binding var mapViewState: MapViewState @EnvironmentObject var viewModel: LocationSearchViewModel var body: some View { V...
@extends('layouts.dashboard') @section('admin') <div class="card"> <div class="card-body"> <div class="row align-items-center"> <div class="col-lg-3 col-xl-2"> <a href="{{ route('dashboard.users.create') }}" class="btn btn-primary mb-3 mb-lg-0" ...
// // NoteChallengeUITests.swift // NoteChallengeUITests // // Created by Dai Tran on 8/10/23. // import XCTest final class NoteChallengeUITests: XCTestCase { override func setUpWithError() throws { continueAfterFailure = false } func testLoginSuccess() { let username = "Jack" ...
import { Field, InputType, registerEnumType } from "@nestjs/graphql" import { Max } from "class-validator" import { Iso3166CountriesCodesEnum, Iso3166CountryCode } from "../interfaces/iso-3166.interface" import { GeonamesEntity } from "./geonames.objects" registerEnumType(Iso3166CountriesCodesEnum, { name: "countryCod...
import React, { useEffect, useState } from 'react'; import { IonButton, IonButtons, IonCard, IonCardContent, IonCol, IonIcon, IonItem, IonLabel, IonRow, } from '@ionic/react'; import { add, heart, heartOutline } from 'ionicons/icons'; import { useDispatch, useSelector } from 'react-redux'; import { ad...
<!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> <form th:action = "@{/search-result/0}" method="GET"> ...
<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Spatie\Health\Checks\Checks\CacheCheck; use Spatie\Health\Checks\Checks\DatabaseCheck; use Spatie\Health\Checks\Checks\DatabaseConnectionCountCheck; use Spatie\Health\Checks\Checks\DatabaseSizeCheck; use Spatie\Health\Checks\Checks\DatabaseTab...
# Copyright 2021 Google LLC. This software is provided as-is, without warranty # or representation for any use or purpose. Your use of it is subject to your # agreement with Google. import google from includes.allfunds.loggers import log_info, log_warning from includes.allfunds.utils import get_gcs_dag_config_files, g...
Puppi: A Pluggable Deploy Automation and SysAdmin helper Puppet module # Written by Lab42 # # http://www.example42.com Licence: GPLv3 Puppi is a Puppet module that lets sysadmins manage and automate the deployment of applications and provides quick and standard commands to obtain informations about the system and w...
@host = localhost @port = 3000 @path = @url = {{host}}:{{port}}{{path}} # ------------------------------------------------------ # Post-Comments: One to Many Relationship # ------------------------------------------------------ # posts: [ # {id: "1", title: "a title", views: 100}, # ... # ] # # comments: [ # ...
import json import pprint import queue import re import threading import time from sansio_lsp_client import ShowMessageRequest, WorkDoneProgressCreate, RegisterCapabilityRequest, \ ConfigurationRequest, WorkspaceFolders, WorkspaceFolder, ClientState, Shutdown, Client class IOThreadedServer: """ Gathers a...
CREATE TABLE ClassRoom( Building varchar(50), RoomNumber INTEGER, Capacity INTEGER, PRIMARY KEY (Building, RoomNumber) ); CREATE TABLE TimeSlot( TimeSlotID varchar(50), Day varchar(50) check ( day in ('Monday', 'Tuesday', 'Wednesday', 'Thrusday', 'Friday', 'Sa...
/* * Copyright (c) 2023. caoccao.com Sam Cao * * 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 ...
package com.trainings.dto; import org.apache.commons.lang.builder.ToStringBuilder; import org.hibernate.validator.constraints.NotEmpty; import java.util.List; public class PersonDTO { private Long id; @NotEmpty private String firstName; @NotEmpty private String lastName; private String a...
### [两两交换链表中的节点](https://leetcode.cn/problems/swap-nodes-in-pairs/) #### 描述 给你一个链表,两两交换其中相邻的节点,并返回交换后链表的头节点。你必须在不修改节点内部的值的情况下完成本题(即,只能进行节点交换)。 #### 示例 ![](https://assets.leetcode.com/uploads/2020/10/03/swap_ex1.jpg) ```text 输入:head = [1,2,3,4] 输出:[2,1,4,3] ``` ```text 输入:head = [] 输出:[] ``` #### 解法 分隔链表 -> 分别翻转前后两个链表 -...
""" URL configuration for emission_sentri project. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/4.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, na...
const express = require('express'); const { Op } = require('sequelize'); const {Post, Image, User, Comment} = require('../models'); const router = express.Router(); router.get('/', async (req, res, next) => { // GET /posts try { const where = {}; if (parseInt(req.query.lastId,10)) { // 초기 로딩이 아닐 ...
import { ApiProperty } from '@nestjs/swagger' import { IsNumber, IsOptional, IsString } from 'class-validator' export class UpdateCoachWorkoutDto { @ApiProperty() @IsString() @IsOptional() readonly name: string @ApiProperty() @IsNumber() @IsOptional() readonly sets: number @ApiPro...
import { useState, useEffect } from "react" import { useDispatch, useSelector } from "react-redux" import { getPlayers, getPlayer, updatePlayer } from "../features/players/playerSlice" import { editStats, reset } from "../features/fixtures/fixtureSlice" import { addPointsToPicks } from "../features/lives/livesSlice" i...
import SwiftUI // base: https://github.com/quangfnv-1159/AppStoreAnimation struct TodayDetailView: View { @Binding var showDetail: Bool @State var animateView = false @State var animateContent = false let caption: String let title: String let backgroundImageName: String let appImageName...
import { NavLink } from 'react-router-dom'; import { DeleteBtn } from 'components/DeleteBtn/DeleteBtn'; import { NavLinkSkew } from 'components/NavLinkSkew/NavLinkSkew'; import { useMediaQuery } from 'hooks/useMedia'; import { DataWrapper, DescrWrapper, ImageWrapper, RecipeBlockWrapper, SubTitle, Time, T...
#### CV for PCA ROBUST COX #### library(coxrobust) library(tidyverse) library(survival) liv <- read_csv("C:/Users/kange/Desktop/Thesis/data/liver_clinic.csv") #keep barcode for merging only, not in model liv <- liv %>% select(-c(1)) cn <- read_csv("C:/Users/kange/Desktop/Uoft/Uoft Courses/practicum/week13/cn_pc_nolas...
--- title: Java基础 category: - Java order: 10 tag: - Java基础 --- ## 基础 ### java的移位运算符 一共有三种 |位移符号|作用| |----|----| | 左移(<<) | 左移运算符,向左移若干位,高位丢弃,低位补零。x << 1,相当于 x 乘以 2(不溢出的情况下)。 | | 带符号右移(>>) |带符号右移,向右移若干位,高位补符号位,低位丢弃。正数高位补 0,负数高位补 1。x >> 1,相当于 x 除以 2。| | 无符号右移(>>>) |无符号右移,忽略符号位,空位都以 0 补齐。 | > Java 只支持 int 和 long 的...
import { useContext } from 'react'; import { Token } from '@mindspace-io/core'; import { InjectorContext } from '../injector.context'; /** * Return either the injector instance or the token lookup FROM the * injector. * * A configured injector instance is required along with and a lookup token. * What is returne...
import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:smartshipapp/authentication/authentication_bloc.dart'; import 'package:smartshipapp/data/model/CreateUser.dart'; import 'package:smartshipapp/data/repositories/abstract/user_repository.dart'; import 'sign_up.dart';...
import EngineGameService from '../services/gameServices/gameServices/engineGameService' import { Cell } from './cell/Cell' import { EngineMoveCells } from '../services/gameServices/types' import { Colors } from '../constants/Colors' import { Player } from './player/Player' import moveFigureService from '../services/mov...
/** *=06. TypeScript Crash Course - Inheritance and Interfaces * 25. Abstract Classes - Overview * 26. Abstract Classes - Write Some Code */ //--IMPORTS import { Shape } from './Shape'; /** *=Child Class Cirlce */ export class Cirlce extends Shape { //--Fields protected _className: string = "Cirl...
---@class custom_icons --- Icons will be automatically pulled from tty if necessary --- Icons will otherwise be gotten from gui, falling back to the tty icon if not available --- Note: this only works on the top level. if a table is returned, no such promises are made. local tty = { -- {{{ 1 clock = "", debug = "de...