text
stringlengths
184
4.48M
import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:recd/helpers/variable_keys.dart'; import 'package:recd/pages/common/shimmer_effect_widget.dart'; import 'package:shimmer/shimmer.dart'; class ImageWidget extends StatefulWidget { final String imag...
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:food_app/config/colors.dart'; import 'package:food_app/controllers/review_cart_provider.dart'; import 'package:provider/provider.dart'; class Count extends S...
import java.util.ArrayList; import java.util.List; import java.util.Scanner; class Course { private String courseCode; private String title; private String description; private int capacity; private String schedule; private int occupiedSlots; public Course(String courseCode, String title, ...
import 'dart:developer'; import 'package:chat_app/features/user/model/user_model.dart'; import 'package:chat_app/services/firestore_services.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/services.dart'; import 'package:get/get.dart'; class HomeController extends GetxController ...
import {Level} from "../level"; export type MachineGUIAction = { editorLine?: number, shiftInput?: boolean, addValueToOutput?: number, // I am not sure how this could be done different (like index: value). This worked. memory?: { index: number, value: number | undefined }[] error?: string, finished?: boo...
question link -: https://leetcode.com/problems/design-a-stack-with-increment-operation/description/ solution -: class CustomStack { private List<Integer> stk = new ArrayList<>(); private int sz; public CustomStack(int maxSize) { sz = maxSize; } public void push(int x) { if (stk...
import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; const BrandCard = ({ brand }) => { const { id, brand_name, brand_image, description } = brand; return ( <div className="flex flex-col items-center border-2 border-gray-200 md:max-w-xl"> <img classN...
// Create a stack and perform Pop, Push, and Traverse operations on the stack using a Linear Linked list #include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node *next; }; struct Node *top = NULL; void push(int value) { struct Node *new_node = (struct Node*) malloc(sizeof(struct Node));...
package annotation_example; import java.io.Serializable; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.IOException; import java.io.*; import java.util.*; class MySingleton implements Serializable { private static final MySingleton INSTANCE = new MySingleton(); private My...
from fastapi import Request from fastapi.routing import APIRouter from loopquest import schema from datetime import datetime from .crud import * from shortuuid import ShortUUID ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz" gen_short_uuid = lambda: ShortUUID(alphabet=ALPHABET).random(length=8) api_router = APIRout...
// -*- mode: c++; -*- // DESCRIPTION: Header file for Timer class // // Copyright(C) 1/24/2008 by Walt Mankowski // walt@cs.drexel.edu // // 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; eithe...
package controllers.budget; import java.io.IOException; import java.sql.Date; import java.util.List; import javax.persistence.EntityManager; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.se...
// Recursive Mathematical Functions // Notes from video /* My understanding of it There are two types: - permutation: elements can not repeat - Arrangement: elements are allowed to repeat */ // MARK: - Find the factorial of n aka (n)! // resursive verion func fact(_ n: Int) -> Int { // if n == 0 { return ...
<div class="container mx-auto pb-[200px]"> <h1 class="text-2xl text-center text-white font-bold my-8">Misiones Seguidas</h1> @if ($missions->count() == 0) <p class="text-center text-red-500 font-bold my-8 text-3xl">No sigues ninguna misión</p> @endif @foreach ($missions as $mission) <div...
package com.example.mscustomers.service.impl; import com.example.mscustomers.client.ProductServiceClient; import com.example.mscustomers.dto.enumeration.OrderStatus; import com.example.mscustomers.dto.request.OrderRequestDto; import com.example.mscustomers.dto.response.OrderResponseDto; import com.example.mscustomers....
<!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="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbu...
import { BaseAsset, ApplyAssetContext, ValidateAssetContext } from 'lisk-sdk'; import { RedeemableNFTAccountProps } from '../../../../types/core/account/profile'; import { ReplyCommentClubsProps } from '../../../../types/core/asset/redeemable_nft/reply_comment_clubs_asset'; import { ReplyAsset } from '../../../../types...
import styled from "styled-components"; import { motion } from "framer-motion"; const FilterBox = ({ tab, setTab, filterList }: FilterBoxProps) => { return ( <AsideContainer> <Ul> {filterList.map((filter) => ( <Li key={filter.id} onClick={() => setTab(filter.id)} ...
--- title: "Cricket Dashboard" runtime: shiny output: flexdashboard::flex_dashboard: orientation: rows --- ```{r} library(dplyr) library(ggplot2) odi <- read.csv(file = "D:/Data Science 2017/Manipal Academy of Data Science/MGADS TERM2/2 Data Visualization/odi-batting.csv") odi$MatchDate = as.Date(odi$MatchDate, ...
import { UseMutationResult, useMutation } from '@tanstack/react-query'; import { AxiosResponse } from 'axios'; import { createUserProfilService } from '@/services/auth'; import { queryClient } from '@/App'; function useCreateUser(): UseMutationResult<AxiosResponse<any, any>> { return useMutation({ mutationFn: cr...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateCategoryTranslationsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('ca...
#ifndef dataset #include<iostream> #include<fstream> #include<vector> #include<string> #include<sstream> #include<valarray> using namespace std; class Dataset { public: vector<vector<vector<float>>> read(string s, bool write=false, string pathToWrite="") { fstream fin; fin.open(s, ios::in); vector<...
import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:pds_route/dataHandler/appData.dart'; import 'package:pds_route/screens/search_screen.dart'; import 'package:pds_route/screens/stepper_demo.dart'; import 'package:pds_route/screens/welcome_screen.dart'; import 'pac...
#include "lists.h" /** * add_nodeint - function to add node at the beginning * @head: pointer to the first node * @n: value of the new nodes * * Return: address of new element, or NULL on failure */ listint_t *add_nodeint(listint_t **head, const int n) { listint_t *new; new = malloc(sizeof(listint_t)); if ...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { HomeComponent } from '....
// // ViewController.swift // RatingViewApp // // Created by Silvia Kuzmova on 27.01.22. // import UIKit import Combine class ViewController: UIViewController { private var subscriptions: Set<AnyCancellable> = [] private let movieRatingView: RatingView = { let ratingView = RatingView(allStars: 5,...
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:f=...
"use client"; import React from "react"; import Link from "next/link"; function Signup() { return ( <div> <body className="font-mono "> <div className="container mx-auto"> <div className="flex justify-center px-6 my-12"> <div className="w-full xl:w-3/4 lg:w-11/12 flex "> ...
using System.Text; using Application; using Application.Interfaces; using Application.Services; using Discord; using Discord.Commands; using Discord.Interactions; using Discord.WebSocket; using Hangfire; using Hangfire.PostgreSql; using Infrastructure.Configuration; using Infrastructure.Data.Contexts; using Microsoft.A...
<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"> <title>EASA FORM 1</title> <script th:include="fragments/header :: headerScripts" th:remove="tag"></script> <link rel="stylesheet" href="../static/css/style.css" th:href="@{css/style.css}"> </head> <body> ...
import { useState } from "react"; import { Button } from "../Components/Button"; import { ButtonWarming } from "../Components/Buttonwarming"; import { Heading } from "../Components/Heading"; import { Inputbox } from "../Components/Inputbox"; import { Subheading } from "../Components/Subheading"; import axios from "axio...
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <string.h> typedef struct { char iban[25]; char* titular; char moneda[4]; float sold; } ContBancar; typedef struct { ContBancar cb; struct NodLS* next; } NodLS; typedef struct { char* iban; struct NodLS2* next...
import graphviz import uuid import datetime import html import os import zipfile from selenium import webdriver from selenium.webdriver.chrome.options import Options from Crawler import Login # 受け取った連想配列から画面遷移図を作成する関数 def create_graph(associative_array, pdfimages, ORIGIN, SCANID, ScreenTitle): # rankdirは遷移図のデザインで...
<mat-card class="product"> <img mat-card-xl-image [src]="product.image || '/assets/landscape-placeholder.svg'" class="product-img" /> <mat-card-header> <mat-card-title-group> <mat-card-title> <span style="font-size: 2rem">{{ product.name }}</span> / <small> <b>{{ pr...
import numpy as np import matplotlib.pyplot as plt # 定义网格范围和步长 x = np.linspace(-5, 5, 400) y = np.linspace(-5, 5, 400) X, Y = np.meshgrid(x, y) # 定义不同的 a 值 a_values = [1, 4, 8, 12] # 计算所有图像的最大最小值,以确定统一的颜色范围 z_min = min(np.min(a * (X**2 + Y**2)) for a in a_values) z_max = max(np.max(a * (X**2 + Y**2)) for a in a_valu...
"use client"; import React, { useEffect, useRef } from 'react'; const AudioListener = () => { const socket = useRef(null); const audioRef = useRef(new Audio()); useEffect(() => { // Initialize WebSocket connection socket.current = new WebSocket('ws://localhost:3001'); socket.current.onopen = () =>...
import 'package:flutter/material.dart'; class MyTextField extends StatelessWidget { final String hintText; final IconData icon; final TextEditingController controller; const MyTextField({ super.key, required this.controller, required this.hintText, required this.icon }); @override Widge...
//import module const express = require('express'); const app = express(); const path = require('path'); const dotenv = require('dotenv'); const session = require('express-session'); //import file const db = require('./config/mongoose'); const passport = require('passport'); const passportLocal = require('./config/pas...
use std::path::Path; use tempfile::NamedTempFile; use super::*; #[test] fn adds_keys() { let encrypted_temp_file = encrypted_tempfile(); add_age_key_command(encrypted_temp_file.path()); let updated_rops_file = updated_rops_file(encrypted_temp_file.path()); assert_eq!(2, updated_rops_file.metadata()....
******** Ex 3, Task 2: Create a timer job definition ******** ******** Step 6 ******** public ContosoExpensesOverviewTimerJob() { } ******** Ex 3, Task 2: Create a timer job definition ******** ******** Step 7 ******** public ContosoExpensesOverviewTimerJob(string name, SPWebApplication webApplication, SPServer serv...
pub mod outlook { use anyhow::{ anyhow, Context }; use windows::{ core::{ HSTRING, BSTR, PCWSTR, GUID, VARIANT }, Win32::System::{ Com::{ DISPATCH_PROPERTYPUT, DISPATCH_METHOD, CLSCTX_LOCAL_SERVER, DISPATCH_PROPERTYGET, ...
<!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> <script src="../vue.js"></script> </head> <body> <div id="app"> <div>{{ms...
import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faFacebook, faTwitter } from '@fortawesome/free-brands-svg-icons'; import { faEnvelope } from '@fortawesome/free-solid-svg-icons'; import salir from "../../public/imagenes/salir.png" const ShareModal = ({ producto, on...
"use client"; import React from "react"; import { Box, Typography } from "@mui/material"; import Image from "next/image"; import AboutUsImage from "../../../../public/Assets/HomePage/AboutUsImage.png"; import AboutUsShoeImage from "../../../../public/Assets/HomePage/AboutUsShoeImage.png"; import { AboutUsCarouseldata }...
/* eslint-disable react-hooks/exhaustive-deps */ // eslint-disable-next-line no-unused-vars import React from 'react'; import { useState, useEffect } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; import Swal from 'sweetalert2'; import { useDispatch, useSelector } from 'react-redux'; import {...
const express = require("express"); const router = express.Router(); const bcrypt = require("bcrypt"); const jwt = require("jsonwebtoken"); require("dotenv").config(); const User = require("../../models/User"); const Review = require("../../models/Review"); const Order = require("../../models/Order"); router.get("/te...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ansible.module_utils.basic import AnsibleModule __metaclass__ = type DOCUMENTATION = ''' --- module: dedicated_server_info short_description: Retrieve all info for a OVH dedicated server description: ...
import React from "react" import {InputNoIcon, InputIcon} from "./components/Input/Input" import "./Form.module.css" import {ButtonNavigate, ButtonSubmit } from "./components/Button/Button" import icoUser from "../img/svg/icoUser.svg" import icoEmail from "../img/svg/icoEmail.svg" import icoPassword from "../img/svg/ic...
import {MatchData} from "./MatchData" import { WinsAnalysis } from './analyzers/WinsAnalysis' import { HtmlReport } from './reportTargets/HtmlReports' export interface Analyzer { run(matches: MatchData[]):string } export interface OutputTarget { print(report: string): void; } export class Summary { const...
import { useState } from 'react'; import { ButtonCrement } from 'components/ButtonCrement/ButtonCrement'; import { addWorckDay } from 'service/api'; import { FormContainer, Input, ButtonDrupContainer, Buttons, } from './AddLessons.styled'; export const AddLessons = ({ pushNewWorckEl }) => { const [individua...
<?php /** @var yii\web\View $this */ use yii\helpers\Url; use app\assets\fullcalendar\FullCalendarAsset; use app\modules\meeting\assets\MeetingAsset; use kartik\date\DatePicker; FullCalendarAsset::register($this); MeetingAsset::register($this); $this->title = 'По месту проведения'; $this->params['breadcrumbs'][] = $...
// 约束class的类型 { class Person { protected name: string; public age: number; protected info(): string { return `${this.name}的年龄是${this.age}`; } } class User extends Person { // public 表示属性公开 protected 表示属性保护 外部无法访问 constructor(n: string, a: number) ...
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION") package io.cloudshiftdev.awscdk.services.xray import io.cloudshiftdev.awscdk.CfnResource import io.cloudshiftdev.awscdk.IInspectable import io...
/* ! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com */ /* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) */ *, ::before, ...
import 'package:contact_bud/Pages/addNewUser.dart'; import 'package:motion_toast/motion_toast.dart'; import 'DB/db_connec.dart'; import 'Pages/EditUser.dart'; import 'Pages/ViewContact.dart'; import 'package:contact_bud/Services/services.dart'; import 'package:flutter/material.dart'; import 'models/AddUser.dart'; voi...
package get import ( "fmt" "github.com/MakeNowJust/heredoc" "github.com/spf13/cobra" "github.com/algolia/cli/api/crawler" "github.com/algolia/cli/pkg/cmdutil" "github.com/algolia/cli/pkg/config" "github.com/algolia/cli/pkg/iostreams" ) type GetOptions struct { Config config.IConfig IO *iostreams.IOStre...
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:flutter_application_1/resources/components/setuptextfields.dart'; import 'package:flutter_application_1/serivces/firestore/userdetails.dart'; import 'package:flutter_application_1/serivces/firestore/userpost.d...
// Numeric Enums /** * Create a defiend set of named integer values that can be used as a type */ var Day; (function (Day) { Day[Day["Sunday"] = 0] = "Sunday"; Day[Day["Monday"] = 1] = "Monday"; Day[Day["Tuesday"] = 2] = "Tuesday"; Day[Day["Wednesday"] = 3] = "Wednesday"; Day[Day["Thursday"] = 4] ...
import uuid from typing import Optional from pydantic import BaseModel class SpeciesResult(BaseModel): id: int species_name: str latin_name: Optional[str] class SiteResult(BaseModel): id: uuid.UUID top_tier_site: str site_parent_name: str site_name: str geo_water_body: str class S...
library(shiny) library(tidyverse) library(lubridate) library(tidyr) library(shinythemes) library(glue) bike_unzip <- unzip('week10_biketown.zip') bike <- read_csv(bike_unzip) bike[c('code', 'bike_name')] <- str_split_fixed(bike$BikeName, ' ', 2) bike[c('BikeName2', 'info')] <- str_split_fixed(bike$bike_name, '-', 2) b...
# Copyright 2023 Nod Labs, Inc # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception from typing import Optional, cast from iree.compiler.ir import ( InsertionPoint, Operation, ...
"use client"; import React, { useEffect, useState } from "react"; import { Card } from "@/components"; import useMovies from "@/hooks/useMovies"; import { Button, FavoritePopUp } from "@/components"; import { useFaveContext } from "@/providers/favoritesProvider"; import { MovieProps } from "@/interfaces"; const Home ...
package com.nhat.demoSpringbooRestApi.services.impl; import com.nhat.demoSpringbooRestApi.dtos.CategoryRequestDTO; import com.nhat.demoSpringbooRestApi.exceptions.ResourceNotFoundException; import com.nhat.demoSpringbooRestApi.models.Category; import com.nhat.demoSpringbooRestApi.repositories.CategoryRepo; import com....
local hyperFurnace = table.deepcopy(data.raw["item"]["electric-furnace"]) hyperFurnace.name = "hyper-furnace" hyperFurnace.place_result = "hyper-furnace" hyperFurnace.icons = { { icon_size = 64, icon = "__FactorioEndgameProduction__/graphics/item_hyperFurnace_image.png" }, } local placeableHyperFurnace = ...
import 'package:flutter/material.dart'; import 'package:san_na_ko/screens/tabs/maintenance_tab.dart'; import 'package:san_na_ko/screens/tabs/profile_tab.dart'; import 'package:san_na_ko/screens/tabs/schedule_tab.dart'; import 'package:flutter/cupertino.dart'; class MainPage extends StatelessWidget { const MainPage({...
package model_test import ( "encoding/hex" "fmt" "testing" "github.com/landru29/adsb1090/internal/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestSurfacePosition(t *testing.T) { t.Parallel() for idx, fixtureElt := range []struct { input string grou...
--- import BaseHead from "../../components/BaseHead.astro"; import Header from "../../components/Header.astro"; import { SITE_TITLE, SITE_DESCRIPTION } from "../../consts"; import { getCollection } from "astro:content"; import FormattedDate from "../../components/FormattedDate.astro"; const posts = (await getCollectio...
#ifndef _IResourceManager_H #define _IResourceManager_H #include <FBCore/FBCorePrerequisites.h> #include <FBCore/Interface/Memory/ISharedObject.h> #include <FBCore/Core/StringTypes.h> #include <FBCore/Core/UtilityTypes.h> namespace fb { /** Interface for a resource manager. */ class IResourceManager : public...
import React from 'react'; import { Image, Text, View, StyleSheet, FlatList } from 'react-native'; import { } from '../ScreenStylings/MainStylings'; import { Container, UserImage, UserImageWrapper, UserInfo, Card, UserInfoText, UserName, MessageContents, TextSection } from '../ScreenStylings/ChatsStyles'; import spotl...
import { Button, Text, TextArea, TextInput } from '@xunito-ui/react' import { ConfirmForm, FormActions, FormError, FormHeader } from './styles' import { CalendarBlank, Clock } from 'phosphor-react' import { z } from 'zod' import { useForm } from 'react-hook-form' import { zodResolver } from '@hookform/resolvers/zod' im...
#include <Arduino.h> #include <WiFi.h> #include <WiFiClient.h> #include <HTTPClient.h> #if CONFIG_FREERTOS_UNICORE static const BaseType_t app_cpu = 0; #else static const BaseType_t app_cpu = 1; #endif const char *ssid = "AFTERMATH"; const char *password = "YLLEQGQG72F"; static const int LED_PIN = LED_BUILTIN; static...
import { Component, OnInit } from '@angular/core'; import { MenubarModule, MenuItem } from 'primeng/primeng'; @Component({ selector: 'app-toolbat', templateUrl: './toolbat.component.html', styleUrls: ['./toolbat.component.scss'] }) export class ToolbatComponent implements OnInit { constructor() { } items: M...
import Camera from "ts/Camera"; import Canvas from "ts/Canvas"; import CanvasPainter from "ts/CanvasPainter"; import Color from "ts/Color"; import Constants from "ts/Constants"; import Matrix from "ts/Matrix"; import Point from "ts/Point"; import Ray from "ts/Ray"; import Sphere from "ts/shapes/Sphere"; import World fr...
'use strict'; import chalk from 'chalk'; import { pluralize } from 'jest-util'; export function getSnapshotStatus( snapshot: { added: number; updated: number; unmatched: number; unchecked: number; uncheckedKeys: string[]; fileDeleted: boolean; }, afterUpdate: boolean ): string[] { /** ...
import {StyleSheet, Dimensions} from 'react-native'; import React from 'react'; import { makeObservable, action, observable, computed, comparer, reaction, runInAction} from 'mobx'; import AsyncStorage from '@react-native-community/async-storage'; import {makePersistable, getPersistedStore} from 'mobx-persist-store'; c...
package src.other; import static org.junit.jupiter.api.Assertions.assertEquals; import static src.other.StripTags.solveWithLoop; import static src.other.StripTags.solveWithRegex; import org.junit.jupiter.api.Test; /** * Create a function called stripTags that takes a string as input and removes all HTML tags from i...
# Features This section details all the app's existing features and behaviors. <note> <p> Some features are only available on mobile and will be marked <a href="FAQ.md#tv-features-faq"><emphasis>(Mobile only)</emphasis></a>. </p> </note> ## Adding tunnel configs There are multiple ways tunnel confi...
package com.lyvetech.transnature.features.feed.data.local.dao import androidx.arch.core.executor.testing.InstantTaskExecutorRule import androidx.room.Room import androidx.test.core.app.ApplicationProvider import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.lyvetech.tr...
<!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>Instagram Clone</title> <link rel="stylesheet" href="style.css"> <link href="https://cdn.jsdelivr.net...
## 引导过程介绍 我们的FarmOS使用OpenSBI作为BIOS引导程序。OpenSBI的主要功能就是在M态初始化硬件,然后以S态跳转到内核的位置,完成整个启动过程。此外,OpenSBI作为S态内核的执行环境(EEI),可以以 `ecall` 的方式为S态内核提供一些只有M态才能实现的功能。 ### OpenSBI的引导过程 OpenSBI会先做初始化,然后以 **S 态**跳转到编译时指定的位置(默认为`0x80200000`),并将Hartid、设备树地址分别放在`a0`、`a1`中传递给OS。如下所示: ![image-20230501203900943](./assets/image-20230501203900...
#pragma once #include <stdbool.h> #include "session.h" typedef enum { CELL_EMPTY, CELL_BEEPER, CELL_ENERGIZER } CellType; typedef struct { bool exists; bool is_vertical; } WallState; typedef struct { int label_pos_x, label_pos_y; int beepers_count; int width, height; CellTy...
import cv2 import mediapipe as mp import math from pyfirmata import Arduino, SERVO # Connect to Arduino board = Arduino('com10') # Replace '/dev/ttyUSB0' with the serial port of your Arduino # Define servo pins servo_pin_x = 8 # Example pin for horizontal servo servo_pin_y = 10 # Example pin for vertical servo # ...
import { z } from "zod"; export const createLinkFormSchema = z.object({ target: z.string().url({ message: "target needs to be a valid URL", }), slug: z .string() .min(2, { message: "slug has to be longer than 2 characters", }) .max(128, { message: "slug has to be shorter than 128 ...
import { createStore } from "zustand/vanilla"; import { type User } from "@/types"; // Modal types export enum ModalType { addUser = "AddUser", editUser = "EditUser", } // Data for the modal export interface ModalData { user?: User; } // Modal state export type ModalState = { type: ModalType | null; isOpe...
<!DOCTYPE html> <meta charset="utf-8"> <html> <head> <title>Cities I've Been To</title> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> <!--[if lte IE 8]> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /> <![endif]--> <script src="...
import React from 'react'; import {fireEvent, render, waitFor} from '@testing-library/react-native'; import App from '../App'; import 'jest-fetch-mock'; import {Hotels} from '../__mocks__/Hotel'; describe('App', () => { it('renders correctly', async () => { fetchMock.mockOnce(JSON.stringify(Hotels)); const a...
// COPYRIGHT DASSAULT SYSTEMES 2016 // // Usage notes: // // Forked from CATCrvLengths 11/16 to support more measures // Simplified interface to support CATBodyFromLengthOnWire reqs. #ifndef CATCrvMeasures_H #define CATCrvMeasures_H // ExportedBy #include "Y30UIUTI.h" // Base class #include "CATGeoOpe...
package br.com.adatask.service.impl; import br.com.adatask.domain.BaseTask; import br.com.adatask.repository.Repository; import br.com.adatask.service.Service; import java.lang.reflect.InvocationTargetException; import java.util.List; public class ServiceImpl implements Service { private final Repository<BaseTas...
import 'dart:convert'; import 'package:flut_api/network/network_enums.dart'; import 'package:flut_api/network/network_typedef.dart'; import 'package:http/http.dart' as http; class NetworkHelper{ const NetworkHelper._(); static String concatUrlQP(String url, Map<String, String>? queryParameters) { if (url.isE...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>회원가입</title> <style> .input{width: 150px;} </style> </head> <body> <h2>Practice3</h2> <form> <fieldset> <legend>회원가입</legend> <label for="id">아이디 : </label><input type="text" id="id" class="input" onkeyup="checkId();"> <span id="existId"></span><...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Character.cpp :+: :+: :+: ...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AngularFireModule } from '@angular/fire/compat'; import { AngularFireAuthModule } from '@angular/fire/compat/auth'; import { AngularFirestoreModule } fro...
package main import ( "bufio" "encoding/binary" "fmt" "io/ioutil" "log" "os" "strings" ) func main() { // Get image path from user fmt.Print("Enter the image path: ") scanner := bufio.NewScanner(os.Stdin) scanner.Scan() imagePath := scanner.Text() // Read image file into byte slice data, err := ioutil....
// // MovieDBAPI.m // MovieDB in Objective-C // // Created by Diego Henrique on 24/03/22. // // #import "MovieDBAPI.h" @interface MovieDBAPI () @end @implementation MovieDBAPI - (void)requestGenres: (void (^)(NSDictionary *, NSError *))completion { NSURLSession *session = [NSURLSession sharedSession]; NSU...
# Title: 2023 Advent of Code -- Day 1 Part 1: Trebuchet?! # Author: Roshan Darji # Date: 2023-12-09 import numpy as np def parse_string(string): # Extract first and last digit from string first_digit = next(char for char in string if char.isdigit()) last_digit = next(char for char in reversed(str...
# Me Meo :doctype: book :docname: Me Meo :author: Paula Pousa y Jorge Sol :revdate: {localdate} :imagesdir: {docdir}/images :toc: left :toclevels: 5 :pdf-theme: themes/my-theme.yml ## Funcionalidades ### ¿En qué Consiste la Aplicación? Nuestra aplicación, apodada *Me Meo* es una aplicación móvil que muestra los cua...
# Vistas y Disparadores ## Vistas ### Horizontal Esta vista muestra todos los datos de los rescatistas, contactos y derrumbes en una fila para cada registro de derrumbe. ```sql CREATE VIEW Vista_Horizontal AS SELECT Rescatista.Nombre AS Nombre_Rescatista, Rescatista.Telefono AS Telefono_Rescatista, Contacto.Nomb...
package com.nbr.trp.agent.entity; import com.nbr.trp.common.entity.Address; import com.nbr.trp.common.entity.BankInformationDetails; import com.nbr.trp.user.entity.Role; import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.hibernate.annotations.CreationT...
// // AddView.swift // TodoApp // // Created by Anderson Vanzo on 25/03/23. // import SwiftUI struct AddView: View { @Environment(\.presentationMode) var presentationMode @EnvironmentObject var listViewModel: ListViewModel @State var textFieldText: String = "" @State var alertTitle: String = "" @State v...
import qs from "qs"; import type { StripeElementLocale } from "@stripe/stripe-js"; import { createContext, useContext, useState, useEffect, useCallback, } from "react"; import { APPEARANCE_OPTIONS } from "../constants/appearanceOptions"; import { PAYMENT_ELEMENT_CONFIGS } from "../pages/sample/payment-elemen...