text
stringlengths
184
4.48M
import { Component, OnInit } from '@angular/core'; import { UserService } from './user.service'; import { Subscription } from 'rxjs'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit { constructor(private _...
<template> <component :is="component" class="Navigation__NavigationItem NavigationItem"> <i v-if="icon" class="NavigationItem__icon" :class="[icon]" /> <span class="NavigationItem__text"> <slot /> </span> </component> </template> <script setup lang="ts"> type Props = { icon?: string; componen...
const sequelize = require('../db') const {DataTypes} = require('sequelize') const User = sequelize.define('user', { id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true}, email: {type: DataTypes.STRING, unique: true,}, password: {type: DataTypes.STRING}, role: {type: DataTypes.STRING, de...
package valueobject import ( "testing" vo "github.com/hcsouza/fiap-tech-fast-food/src/core/valueObject" "github.com/stretchr/testify/assert" ) func TestCategory(t *testing.T) { t.Run("should return true when category is Lanche", func(t *testing.T) { isValid := vo.Category("Lanche").IsValid() assert.True(t, ...
#ifndef _UPGRADEPATH_BACKUP_H_ #define _UPGRADEPATH_BACKUP_H_ // The "memory" structure for the upgrade methods typedef std::map<const std::string, std::string> MemoryMap; // The "memory" as used by the upgrade methods MemoryMap _memory; /* Copies a whole node (and all its children) from source/fromXPath to * t...
import React from "react"; import { Link } from "gatsby"; import "../styles/footer.scss"; const Logo = () => { return ( <Link className="footer-logo" to="/"> <img className="footer-logo__image" src="https://global-uploads.webflow.com/5deea2e254c6bb904cf59c96/5e45e151f236a82c108b5b68_logo10.svg" alt="...
import { useState, useEffect } from 'react' import './App.css' import axios from 'axios'; //Functions function useTodo(){ const [todos, setTodos] = useState([]); useEffect(() => { setInterval(()=>{ axios.get("http://localhost:3000/todos").then((response) => { setTodos(response.data); })}, 100...
package jpabook.jpashop.api; import jakarta.validation.constraints.NotEmpty; import jpabook.jpashop.domain.Member; import jpabook.jpashop.service.MemberService; import lombok.AllArgsConstructor; import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.vali...
/** * Copyright 2010-2022 interactive instruments GmbH * * 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 applicabl...
<h1 align="center">GeoAuxNet: Towards Universal 3D Representation Learning for Multi-sensor Point Clouds</h1> <div align='center'> Shengjun Zhang, Xin Fei, <a href='https://duanyueqi.github.io/'>Yueqi Duan</a> </div> <div align='center'> Department of Electronic Engineering, Tsinghua University </div> <div align='cent...
## AWS C MQTT C99 implementation of the MQTT 3.1.1 specification. ## License This library is licensed under the Apache 2.0 License. ## Usage ### Building CMake 3.1+ is required to build. `<install-path>` must be an absolute path in the following instructions. #### Linux-Only Dependencies If you are building o...
% function textBar(labels, y, [ax], [col], [lb], [ub]) % % Generates a bar diagram with text labels. % % labels cell array of labels % y bar height % col color % lb lower bound of the figure % ub upper bound of the figure function textBar(labels, y, ax, col, lb, ub) ...
import { deleteUser, followUser, getUser, getUserFriends, getUserProfile, unfollowUser, updateProfilePicture, updateUser, } from "../services/user.service.js"; export const updateUserController = async (req, res) => { if (req.body.userId === req.params.id || req.body.isAdmin) { try { const ...
using MainApp.Models.User; using Microsoft.AspNetCore.Identity; namespace MainApp.Data { // Init first identity data (roles + admin) public static class IdentityInitializer { public static async Task InitializeAsync(UserManager<UserModel> userManager, RoleManager<IdentityRole> roleManager, IConfig...
<template> <div class="tab"> <input v-model="selectedTab" type="radio" :id="value" :name="groupName" :value="value" class="tab__input" /> <label class="tab__label" :for="value"> <span class="tab__labelText">{{ label }}</span> <span class="tab__label--overlay...
package pl.project.plannerapp.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.web.server.ResponseStatusException; import pl.project.plannerapp.DTO.ToDoDTO; import pl.project.pla...
# NeuroExplainer: Fine-Grained Attention Decoding to Uncover Cortical Development Patterns of Preterm Infants ## Description NeuroExplainer is an explainable geometric deep network adopting a hierarchical attention-decoding framework to learn fine-grained attention and discriminative representations in a spherical spa...
Mining Closed Episodes from Event Sequences Efficiently Wenzhi Zhou1, Hongyan Liu1, and Hong Cheng2 1 Department of Management Science and Engineering Tsinghua University, Beijing, China, 100084 {zhouwzh.05,liuhy}@sem.tsinghua.edu.cn 2 Department of Systems Engineering and Engineering Management, The Ch...
import { Biometrics } from "@metriport/api-sdk"; import { PROVIDER_FITBIT } from "../../shared/constants"; import { Util } from "../../shared/util"; // import { findMinMaxHeartRate } from "./activity"; import { FitbitBreathingRate } from "./models/breathing-rate"; import { FitbitCardioScore } from "./models/cardio-sco...
package apps.cradle.quests.utils import androidx.preference.PreferenceManager import apps.cradle.quests.App import apps.cradle.quests.R import apps.cradle.quests.database.entities.DbAction import apps.cradle.quests.database.entities.DbCategory import apps.cradle.quests.database.entities.DbNote import apps.cradle.quest...
use crate::domain::devices::device::Device; use crate::domain::enums::RemoveEnum; pub struct Room { name: String, devices: Vec<Box<dyn Device>>, } impl Room { pub fn new(name: String) -> Room { Room { name, devices: Vec::new(), } } pub fn get_name(&self) ->...
import UIKit import SnapKit import Then import RxCocoa import RxSwift class LoginViewController: UIViewController { private var disposeBag = DisposeBag() //MARK: - UI private let emailText = UILabel().then { $0.text = "E-mail" $0.font = .notoSansFont(ofSize: 18, family: .regular) ...
// config-utils.go - provide utility methods for handling and manipulating data provided // in the AppConfig struct instance package config import ( "strings" "github.com/google/go-github/github" "github.com/mgmaster24/go-gh-scanner/utils" ) // Returns the Language object associated with the provided string func ...
<template> <div ref="orderDetailRef" class="order-detail"> <div class="header"> <img alt="" class="mytrolLogo" src="@assets/images/mytrolLogo.png" /> <icon-svg class="icon" icon="icon-a-bianzu101" @click="handleHideClick"></icon-svg> </div> <div class="avator"> ...
/******************************************************************************* File: packetgen.h Project: OpenSonATA Authors: The OpenSonATA code is the result of many programmers over many years Copyright 2011 The SETI Institute OpenSonATA is free software: you can redistribute it and/or modify ...
import axios from 'axios' export async function redirectToAuthCodeFlow(clientId: string) { const verifier = generateCodeVerifier(128) const challenge = await generateCodeChallenge(verifier) localStorage.setItem('verifier', verifier) const params = new URLSearchParams() params.append('client_id', clientId) ...
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use Naux\Mail\SendCloudTemplate; class User extends Authenticatable { use Notifiable; /** * The attributes that are mass assignable. * ...
import { Dispatch } from "redux"; import * as L from '../loading' import * as E from '../errorMessage' import * as D from '../../data' import { setUser, changeEmail, changeName, changePicture } from "./actions"; export const getRemoteUser = () => (dispatch: Dispatch) => { dispatch(L.setLoading(true)) dispatch(E.se...
 #include <iostream> #include <vector> using namespace std; class Heap { public: vector<int> v; int s = 0; Heap() { v.push_back(-1); } void insert(int e) { s++; v.push_back(e); upheap(s); } void upheap(int child) { int parent = (child / 2); ...
import * as fb_helper from './fb_helper' import type { FirebaseApp } from 'firebase/app' import type { User } from 'firebase/auth' import type { User as UserType } from 'firebase/auth' import { OrganizationUser } from './OrganizationUsers' import { Location } from './Locations' import { getDocs, getFirestore, connectFi...
import { createPortal } from "react-dom"; type Props = { element?: JSX.Element; isOpen: boolean; onClose?: (data: any) => void; }; const Modal = ({ element, isOpen, onClose }: Props) => { return isOpen ? createPortal( <div className="h-full absolute top-0 left-0 right-0 bottom-0 flex items-center ...
import 'package:flutter/material.dart'; import '../../controllers/MovieController.dart'; import '../../models/Movie.dart'; import 'package:get/get.dart'; class MovieCard extends StatelessWidget { MovieCard({ Key? key, required this.movie, required this.titleSize, required this.ratingSize, }) : super(key:...
package com.example.userbacked.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.example.userbacked.common.BaseResponse; import com.example.userbacked.common.ErrorCode; import com.example.userbacked.common.ResultUtil; import com.example.userbacked.model.domain.User; import com.e...
class Solution { public int[] nextGreaterElements(int[] nums) { int[] result = new int[nums.length]; Stack<Integer> stack = new Stack<>(); for (int i = nums.length -1; i >= 0; i--) { stack.push(i); } for (int i = nums.length - 1; i >= 0; i--) { ...
#pragma once #include <string> #include <glm/glm.hpp> #include <vector> #include <fstream> #include <iostream> #include <memory> #include "ISerializable.h" template<typename ResponseT> class Array3D : public ISerializable{ private: ResponseT* _ptr; size_t _w=0, _h=0, _d=0; bool _copied = false; public: class xy...
using System; using System.Linq; using BeastRescue.Models; using System.Threading.Tasks; using Microsoft.OpenApi.Models; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; using Microsoft.Extension...
import random import pycountry import pytest from faker import Faker from sqlmodel import Session, select from ibg.api.controllers.user import UserController from ibg.api.models.error import UserAlreadyExistsError, UserNotFoundError from ibg.api.models.table import User from ibg.api.models.user import UserCreate, Use...
import spacy def get_movie_suggestions(movie_description, movies): """Returns the most similar movie to the movie description Parameters movie_description: str # The description of the movie movies: dict # A dictionary of movie names and descriptions""" nlp = spacy.load("en_core_web_md") nl...
\documentclass[11pt]{exam} \newcommand{\myname}{Sihao Yin, Yuxuan Jiang} %Write your name in here \newcommand{\myUCO}{0028234022, 0028440468} %write your UCO in here \newcommand{\myhwtype}{Homework} \newcommand{\myhwnum}{12} %Homework set number \newcommand{\myclass}{CS580} \newcommand{\mylecture}{} \newcommand{\myse...
//------------------------------------------------------------ACOUNT------------------------------------------------------------ /** * @swagger * /Account: * get: * tags: * - Account * description: Get all Users * responses: * '200': * description: Success ! */ /** /** * @swagger *...
import { useToast } from "@chakra-ui/react" import {useContext,createContext,useState} from "react" import {api} from "../services/api" export const LoanContext = createContext({}) export const useLoan = () => { const context = useContext(LoanContext); if (!context) { throw new Error("userAuth must ...
import { Input, HostBinding, Component } from "@angular/core"; import { ButtonLikeAbstraction } from "../shared/button-like.abstraction"; export type ButtonTypes = "primary" | "secondary" | "danger"; const buttonStyles: Record<ButtonTypes, string[]> = { primary: [ "tw-border-primary-500", "tw-bg-primary-50...
<template> <div class="container"> <div> <Logo /> <h6 class="title">三种路由配置</h6> <ul> <li>page页面自动配置</li> <li>@nuxtjs/router 模块配置</li> <li>nuxt.config.js 中配置 router>extendRouters</li> </ul> <div class="links"> <nuxt-link to="/item" class="button--grey" ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> </style> </head> <body> <div id="app"> <div> {{ms...
const { Task } = require('klasa'); const { DateTime } = require('luxon'); const fetch = require('node-fetch'); module.exports = class extends Task { constructor(...args) { super(...args, { enabled: true }); } async run(metadata) { const today = DateTime.local().minus({ months: 1 }); const count_by_users = a...
import express from 'express'; import * as http from 'http'; import 'dotenv/config'; import * as winston from 'winston'; import * as expressWinston from 'express-winston'; import cors from 'cors'; import debug from 'debug'; import { CommonRoutesConfig } from '../../adapters/apis/routes/common/common.routes.config'; ...
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <form:form method="POST" commandName="signUpForm" class="form-horizontal" name="addUserForm"> <div class="form-group"> <label class="control-label col-sm-2">login</label> <di...
<template> <el-aside width="200px"> <el-scrollbar> <el-menu router :default-active="defaultActive" background-color="transparent" > <template v-for="val in menuList"> <el-sub-menu :index="val.path" v-if="val.children && val.children.len...
from django.db import models from garagem.models import Acessorio, Cor, Modelo from uploader.models import Image class Veiculo(models.Model): id = models.BigAutoField(primary_key=True) descricao = models.CharField(max_length=100) cor = models.ForeignKey(Cor, on_delete=models.PROTECT, related_name="veicul...
# Week 3: Introduction to React ## Thursday - Project Walkthrough: Personal Portfolio Website ### Instructor Guide --- ### Objective To build a personal portfolio website using React, showcasing various components that represent different sections like About, Projects, Skills, and Contact. ### Project Setup - **Ta...
require "rails_helper" feature "Editing a user" do let!(:admin_user) { FactoryGirl.create :admin_user } let!(:user) { FactoryGirl.create :user } before do sign_in_as! admin_user visit "/" click_link "Admin" click_link "Users" click_link user.email click_link "Edit User" end scenario...
import { ContactProps } from "@/pages/contact"; export const getMains = async () => { const response = await fetch("https://sabberdeveloper.hasura.app/v1/graphql", { method: "POST", headers: { "Content-Type": "application/json", "X-Hasura-Role": "public", }, body: JSON.stringify({ q...
import React,{useEffect} from 'react' import { connect } from 'react-redux' import { getCourse } from '../../redux/actionCreators' import store from '../../redux/store' import Banner from '../Organisms/Banner' import {Link} from 'react-router-dom' const Course = ({course}) => { useEffect(()=>{ store.dispatch(get...
import { Scene, Vector3, Group, PlaneGeometry, TextureLoader, MeshBasicMaterial, Mesh, Raycaster, Object3D, Audio, Quaternion, AxesHelper, } from "three"; import { Tween, Easing } from "@tweenjs/tween.js"; import { EnemyModel } from "./enemy"; import PointerLockControls from "./utils/PointerLock...
import { Injectable, Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { PassportStrategy } from '@nestjs/passport'; import { ExtractJwt, Strategy } from 'passport-jwt'; import { UserEntity } from 'src/entities'; import { UserService } from 'src/modules/user/user.service'; @Injecta...
import * as fs from 'fs'; import * as process from 'process'; import lodash from 'lodash'; // let schedule1 = process.env.SCHEDULE1; let schedule2 = process.env.SCHEDULE2; let currentPath = process.cwd() let filePath = currentPath + '/' + process.env.SCHEDULE_FILE; filePath export interface Schedule { requestId: ...
--- title: In 2024, How to Change Lock Screen Wallpaper on Nubia Z50 Ultra date: 2024-05-19T09:20:27.485Z updated: 2024-05-20T09:20:27.485Z tags: - unlock - remove screen lock categories: - android description: This article describes How to Change Lock Screen Wallpaper on Nubia Z50 Ultra excerpt: This article de...
"use client"; import { Card, CardBody, Checkbox, Pagination, User, cn, } from "@nextui-org/react"; import { type User as Profile, type Rattings } from "@prisma/client"; import { Star } from "lucide-react"; import React, { useState } from "react"; type Props = { rattings: Array< Rattings & { use...
package tournament import ( "bufio" "fmt" "io" "sort" "strings" ) type ( matchResult string position uint8 ) const ( MATCH_WIN matchResult = "win" MATCH_LOSS matchResult = "loss" MATCH_DRAW matchResult = "draw" POSITION_FIRST position = 1 POSITION_SECOND position = 2 TEAM_COL_WIDTH = 31 ) func N...
#include "f_util.h" #include "ff.h" #include "hardware/i2c.h" #include "hardware/pwm.h" #include "hw_config.h" #include "pico/stdlib.h" #include "rtc.h" #include <stdbool.h> #include <stdio.h> #include <string.h> #define FILENAME "log.txt" #define I2C_PORT i2c1 #define I2C_SDA 2 #define I2C_SCL 3 #define NFC_ADDR 0x...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href="images/icons8-h-16.png" type="image/x-icon"> <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/remixicon/3.4.0/r...
package io.github.hillelmed.ogm.starter.config; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.ya...
import { currentProfile } from "@/lib/currentProfile"; import { db } from "@/lib/db"; import { MessageSchema } from "@/lib/validators/message"; import { NextApiResponseServerIO } from "@/types"; import { NextApiRequest } from "next"; import { z } from "zod"; const handler = async (req: NextApiRequest, res: NextApiResp...
import { useEffect, useState } from 'react'; const usePointerPos = () => { const [pos, setPos] = useState({ x: 0, y: 0 }); useEffect(() => { const handleMouseMove = (e: MouseEvent) => { setPos({ x: e.clientX, y: e.clientY }); }; globalThis.addEventListener('mousemove', (e) => handleMouseMove(e)); return ...
@file:Suppress("LeakingThis", "unused", "JpaDataSourceORMInspection") package com.linecorp.kotlinjdsl.example.eclipselink.javax.entity.employee import java.util.* import javax.persistence.Column import javax.persistence.DiscriminatorColumn import javax.persistence.Embedded import javax.persistence.Entity import javax...
import React, { useState } from "react"; import { Box, Card, CardContent, Slide, Typography } from "@mui/material"; interface Props { image: string; message: string; details: string; } const CardComponent = ({ image, message, details }: Props) => { const [cardHover, setCardHover] = useState(false); const h...
import template from "./change_password.hbs"; import Block from "../../utils/Block"; import {addFocus, addBlur} from "../../utils/addFocusBlurEvents"; import Input from "../../partials/input" import Button from "../button"; import Router from "../../utils/Router"; import { inputChangeInfo } from "../inputChangeInfo/inp...
package com.mendozamatias.presentation.controller; import com.mendozamatias.bussines.services.IPacienteService; import com.mendozamatias.domain.dto.paciente.CrearPacienteDto; import com.mendozamatias.domain.dto.paciente.PacienteDto; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.r...
package egecoskun121.com.crm.security; import egecoskun121.com.crm.model.entity.Role; import egecoskun121.com.crm.model.entity.User; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails...
import { Navigate } from 'react-router-dom'; import React, { memo, useEffect } from 'react'; import { useDispatch } from 'react-redux'; import { Grid, Button, Alert, CircularProgress, Pagination, Card, CardContent, CardMedia, Typography, } from '@mui/material'; import Post from '../../components/Pos...
df <- read.csv("/home/clinux01/Documentos/Curso.DS.R/Clase20_05/datos_libreta24292n_10.csv") ## error estandar estimado error_estandar_sombrero <- sd(df$lamparas)/sqrt(length(df$lamparas)) # sd(x)/sqrt(n) ## error estandar de un estimador tita_n es: sqrt(V(tita_n)) ###### parte 2 ########## df2 <- read.csv("/ho...
import {useNavigation} from "@react-navigation/native"; import React from "react"; import {View, Text, StyleSheet, TouchableWithoutFeedback} from "react-native"; import {__} from "../language/stringPicker"; import {useStateValue} from "../StateProvider"; import {routes} from "../navigation/routes"; // Custom Component...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "./KolorLandNFT.sol"; struct LandTokensInfo { uint256 initialAmount; uin...
from dataclasses import dataclass, field, asdict from logging import Logger from constants.enums.position_type import PositionType from constants.enums.product_type import ProductType from constants.settings import DEBUG from models.stages.holding import Holding from models.stages.position import Position from models....
/* * This file is part of Player Analytics (Plan). * * Plan is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License v3 as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * ...
import { Avatar, AvatarProps, HStack, Stack, StackProps, Text, } from "@chakra-ui/react"; import { useRouter } from "next/router"; import React, { useEffect, useState } from "react"; import { StoryAuthor, StoryResult } from "types/api"; import { getAuthor } from "utils/apiHelpers"; import Time from "./Time"...
import { EmailRegex, Gender } from '@boom-platform/globals'; export const FormCustomerEditProfileSchema = { type: 'object', properties: { firstName: { type: 'string', minLength: 2 }, lastName: { type: 'string', minLength: 2 }, newPassword: { type: 'string', minLength: 6 }, // check api\src\validation\s...
/** * The built-in class for asynchronous Promises. * @external Promise * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise */ export interface IStatus { resolved: boolean; rejected: boolean; canceled: boolean; pending: boolean; } /** * A Promise object that can...
package export import ( "fmt" "github.com/paldraken/book_thief/internal/export/fb2" "github.com/paldraken/book_thief/internal/parse/types" ) const ( FORMAT_FB2 = "FB2" FORMAT_EPUB = "EPUB" FORMAT_MOBI = "MOBY" ) type InvalidFormat struct { Format string } func (e *InvalidFormat) Error() string { return fm...
package lecture01.Ex006; import java.util.ArrayList; public class Robot3 { enum State { On, Off } private static int defaultIndex; private static ArrayList<String> names; static { defaultIndex = 1; names = new ArrayList<String>(); } /** * Уровень робота ...
import { Container, Button, Box, Stack, IconButton, Avatar } from '@mui/material'; import { red } from '@mui/material/colors'; import { useRouter } from 'next/router'; export default function Page() { const router = useRouter(); return ( <Container> <Header onLeftClick={() => router.back()} /> <Box...
import { Meta, StoryObj } from '@storybook/react'; import { within, userEvent, waitFor } from '@storybook/testing-library'; import { expect } from '@storybook/jest'; import { rest } from 'msw'; import { SignIn } from './signin'; export default { title: 'pages/Sign in', component: SignIn, args: {}, argTypes: {}, ...
#PURPOSE: Get lists of genes associated with each germ cell cluster in Green et al. 2018 (mouse spermatogenesis single cell RNAseq paper); convert to protein lists library(biomaRt) #Read in data mydata<-read.csv("greenEtal2018_1-s2.0-S1534580718306361-mmc4.csv", header=TRUE, comment.char="#") print(head(mydata)) #Lo...
# Scrapy import scrapy from scrapy import Request from scrapy.http import HtmlResponse #Selenium Scrapy from scrapy_selenium import SeleniumRequest from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from ...
import React from "react"; import { Product, FooterBanner, HeroBanner } from "../components"; import { client } from "../lib/client"; import { GetServerSideProps } from "next"; type Props = { products: ProductType[]; bannerData: BannerType[]; }; const Home = ({ products, bannerData }: Props) => { return ( <...
<!DOCTYPE html> <html> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge'> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-touch-fullscreen" content="yes"> <meta name='viewport' content='width=device-width, initial-scale=1'> <head> <meta name="area" content="Álgebr...
const myGlobal=0; function myFunction(){ const myNumber=1; console.log(myGlobal); function parent(){ //function interna const inner=2; console.log(myNumber,myGlobal); function child(){ console.log(inner,myNumber,myGlobal); } return child(); ...
import { createSlice } from "@reduxjs/toolkit"; import uuid from "react-uuid"; import { fetchInitialData } from "../../actions/dataExample"; interface Post { id: string username: string title: string content: string created_datetime: string likedBy: string[] } const initialState: Array<Post> = [] const ...
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class fournisseurRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Ge...
/************ t.c file **********************************/ #define NPROC 9 #define SSIZE 1024 /* kstack int size */ #define DEAD 0 /* proc status */ #define READY 1 #define FREE 2 typedef struct proc { struct proc *next; int ksp; /* saved s...
package Classes; /** * Classe pública com todas os métodos usadas na aplicação */ public class Stock { private String product_identifier; private String product_description; private float quantidade; private String tipo_qtd; private float preco; private float vat; private float preco_tota...
import {Component, Input, OnChanges, SimpleChanges} from '@angular/core'; import {ChartConfiguration, ChartData, ChartType} from "chart.js"; import {FuturesCalculatorService} from "../../../../services/futures/futures-calculator.service"; import {colors} from "../../../../helpers/colors"; @Component({ selector: 'app...
import { getReservationLabelStatus } from "@helpers"; import { ReservationItemDTO, ReservationStatus } from "@models"; import Link from "next/link"; import React from "react"; export default function DinnerReservationItem({ reservation, }: { readonly reservation: ReservationItemDTO; }) { return ( <li classNa...
import './base64.sol'; // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /// @title GitHub Renoun Non-Transferrable Tokens /// @author Jonathan Becker <[email protected]> /// @author Badge design by Achal <@achalvs> /// @notice This contract is an ERC721 compliant implementation of /// a badge syste...
# Problem: HOC 是什么?相比 mixins 有什么优点? *[interview]: start HOC(Higher Order Component)是React中一种常见的设计模式,用于在React组件之间共享状态逻辑的一种技术。HOC本质上是一个函数,它接收一个组件作为参数,并返回一个新的组件。新的组件通过包裹原始组件,可以增强原始组件的功能。 ## HOC的优点和Mixins相比主要体现在以下几个方面: 1. **组件复用性:** HOC可以将逻辑和状态与组件分离,使得组件更加专注于UI的渲染,提高了组件的复用性。而Mixins将逻辑混入到组件内部,会使得组件的功能不够清晰,难以复用。 2. **避免命...
<template> <div class="music-list"> <h1 v-html="title" class="title"></h1> <div class="back" @click="back"> <i class="icon-back"></i> </div> <div class="bg-image" :style="bgStyle" ref="bgImage"> <div class="play-wrapper" v-show="songs.length>0" ref="playBtn" @click=""> <div class="...
import { Typography } from '@mui/material' import Link from 'next/link' import { FC, memo } from 'react' import { AiFillEye, AiOutlineComment } from 'react-icons/ai' import { Post } from '@/types' import { readingTime } from '@/utils/readingTime' import Author from '../Author' import Tag from '../PostForm/TagComposer/...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateBikerRequestsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('biker_req...
package dao import ( "context" "github.com/gin-gonic/gin" "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/logger" "gorm.io/gorm/schema" "gorm.io/plugin/dbresolver" "time" ) var _db *gorm.DB func Database(connRead, connWrite string) { var ormLogger logger.Interface if gin.Mode() == "debug" { ormLogger...
import { ReactNode, useMemo } from "react"; import { ConnectionProvider, WalletProvider, } from "@solana/wallet-adapter-react"; import { Connection } from "@solana/web3.js"; import SolanaRPCProvider from "./SolanaProvider/SolanaRPCProvider"; import { MagicProvider } from "./MagicProvider"; import ConnectWalletProvi...