text
stringlengths
184
4.48M
public class Member { // Attributes private int memberID; // member id private String name; // member name private String surname; // member surname private double height; // member height private double weight; // member weight // Constructor method public Member(int memberID, String name, String surna...
import React from "react"; import PropTypes from "prop-types"; import { Label } from "../Label"; import { Input } from "../Input"; import { HelpText } from "../HelpText"; import type { InputProps } from "../Input"; import { Box } from "../../primitives/Box"; export interface FormInputProps extends Omit< InputPro...
import { ApplicationType } from '../../src/sources/types/index.js'; import { IHackerOneProgram, IHackerOneProgramScopeEntry, parseOutOfScope, parseProgram, parseScope, } from '../../src/sources/hackerone/hackerOneProgramParser.js'; describe('parseProgram', () => { it('parses program', () => { ...
import * as fs from 'fs' import { type AddressInfo } from 'net' import * as path from 'path' import t from 'tap' import { createFastify } from './createFastify' import { request, requestJSON } from './request' import FormData = require('form-data') const filePath = path.join(__dirname, '../package.json') t.plan(1) t....
/* eslint-disable react/prop-types */ import "./CurrentWeather.css"; const CurrentWeather = ({ data, unit }) => { if (!data) { return <p>No Data Available</p>; } if (data?.message) { return ( <> <p className="errorMessage">{data?.message}</p> </> ); } const windDirection = ge...
import { useState, useEffect } from 'react'; /** * Create a new React state and subscribed to localStorage updates * * @param {string} itemKey * @param {string} initialValue * @returns {[string, React.Dispatch<React.SetStateAction<string>>]} */ export const useLocalStoredState = (itemKey, initialValue = '') => {...
from collections import deque class PathFinding: """Class creating instances of pathfinding behaviors Essentially how the enemy tracks player.""" def __init__(self, game): """Initialises attributes used in pathfinding methods.""" self.game = game self.map = game.map.mini_map s...
import { useEffect, useState } from "react"; import Avatar from "@mui/material/Avatar"; import Button from "@mui/material/Button"; import CssBaseline from "@mui/material/CssBaseline"; import TextField from "@mui/material/TextField"; import Grid from "@mui/material/Grid"; import Box from "@mui/material/Box"; import Typo...
import { Controller, Get, Post, Body, Patch, Param, Delete, HttpCode, HttpStatus, } from '@nestjs/common'; import { ProductsService } from './products.service'; import { CreateProductDto, GetProductListDto, ProductDto, UpdateProductDto, } from './dto'; import { ApiTags, ApiOperation, Api...
import { RedirectParams } from './utils'; class Popup { private window: Window | null; private id: string; constructor(public url: string, state: string) { this.id = state; } public open(): void { const windowFeatures = getWindowFeatures(); this.window = window.open(this.url, '_blank', windowFea...
package com.diandong.domain.po; import com.baomidou.mybatisplus.annotation.*; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.experimental.Accessors; import java.io.Serializable; import java.time.LocalDateTime; /** * 菜品营养信息PO实体类 * * @author...
import mongoose from "mongoose"; import { User } from "../models/user.model"; import ApiError from "../utils/Apierror"; import { asynchandler } from "../utils/ascynchandler"; import APiresponse from "../utils/ApiResponse"; import { uploadOnCloudinary } from "../utils/cloudinary"; import { Video } from "../models/video....
import React from 'react'; import styled from "styled-components"; import SearchIcon from '@mui/icons-material/Search'; import Badge from "@mui/material/Badge"; import Avatar from '@mui/material/Avatar'; import ShoppingCartIcon from '@mui/icons-material/ShoppingCart'; import {mobile} from "../responsive"; import {Link}...
import { expect, describe, it, beforeAll } from "vitest"; import { fakeAdminModel } from "../../_mocks/fake-admin.model"; import { AdminRepository } from "../admin.repository"; import { fakeAdmin } from "../../_mocks/fake-admin"; import { fakeUserModel } from "../../../user/_mocks/fake-user.model"; import { fakeUser } ...
import "express-async-errors" import express from "express" import { handlerError } from "./error" import userRouter from "./routes/user.routes" import productRouter from "./routes/product.routes" import cartRouter from "./routes/cart.routes" import cors from "cors" import helmet from "helmet" import swaggerUi from "sw...
# Move photo files Organize your jumbled photo files by date. ``` /Multimedia /Camera\ Uploads ... source folder ... /Photo/ ... destination /2024-01/ ... ``` The shooting date is obtained from EXIF.<br> That's why I'm using the Pillow library. ## Table of Contents <!-- omit in toc --> - [Move p...
describe Installer do subject { described_class.new program: program, script_path: script_path } let(:leeway) { RUBY_VERSION < '3.2.0' ? 0 : 3 } let(:program) { 'completely-test' } let(:script_path) { 'completions.bash' } let(:targets) { subject.target_directories.map { |dir| "#{dir}/#{program}" } } let(:i...
import React, { useEffect } from 'react' import { shallowEqual, useSelector } from 'react-redux'; import { useBlogCtx } from '../../features/context/providers/Blog/BlogProvider'; import Card from '../../components/Blog/Card'; import { Link } from 'react-router-dom'; export default function Blog() { const { getBlog...
import pandas as pd from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import accuracy_score from sklearn.preprocessing import LabelEncoder import streamlit as st # Charger les données data = pd.read_csv('Expresso_churn_dataset (1).csv') # Exp...
## DESCRIPTION ## Double Integral in Polar Coordinates ## ENDDESCRIPTION ## KEYWORDS('Multiple Integral', 'Polar Coordinates') ## Tagged by nhamblet ## DBsubject('Calculus') ## DBchapter('Multiple Integrals') ## DBsection('Double Integrals in Polar Coordinates') ## Date('6/2/2000') ## Author('Joseph Neisendorfer') ...
// Copyright 2021 The Brave Authors. All rights reserved. // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import SwiftUI public struct BraveButtonSize { public va...
// for, while => ~동안: 반복문 // i라는 변수는 0부터 시작할거야 // i라는 변수가 10에 도달하기 전까지 계속할거야 // i라는 변수는 한 사이클이 돌고 나면 1을 더할거야 // for (let i = 0; i < 10; i++) { // console.log(i); // } // 배열과 for문은 짝꿍이다. // const arr = ["one", "two", "three", "four", "five"]; // for (let i = 0; i < arr.length; i++) { // console.log(i); // conso...
# -*- coding: utf-8 -*- """ @Time : 2023/8/28 @Author : mashenquan @File : openai.py @Desc : mashenquan, 2023/8/28. Separate the `CostManager` class to support user-level cost accounting. """ import re from typing import NamedTuple from pydantic import BaseModel from metagpt.logs import logger from metagpt...
import { Link, useParams } from 'react-router-dom' import { FaArrowLeft } from 'react-icons/fa' import axios from 'axios' import { useEffect, useState, useCallback } from 'react' import { FaYoutube } from 'react-icons/fa' const url = `https://www.themealdb.com/api/json/v1/1/lookup.php?i=` const SingleRecipe = () => {...
import { createSlice, PayloadAction, Middleware } from "@reduxjs/toolkit"; import type { RootState } from "@/store/store"; import { v4 as uuidv4 } from "uuid"; export interface ITasksState { id?: string; name: string; description?: string; active?: boolean; createdAt?: string; updatedAt?: string; } const ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on 2017年12月23日 @author: Irony @site: https://pyqt.site , https://github.com/PyQt5 @email: 892768447@qq.com @file: ShowImage @description: """ import sys try: from PyQt5.QtCore import QResource from PyQt5.QtGui import QPixmap, QMovie from PyQt5.QtW...
import React, { useEffect, useState } from 'react'; import { AppBar, Badge, Box, IconButton, Toolbar, Typography } from '@mui/material'; import { Link } from 'react-router-dom'; import ShopIcon from '@mui/icons-material/Shop'; import ShoppingCartIcon from '@mui/icons-material/ShoppingCart'; import { useCookies } from '...
import { black, grey, lightBlue, lightGrey, primaryColour, textColour, textSubColour, white, } from 'src/styles/variables' const theme = { space: [], colors: { primary: `${primaryColour} !important`, secondary: '', lightGrey: `${lightGrey} !important`, grey: `${grey} !important`, ...
<mat-card-content> <form [formGroup]="customerForm" [class.error]="!customerForm.valid && customerForm.touched"> <div fxLayout="row" fxLayoutAlign="center"> <mat-checkbox class="example-margin" [formControl]="selected" id="selected">Selected</mat-checkbox> </div> <ul class="items"> <li> ...
#include <fluidsynth.h> #include "m_pd.h" static t_class *fluid_tilde_class; typedef struct _fluid_tilde { t_object x_obj; fluid_synth_t *x_synth; fluid_settings_t *x_settings; t_outlet *x_out_left; t_outlet *x_out_right; } t_fluid_tilde; t_int *fluid_tilde_perform(t_int *w) { t_fluid_til...
/*! HTML5 Boilerplate v7.3.0 | MIT License | https://html5boilerplate.com/ */ /* main.css 2.0.0 | MIT License | https://github.com/h5bp/main.css#readme */ /* * What follows is the result of much research on cross-browser styling. * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, * Kroc Camen,...
import {Component, EventEmitter, Input, OnChanges, Output} from '@angular/core'; import {HelpOptionModel} from '../../../models/help-option-model'; import {HelpTypeEnum} from '../../../enums/help-type-enum'; @Component({ selector: 'app-help', templateUrl: './help.component.html', ...
# SUMMARY - [Welcome 欢迎](README.md) ## 技术 - [八股]() - [Transformer 细节八股](/docs/nlp/models/transformers/Transformer中的细节.md) - [T5 八股](/docs/nlp/models/transformers/t5/T5.md) - [开源LLM八股](/docs/llm/开源LLM总结.md) - [大模型优化八股](/docs/llm/大模型优化方法概览.md) - [Neural Network 神经网络](/docs/nn) - [Initialization 初始化](/docs/nn...
import { CommandBytes, STX } from "./OpticonWrapper"; import { appendCRC2 } from "./crcCalculation"; import { parseBarcode } from "./parseBarcode"; export const getData = async (port: SerialPort) => { const writer = port.writable.getWriter(); const message = appendCRC2([CommandBytes.UploadBarcodeData, STX, 0])...
// Copyright (c) 2021-2023 ChilliBits. All rights reserved. #pragma once #include <utility> #include <model/GenericType.h> #include <symboltablebuilder/SymbolType.h> #include <symboltablebuilder/TypeSpecifiers.h> namespace spice::compiler { // Forward declarations class ASTNode; struct CodeLoc; class SymbolTableEn...
# TeamStatus LED Controller ## Overview This Python script provides a practical solution for integrating Microsoft Teams' online status with an IO-Link Master (TURCK TBEN-S2-4IOL) to control an RGB LED (BANNER K50L2). The goal is to represent Microsoft Teams' user statuses through the color of the LED, creating a vis...
import React, { useState } from "react"; import axios from '../../../utils/axios' import { signUpPost } from "../../../utils/Constant"; import { useNavigate } from "react-router-dom"; import Swal from "sweetalert2"; export default function RegisterForm() { const navigate = useNavigate(); const [inputs, setInput...
/* This code defines a React component called "Dashboard". It imports various components related to financial information and components for a stock company, such as Profile, BalanceSheet, Ratings, Holders, PriceGraph, and IncomeStatement. It also imports the Navbar and Footer components. */ // React imports import {...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>jQuery EasyUI</title> <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css"> <link rel="stylesheet" type=...
import { useMutation } from "@apollo/client"; import { Modal } from "antd"; import { useRouter } from "next/router"; import { ChangeEvent, useState } from "react"; // import { useRecoilState } from "recoil"; // import { isEditState } from "../../../../commons/libraries/store"; import { IMutation, IMutationCreateBoa...
from django.http import HttpResponse, HttpResponseNotFound from django.shortcuts import render, redirect, get_object_or_404 from .models import Women, Category, TagPost menu = [ {"title": "О сайте", "url_name": "about"}, {"title": "Добавить статью", "url_name": "add_page"}, {"title": "Обратная связь", "ur...
import { Component, Input, OnInit } from '@angular/core'; import { Router } from '@angular/router'; @Component({ selector: 'app-loading-spinner', templateUrl: './loading-spinner.component.html', styleUrls: ['./loading-spinner.component.scss'] }) export class LoadingSpinnerComponent { loaded = [0]; loading!: ...
/* CTK - The GIMP Toolkit * testprint.c: Print example * Copyright (C) 2006, Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (...
import { createUnionType, Field, ID, ObjectType, registerEnumType, } from 'type-graphql'; import { Shruti } from '#lib/models/Shruti/gql'; import { Sthayi } from '#lib/models/Sthayi/gql'; import { BlockType, ContinueBlock as ContinueBlockModel, NoteBlock as NoteBlockModel, UndefinedBlock as Undefine...
#!/usr/bin/env python import os try: from http import server # Python 3 except ImportError: import SimpleHTTPServer as server # Python 2 # https://gist.github.com/shivakar/82ac5c9cb17c95500db1906600e5e1ea class RangeHTTPRequestHandler(server.SimpleHTTPRequestHandler): """RangeHTTPRequestHandler is a Simpl...
// We require the Hardhat Runtime Environment explicitly here. This is optional // but useful for running the script in a standalone fashion through `node <script>`. // When running the script with `hardhat run <script>` you'll find the Hardhat // Runtime Environment's members available in the global scope. import { et...
mod app_tests; mod authentication; mod routes; pub mod state; mod templates; mod web_result; use authentication::{session_middleware, token_middleware}; use routes::*; use state::DogState; pub use templates::load_templates; use axum::{ handler::HandlerWithoutStateExt, middleware::from_fn_with_state, routi...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4...
import userEvent from '@testing-library/user-event'; import React from 'react' import PregledService from '../services/PregledService'; import PacijentHeader from './PacijentHeader'; class PregledComponent extends React.Component { constructor(props) { super(props); this.state = { pregl...
// rest parameters // transforma o parâmetro de uma função em um array // é útil para quando a gente não sabe quantos parâmetros vamos passar na função // o exemplo é uma função de soma: const sum = (...numbers) => numbers.reduce((acc, item)=> acc + item, 0) // crio uma função que faz uma soma // como não sei quantos ...
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>Insert Your Title</title> <style> label { display: block; ...
use serde::ser::{Serialize, Serializer, SerializeStruct}; #[derive(Clone)] pub enum TaskStatus { DONE, PENDING } impl TaskStatus { pub fn stringify(&self) -> String { match &self { &Self::DONE => {"DONE".to_string()}, &Self::PENDING => {"PENDING".to_string()} } ...
<?php namespace Jigoshop\Factory; use Jigoshop\Core\Messages; use Jigoshop\Core\Options; use Jigoshop\Core\Types; use Jigoshop\Entity\Customer as CustomerEntity; use Jigoshop\Entity\Customer\CompanyAddress; use Jigoshop\Entity\Order as Entity; use Jigoshop\Entity\OrderInterface; use Jigoshop\Entity\Product as Product...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_mar...
"use client"; // hooks import { useState } from "react"; import { useForm } from "react-hook-form"; // contexts import GenerateImageContext from "../.."; // zood import { zodResolver } from "@hookform/resolvers/zod"; import * as z from "zod"; // interfaces import { imageFormSchema } from "@/app/[locale]/(dashboard...
<?php // $Id: preflang.module, v 0.001 2006-02-09 21:13:39 unconed Exp $ /** * @file * A simple module 2 collect info from WhatCounts campaign 0602. * * Our example node type will allow users to specify a "color" and a "quantity" * for their nodes; some kind of rudimentary inventory-tracking system, perhaps? * T...
<?php namespace Codexpert\CoDesigner; use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Group_Control_Border; use Elementor\Group_Control_Typography; use Codexpert\CoDesigner\App\Controls\Group_Control_Gradient_Text; use Elementor\Core\Kits\Documents\Tabs\Global_Typography; class Order_Review e...
<?xml version="1.0" ?> <!DOCTYPE article PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [ <!ENTITY % addindex "IGNORE"> <!ENTITY % Catalan "INCLUDE" ><!-- change language only here --> ]> <article id="kgamma" lang="&language;"> <title >Gamma del monitor</title> <articleinfo> <au...
import { ec } from "elliptic"; import SHA256 from "crypto-js/sha256"; const ecObject = new ec("secp256k1"); class Transaction { fromAddress: string | null; toAddress: string; amount: number; signature: string | null = null; constructor(fromAddress: string | null, toAddress: string, amount: number) { th...
<!-- * @Author: TerryMin * @Date: 2022-09-02 13:40:10 * @LastEditors: TerryMin * @LastEditTime: 2022-09-10 14:56:19 * @Description: https://blog.csdn.net/mafan121/article/details/78519348 --> <html> <head> <title>JS 获取光标位置概念 及demo</title> <style> p { display: flex; flex-direction: r...
<!-- Top anchor --> <a name="readme-top"></a> <!-- PROJECT SHIELDS --> <!-- *** I'm using markdown "reference style" links for readability. *** Reference links are enclosed in brackets [ ] instead of parentheses ( ). *** See the bottom of this document for the declaration of the reference variables *** for contributor...
package com.ibm.academy.microservices.entities; import java.io.Serializable; import java.util.Date; import java.util.List; import java.util.Objects; import java.util.Set; import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; import javax.persistence....
<template> <v-container id="regular-tables" fluid tag="section"> <section class="mb-12 text-center"> <h1 class="font-weight-light mb-2 headline" v-text="`Daftar Event`" /> <span class="font-weight-light subtitle-1"> Table Daftar Event </span> </section> <div class="py-3" /> <material-car...
--- title: "12-5 LASSO Regression" output: pdf_document --- This markdown file contains the R codes for the Video: **12-5 LASSO Regression**. We have shown the slide number associated with each chunk of code for easy reference. In this video, we will continue to work with the `boston_housing_price` data set. Before p...
<?php namespace Drupal\Core\Entity; use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; /** * Provides a repository for installed entity definitions. */ class EntityLastInstalledSche...
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'car_data.dart'; import 'car_detailed.dart'; class CarManageScreen extends StatefulWidget { @override _CarManageScreenState createState() => _CarManageScreenState...
package todo.list.entities; import java.io.Serializable; import java.util.Date; import java.util.List; import jakarta.persistence.CascadeType; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.pers...
let shopingBag = []; let amountTotal = 0; const shopingBagDiv = document.getElementById("shoping-bag"); const bagItemCount = document.querySelectorAll(".bag-item-count"); const allTotalAmount = document.getElementById("all-total-amount"); // quentity increment const itemIncrement = (id, name, quantity, price, totalPri...
import Vapor enum ParameterError: Swift.Error { case invalidRange(min: Int, max: Int) } struct RandomIntQuery: Content { let min: Int let max: Int var result: Int { get throws { guard min <= max else { throw ParameterError.invalidRange(min: min, max: max) ...
/** String matching: If we want to to match against a general pattern in a string - All emails ending in '@gmail.com' - All names that begin with 'A' The LIKE operator allows us to perform pattern matching against string data with the use of wildard charcaters: - Percent % - Matches any sequence of...
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.4; contract Voting { address public manager; string public agenda; enum Option { Yes, No, Null, Abstain } mapping (Option => address[]) private votes; mapping (address => bool) private residents; event VoteRecord...
#Sentiment Analysis - Part 1 #We will makes few procedure to prepare the tweets for the Sentiment Analysis #First of all, we install and load packages for language recognition install.packages("cld2") library(cld2) library(tidyverse) #Now we find the file address all_twitter_files <- list.files(path = "CSV&Files", p...
using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; using WebAPI.DevsuTest.Util.Class; using WebAPI.DevsuTest.Commons.CapaActual; using WebAPI.DevsuTest.DTOs.Cuenta; using WebAPI.DevsuTest.DTOs.Comunes; using WebAPI.DevsuTest.Interfaces.Services; namespace WebAPI.DevsuTest.Controllers { [Rou...
/****************************************************************************** * Copyright (c) 2014, Hobu Inc. (hobu@hobu.co) * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following * conditions are met: * * * Redistr...
/// <reference types="@microsoft/msfs-types/js/avionics" /> import { AbstractMapWaypointIcon, AbstractMapWaypointIconOptions, MapProjection, MapWaypointSpriteIcon, NavMath, ReadonlyFloat64Array, Subscribable, SubscribableUtils, Waypoint } from '@microsoft/msfs-sdk'; import { AirportWaypoint } from '../../navigati...
package com.carlostorres.comprayventa import android.Manifest import android.annotation.SuppressLint import android.app.Activity import android.content.Context import android.content.Intent import android.location.Geocoder import android.location.Location import android.location.LocationManager import android.os.Bundl...
## Note nid: 1467927076561 model: AnKingOverhaul tags: #AK_Original_Decks::Step_1::Zanki_Step_Decks::Zanki_Biochemistry::Molecular,_Cellular,_Genetics, #AK_Step1_v11::#B&B::06_Cell_Bio::01_Molecular::04_Transcription, #AK_Step1_v11::#FirstAid::01_Biochemistry::01_Molecular::12_RNA_Processing, #AK_Step1_v11::#FirstAid::...
import { InputFieldType, INPUT_TYPE_NONE, PageInputMaxCount } from '../../constants'; import { findPasswordInputs, findUsernameInputs, findVisibleInputs, getInputType } from './dom'; import { toPrecision } from './numbers'; export interface GeoType { top: number; topP?: number; left: number; leftP?: number; w...
package ma.nourlab.earthquakealarm.service; import ma.nourlab.earthquakealarm.domain.MessageInfo; import ma.nourlab.earthquakealarm.infrastructure.repository.MessageRepository; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context...
import 'package:flutter/material.dart'; import 'package:meals/models/meal.dart'; import 'package:meals/widgets/meal_item_trait.dart'; import 'package:transparent_image/transparent_image.dart'; class MealItem extends StatelessWidget { const MealItem({ super.key, required this.meal, required this.openMealD...
/* Copyright 2022, 2023 Joel Svensson svenssonjoel@yahoo.se 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 3 of the License, or (at your option) any later version...
const Entertainment = require("../models/entertainmentSchema"); const axios = require("axios"); module.exports.getGenres = () => { return new Promise((resolve, reject) => { const movieGenres = axios.get( "https://api.themoviedb.org/3/genre/movie/list", { params: { api_key: process.e...
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * 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 ...
package com.automation.trading.utility; import java.io.Serializable; import org.springframework.http.HttpStatus; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import lombok.AllArgsConstr...
# Simulating an "observed" dataset n <- 50 data <- rnorm(n,10,1) # Setting parameters for uniform priors mu_min <- 0 mu_max <- 50 sig_min <- 0 sig_max <- 4 # Creating model parameters mu ~ dnUnif( lower=mu_min , upper=mu_max ) sig ~ dnUnif( lower=sig_min , upper=sig_max ) # Creating stochastic nodes (Normal distrib...
import { darken, rgba } from 'polished'; import styled, { css } from 'styled-components'; type InputWrapperProps = { isInvalid: boolean; isDisabled: boolean; variant?: 'primary' | 'secondary'; }; export const InputWrapper = styled.div<InputWrapperProps>` ${({ theme, isInvalid, isDisabled, variant }) => css` ...
import type {Meta, StoryObj} from '@storybook/react' import {userEvent, within} from '@storybook/testing-library' import axios from 'axios' import MockAdapter from 'axios-mock-adapter' import BubbleButton from './BubbleButton' const meta: Meta<typeof BubbleButton> = { component: BubbleButton, args: { ...
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using System.Runtime.CompilerServices; using System.Text; using TwitterLitter.Server.Classes; using TwitterLitter.Server.Interfaces; using TwitterLitter.Shared; using TwitterLitter.Shared.Models; namespace TwitterLitter.Server.Con...
// // KSTLogMessage.h // KSTLog // // Created by liushengxiang on 2020/6/3. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN /// 日志分级 typedef NS_ENUM(NSUInteger, KSTLogLevel) { KSTLogLevelUnknown = 0, KSTLogLevelError = (1 << 0), KSTLogLevelWarning = (1 << 1), KSTLogLevelInfo ...
import { IsEmail, IsNotEmpty, IsString, IsOptional, IsEnum, MaxLength, IsBoolean } from 'class-validator'; import { InputType, Field } from '@nestjs/graphql'; import { DeviceEnum, LangEnum, SocialProvidersEnum } from 'src/user/user.enum'; import { ErrorCodeEnum } from 'src/_common/exceptions/error-code.enum'; @InputTy...
import { IAgentPlugin } from '@veramo/core' import { schema } from '../index' import { events, IRequiredContext, IVcApiVerifierClient, IVcApiVerifierArgs, IVerifyCredentialArgs, IVerifyCredentialResult, } from '../types/IVcApiVerifierClient' import { fetch } from 'cross-fetch' /** * {@inheritDoc IVcApiV...
from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.db.utils import IntegrityError from rest_framework.decorators import api_view, authenticat...
=begin Write a method that takes a single String argument and returns a new string that contains the original value of the argument with the first character of every word capitalized and all other letters lowercase. You may assume that words are any sequence of non-blank characters. - write a method that takes a stri...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_list_push_back.c :+: :+: :+: ...
# ポート番号について説明できる ## 1. ポート番号とは ポート番号とは何か、何のためにあるものか、プログラミング初心者にわかるように説明してください。 - 特定のプロセスまたはタイプのサービスが通信を行うための窓口のようなもの。ポートは「港」という意味 - ネットワーク上で通信を行う際、それぞれの通信はIPアドレスによって正しいマシンに送られるが、一つのマシンには数多くのアプリケーションやサービスが存在するため、マシンの度のサービスに通信を送ったらいいか分からない。そこでポート番号を用いることによりどのアプリケーションがその通信、メッセージを処理するかを識別する ## 2. 代表的なポート番号 代表的なポート番号は...
function validateForm() { // Get form inputs let customerName = document.getElementById('customerName').value; let nationalID = document.getElementById('nationalID').value; let phoneNumber = document.getElementById('phoneNumber').value; let checkInDate = document.getElementById('checkInDate').value...
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "../Protocol.sol"; import "../interfaces/GammaInterface.sol"; import "../interfaces/IAlphaPortfolioValuesFeed.sol"; /** * @title Lens contract to get user vault positions */ contract ExposureLensMK1 { // protocol Protocol public protocol; /...
import styles from "./newsListItem.module.css"; import { Link } from "react-router-dom"; import score from "../assets/score.svg"; import comment from "../assets/comment.svg"; import linkArrow from "../assets/link-arrow.svg"; import { convertTime, showUrl } from "../utils"; import useFetch from "../hooks/useFetch"; exp...
<?php session_start(); $usersFile = 'data/users.xml'; function saveUser($file, $username, $hashedPassword, $recoveryCode, $isAdmin) { if (file_exists($file)) { $xml = simplexml_load_file($file); } else { $xml = new SimpleXMLElement('<users></users>'); } $user = $xml->addChild('user'); ...
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...