text
stringlengths
184
4.48M
import { Text, StyleSheet, View, FlatList, Animated, Easing, Dimensions, } from 'react-native'; import React, {Component, PureComponent} from 'react'; import SmallItem from './item'; import ScrollIndicator from './scrollIndicator'; const windowWidth = Dimensions.get('window').width; export default class...
package tanks; import java.util.HashMap; public class Interval { protected static HashMap<String, Interval> gameIntervals = new HashMap<>(); protected static HashMap<String, Interval> levelIntervals = new HashMap<>(); public String name; public Runnable runnable; public double baseTimer; pub...
import React, { useState, useEffect, useCallback } from "react"; import style from "./meetingRoomForm.module.scss"; import SelectField from "../../common/FieldCommonents/SelectField/SelectField"; import { FormChangeArgs } from "../../../../ts/types/globalTypes/FormChangeArgs"; import { SelectOption } from "../../../../...
import java.util.Scanner; class Segitiga { int alas, tinggi; Segitiga(int alas, int tinggi) { this.alas = alas; this.tinggi = tinggi; } // hitung luas public double hitungLuas() { return (this.alas * this.tinggi) / 2; } } class Lingkaran { int r; final dou...
import { format } from "date-fns"; import { Calendar as CalendarIcon } from "lucide-react"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import { Calendar } from "@/components/ui/calendar"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; i...
--- title: "Text mining of patient experience data" author: "[Chris Beeley](mailto:chris.beeley1@nhs.net)" date: 2023-05-15 date-format: "MMM D, YYYY" format: revealjs: theme: [default, ../su_presentation.scss] transition: none chalkboard: buttons: false footer: | view slides at [the-strat...
import axios from "axios"; import { useEffect, useState } from "react"; import ServiceCard from "./ServiceCard"; const Services = () => { const [allServices, setAllServices] = useState([]); useEffect(() => { axios .get("https://car-doctor-server-sable-ten.vercel.app/services") .then((data) => setA...
\chapter{Исследовательский раздел} В данном разделе приведён пример работы программы, а также проведён сравнительный анализ многопоточной и однопоточной реализаций. \section{Технические характеристики} Замеры времени выполнялись на личном ноутбуке. Технические характеристики устройства, на котором выполнялось тестир...
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\SoftDeletes; class Message extends Model { use HasFactory, SoftDeletes; /** * The attributes ...
import createHttpError from "http-errors"; import AdminRepository from "../repositories/admin.repository"; import PasswordHelpers from "../../../../helpers/password.helper"; import RoleService from "../../roles/services/role.service"; import { Admin } from "../interfaces/admin.model"; import { ICreateAdminDto, ...
import { renderHook } from '@testing-library/react-hooks'; import useGetUsers from '../useGetUsers'; import { createWrapper } from 'test-utils/wrapper'; import { getMockUsers } from '@dpg-code-challenge/data'; describe('testing useGetUsers hook', () => { const limit = 5; const search = 'test'; const getMock = (p...
#!/bin/env python """ Mappings Generator ------------------ Generates Starlark SHA256 mappings for GraalVM artifacts. """ import time import itertools from datetime import datetime from gevent import monkey; monkey.patch_all(thread=False, select=False) # noqa from .logger import * from .cli import * from .d...
'use client'; import { ReactNode, useState } from 'react'; import { useRouter } from 'next/navigation'; import { Box } from '@mui/material'; import { AppBar, Toolbar, IconButton, Typography, Drawer, ListItemButton, MenuList, Container, Button, } from '@mui/material'; import MenuRoundedIcon from '@mui...
<?php // This file contains the code for shortcode-related functionalities if (!defined('ABSPATH')) exit; class BrainJournal_Shortcode { private $REST_NAMESPACE; public function __construct(BrainJournal_Constants $constants) { // Register the shortcode in Wordpress add_shortcode("brainjou...
import { IAnchorComponent } from "@iot-app-kit/scene-composer"; import { Vector3, Euler, Scene, Object3D, Raycaster } from "three/src/Three"; import { AnimationParameter, SystemLoadingStatus } from "../types/DataType"; import { degToRad } from "three/src/math/MathUtils"; import { isBillboardMixinObject } from "../mixin...
import 'dart:io'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import '../../../data/repos/my_details_repo.dart'; part 'my_details_state.dart'; class MyDetailsCubit extends Cubit<MyDetailsState> { MyDetailsCubit(this._myDetailsRepo) : super(MyDetailsInitial()); final...
<!DOCTYPE html> <html lang="uk"> <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>WebStudio</title> <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@700&family=Roboto:wght@40...
<template> <div class="theme-toggle"> <button class="theme-toggle-button" @click="toggleTheme" aria-label="Toggle themes"> <span v-show="this.theme == 'darkMode'"><img src="../assets/bright-icon.svg" alt="Light Theme icon"/></span> <span v-show="this.theme != 'darkMode'"><img src="../assets/moon-icon....
import { Body, Controller, Delete, Get, NotFoundException, Param, Patch, Post, UseFilters, } from '@nestjs/common'; import { CreateRingReqDto } from './dto/create-ring-req.dto'; import { InMemoryDBService } from '@nestjs-addons/in-memory-db'; import { RingEntity } from './entity/ring.entity'; import {...
# 최소 신장 트리 Minimum Spanning Tree(MST) - 신장 트리란 특정한 그래프에서 모든 정점을 포함하는 그래프 - 최소 신장 트리는 스패닝 트리 중에서 간선의 가중치 합이 가장 작은 트리 - 프림 알고리즘은 최소 스패닝 트리를 구하는 과정에서 O(ELogV)의 시간 복잡도를 가짐 ### 프림알고리즘 1. 그래프에서 정점 하나를 선택해 트리T에 포함시킴 2. T에 포함된 노드와 T에 포함되지 않은 노드 사이의 간선 중에서 가중치가 가장 작은 간선을 찾는다 3. 해당 간선에 연결된 T에 포함되지 않은 노드를 트리 T에 포함시킨다 4. 모든 노드가 포함...
27/10/2022, 14:51Data portability and peer-to-peer accommodation: four scenarios for the future (report) – The ODI https://theodi.org/article/data-portability-and-peer-to-peer-accommodation-four-scenarios-for-the-future-report/#1522943934045-d581c108-4c6e4817-d3b51/9 Data portability and peer-to-peer accommodation: fou...
from faker import Faker from random import randint class GenerateFakeData: """ class to generate fake user and job data using the Faker library """ def __init__(self) -> None: self.fake = Faker() # create lists to store fake data self.fake_user_data: list = [] self.fake_job_d...
# install ```bash pip install -U git+https://github.com/sazima/tornado_request_mapping ``` # A simple example ```python import tornado.ioloop from tornado.websocket import WebSocketHandler import tornado.web from tornado_request_mapping import request_mapping, Route @request_mapping("/test") class MainHandler(to...
from pathlib import Path from initialize import import_dataset import requests from breast_workflow_data.data import WORKFLOW_RESULT, WORKFLOW_DESCRIPTION, PATIENT_INFOS, WORKFLOW_RESULT_LINMAN """ Workflow 1: - name: breast-workflow - identifier: sparc-workflow-yyds-001 - target: calculate closest distan...
import { useContext } from "react"; import { VictoryPie } from "victory"; import { groupBy, prop, toPairs, clone, isEmpty } from "ramda"; import { DashboardContext } from "../../App"; import NoData from "../../common/NoData"; const Genre = () => { const books = useContext(DashboardContext); const clonedBooks = ...
<template> <div> <div class="content"> <div class="container-fluid"> <!--~~~~~~~ TABLE ONE ~~~~~~~~~--> <div class="_1adminOverveiw_table_recent _box_shadow _border_radious _mar_b30 _p20"> <p class="_title0">Admin <Button @click="addModal=true"><Icon type="md-add" /> Add admin</Button></p> ...
import { inject, injectable } from "tsyringe"; import { sign } from "jsonwebtoken"; import { IUsersRepository } from "@modules/accounts/repositories/IUsersRepository"; import { AppError } from "@shared/errors/AppError"; import { IUsersTokensRepository } from "@modules/accounts/repositories/IUsersTokensRepository"; imp...
package org.example.signature; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.example.ReadKey; import java.io.File; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.secur...
void main() { // Create a map of country names with their population and area var countries = { 'China': {'population': 1393, 'area': 9596961}, 'India': {'population': 1366, 'area': 3287263}, 'United States': {'population': 330, 'area': 9833520}, 'Indonesia': {'population': 269, 'area': 1910931}, ...
import { useState, useEffect } from "react"; import { useFaunaUser } from "./useFaunaUser"; export const useFaunaPages = () => { const { faunaUserData } = useFaunaUser(); const [faunaPagesStatus, setStatus] = useState("idle"); const [faunaPagesData, setData] = useState(); const [faunaPagesError, setError] = u...
<template> <div> <div class="d-flex justify-content-around"> <iframe title="Facebook post share" :src=" 'https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2FFreegle%2Fposts%2F' + postId + '&show_text=true' " width="552...
--- title: "One-way ANOVA Demo" author: "Chan - Stats Fall 2021" output: word_document: default pdf_document: default html_document: default --- One-Way ANOVA (Between) Example 1: This data set contains information on 78 people using one of three diets. Compare weight after 6 weeks (weight6weeks) between Diet 1:...
import { Controller, Get, Render } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { ApiOperation } from '@nestjs/swagger'; import { AppService } from './app.service'; @Controller() export class AppController { constructor( private readonly configService: ConfigService, private...
/* * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { NotFoundComponent } from './not-found/not-found.component'; import { AuthGuard } from './shared/guards/auth.guard'; import { AutoLoginGuard } from './shared/guards/auto-login.guard'; const routes: Routes = [ { ...
<!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="styles/style.css"> <!-- <link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png"> --> <link rel="preconnect" hr...
/*************************************************************************** * Copyright (C) 2005, 2006 by Pino Toscano, toscano.pino@tiscali.it * * * * This program is free software; you can redistribute it and/or modify * * it unde...
import axios from "axios"; import Modal from "react-bootstrap/Modal"; import { useEffect, useState, useContext } from "react"; import { useForm } from "react-hook-form"; import Form from "react-bootstrap/Form"; import Button from "react-bootstrap/Button"; import {useDispatch, useSelector} from "react-redux"; import { c...
#ifndef _POINT_H #define _POINT_H #include <iostream> class Point{ float posX; // coordinate X float posY; // coordinate Y public: Point(float posX, float posY); Point(int posX, int posY); Point(); void setPosX(float new_posX); void setPosY(float new_posY); float getPosX(); float...
import * as React from "react"; import { styled } from "@mui/material/styles"; import Box from "@mui/material/Box"; import Stack from "@mui/material/Stack"; import Stepper from "@mui/material/Stepper"; import Step from "@mui/material/Step"; import StepLabel from "@mui/material/StepLabel"; import SettingsIcon from "@mui...
class Solution: def dailyTemperatures(self, temps): results = [0] * len(temps) stack = [] for i, temp in enumerate(temps): while stack and temps[stack[-1]] < temp: index = stack.pop() results[index] = i - index stack.append(i) ...
<script setup lang="ts"> import cDashboard from "./dashboard/c-dashboard.vue" import useDashboardStore from "../../../stores/dashboard/dashboard" import { storeToRefs } from "pinia" import pie from "../../../components/page-echarts/src/pie-echarts.vue" import Line from "../../../components/page-echarts/src/line-echarts...
// // TimeInterval.swift // CleanSteps // // Created by Hugh on 3/6/24. // import Foundation extension TimeInterval { /// Converts the time interval into a formatted string representing clean time. /// /// - Returns: A string representing the clean time in a human-readable format. func cleanTimeFor...
# Docker Swarm Playbook The docker_swarm playbook in this collection will initialise one or more swarms and joins manager and worker nodes to the swarm. ## How to use the Docker Swarm Playbook ### Prepare your Inventory Group hosts in your inventory into two or three groups: - a group of hosts that will each initi...
# WeatherApp ![img.png](img.png) ## Accessing the Application The WeatherApp is deployed and accessible online. You can interact with the live application by visiting the following URL: [WeatherApp Live](https://sleepy-shelf-48977-40fe135f3481.herokuapp.com/weather) ## Overview WeatherApp is a Spring Boot application ...
function r = acos(a,see) %ACOS Affine arithmetic elementwise inverse cosine acos(a) % %For scalar affari interval a, % % y = acos(a,1) % %plots the function together with its affine approximation. % % written 04/04/14 S.M. Rump % modified 04/23/14 S.M. Rump set/getappdata replaced by global % modi...
package com.example.a8beats import android.annotation.SuppressLint import android.graphics.Color import android.os.Bundle import android.widget.ImageButton import android.widget.LinearLayout import android.widget.TextView import android.widget.Toast import androidx.activity.viewModels import androidx.appcompat.app.App...
<!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="https://www.tutorialspoint.com/jquery/jquery-3.6.0.js"></script> ...
/* * NOTE: This copyright does *not* cover user programs that use HQ * program services by normal system calls through the application * program interfaces provided as part of the Hyperic Plug-in Development * Kit or the Hyperic Client Development Kit - this is merely considered * normal use of the program, and do...
'use client'; import Button from '@/components/Button'; import Modal from '@/components/Modal'; import Spinner from '@/components/Spinner'; import { AddressFormInput } from '@/types/types'; import { formatPhoneNumber } from '@/utils'; import { phoneRegex } from '@/utils/regex'; import { User } from 'next-auth'; import...
import pytest from playwright.sync_api import Page from pages.login_page import LoginPage ex_url = "https://www.saucedemo.com/inventory.html" ex_error_message = ( "Epic sadface: Username and password do not match any user in this service" ) ex_locked_out_user_message = "Epic sadface: Sorry, this user has been loc...
// // ReadingView.swift // SimpleNews // // Created by Paul Hudson on 29/05/2022. // import SwiftUI /// A view that shows the full details for a specific article, for scrolling reading. struct ReadingView: View { /// An action to let the user open this article in their preferred web browser. @Environment(\...
/************************************************************************** * TW-UIFX - ThreeWorlds User-Interface fx * * * * Copyright 2018: Jacques Gignoux & Ian D. Davies * * jacques...
// @(#)root/core/meta:$Id$ // Author: Paul Russo 30/07/2012 /************************************************************************* * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. * * All rights reserved. * * ...
import 'package:flutter/material.dart'; import 'package:inventory_tracker/screens/create_item.dart'; import 'package:inventory_tracker/screens/list_product.dart'; import 'package:inventory_tracker/screens/login.dart'; import 'package:inventory_tracker/types/type.dart'; import 'package:pbp_django_auth/pbp_django_auth.da...
import { Pagination } from '@mui/material'; import { ChangeEvent, useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; import Cover from 'src/component/Cover'; import ExploreSearch from 'src/component/ExploreSearch'; import FollowButton from 'src...
LLMOps: Automatic retrieval-augmented generation with Airflow, GPT-4 and Weaviate This repository contains the DAG code used in the [LLMOps: Automatic retrieval-augmented generation with Airflow, GPT-4 and Weaviate](https://docs.astronomer.io/learn/use-case-airflow-llm-rag-finance) use case. The pipeline was modelle...
/* ### jQuery Multiple File Selection Plugin v2.2.2 - 2016-06-16 ### * Home: http://www.fyneworks.com/jquery/multifile/ * Code: https://github.com/fyneworks/multifile * * Licensed under http://en.wikipedia.org/wiki/MIT_License */ /*# AVOID COLLISIONS #*/ ; if (window.jQuery)(function ($) { "use strict"; /*# AVO...
How to add BigBird to 🤗 Transformers? Mentor: [Patrick](https://github.com/patrickvonplaten) Begin: 12.02.2020 Estimated End: 19.03.2020 Contributor: [Vasudev](https://github.com/vasudevgupta7) Adding a new model is often difficult and requires an in-depth knowledge of the 🤗 Transformers library and ideally al...
# Install the SDK The justtrack SDK is available as a Unity package. You have to add [https://registry.npmjs.org](https://registry.npmjs.org) as the scoped registry to add it to your game. Navigate to `Window` → `Package Manager`, then select `Advanced Project Settings` from the gear menu. Now add the justtrack Packag...
--- id: 5900f3ca1000cf542c50fedd title: '问题94:几乎等边三角形' challengeType: 1 forumTopicId: 302211 dashedName: problem-94-almost-equilateral-triangles --- # --description-- It is easily proved that no equilateral triangle exists with integral length sides and integral area. However, the almost equilateral triangle 5-5-6 ha...
test_that("Addin errors if required environment variables not set", { withr::with_envvar(new = c("SHINYSENDER_USER" = "alice", "SHINYSENDER_SERVER" = ""), { expect_error(ss_uploadAddin(), "You must ...
class MyLinkedList { public: struct LinkedNode{ int val; LinkedNode* next; LinkedNode(int val):val(val),next(nullptr){} }; MyLinkedList() { _virtualHead = new LinkedNode(0); _size = 0; } int get(int index) { if (index > (_size -1) || index < ...
import React, { useContext, useState } from 'react' import { CartContext } from "../../context/CartContext"; import { useNavigate } from "react-router-dom"; import { doc, updateDoc, getDoc } from "firebase/firestore"; import { collection, addDoc } from "firebase/firestore"; import { db } from "../../firebase/config"; i...
package project2.entities.items; import project2.utils.BorrowableItem; import project2.enums.ItemType; import project2.utils.PaperItem; import java.io.Serializable; public class Book extends LibraryItem implements BorrowableItem, PaperItem, Serializable { private String author; private String title; pri...
--- title: "我的 Conda 配置" date: 2023-11-23 20:20 comments: true categories: Effective description: Effective --- Conda可以构建不同的环境,同时可以对环境进行保存,加载和切换操作。工作中主要用于Python方面的开发 ## 安装 & 环境配置 这里推荐用.科普下conda,miniconda,anacoda三者有什么区别, 因为总是听到不同的人在说: - conda是一款软件管理软件,相当于windows里面的应用商店。miniconda和anaconda中都包含了conda。其中: - miniconda wind...
package com.quest.etna.model; import java.util.Date; import java.util.Objects; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "catalog") public class Catalog { @Id @Column(name = "reference", length=50, null...
import React from "react"; import { LineChartOutlined, CalendarOutlined, FolderOutlined, TeamOutlined, ProjectOutlined, } from "@ant-design/icons"; import type { MenuProps } from "antd"; type MenuItem = Required<MenuProps>["items"][number]; function getItem( label: React.ReactNode, key: React.Key, icon?: Reac...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> #outer-box { width: 200px; height: 200px; background-color: red; position: relat...
package controller import ( "errors" "fmt" "log/slog" "net/http" "github.com/gin-gonic/gin" "github.com/isaki-kaji/nijimas-api/service" "github.com/isaki-kaji/nijimas-api/util" "github.com/jackc/pgx/v5" ) type UserController struct { service service.UserService } func NewUserController(service service.User...
import tkinter as tk from tkinter import ttk import sys from xlsxReader import * from itemExtract import * import Item # Search function that filters data based on the first dropdown selection def search(): # get current menu selection global last_menu_selection curr_menu_selection = [dropdown_menu.get() f...
#include "main.h" /** * factorial - Returns the factorial of a given positive number and * returns -1 if the number is negative * @n: Number * Return: nothing */ int factorial(int n) { if (n < 0) return (-1); if (n <= 1) return (1); return (n *= factorial(n - 1)); }
/* * fpn - an interactive unit-aware RPN calculator * Copyright (C) 2018 Keyboard Fire <andy@keyboardfire.com> * * 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 Li...
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('settings', function (Bl...
from typing import Dict from enforce_typing import enforce_types from df_py.predictoor.models import Prediction, Predictoor, PredictContract from df_py.util.constants import DEPLOYER_ADDRS from df_py.util.graphutil import submit_query from df_py.util.networkutil import DEV_CHAINID @enforce_types def query_predictoor...
<template> <div class="create-story-container"> <div class="page-title"> <h2>Edit Draft</h2> <span v-if="errorMsg" class="error-msg">{{ errorMsg }}</span> </div> <div class="story-header"> <input type="text" placeholder="故事標題" class="story-title" v-model="...
document.addEventListener('DOMContentLoaded', () => { const pokemonList = document.getElementById('pokemonList'); const getPokemonDetails = async (name) => { const response = await fetch(`https://pokeapi.co/api/v2/pokemon/${name}`); const data = await response.json(); return { ...
<?php include_once 'ControllerModel.php'; class ClientesController extends ControllerModel { public function validadaEntradaDelete(array $valores): array { try { $cliente_id = $valores['cliente_id']; // Validação de clinte_id if (!filter_var($cliente_id, FILTER_VAL...
import {Injectable} from "@angular/core"; import {HttpClient} from "@angular/common/http"; import {Observable} from "rxjs"; import {PositionResponse, PositionsResponse} from "../interfaces"; @Injectable({ providedIn: 'root' }) export class PositionsService { constructor(private http: HttpClient) { } getByI...
package com.QuarkLabs.BTCeClient.ui.history; import android.app.DatePickerDialog; import android.app.Fragment; import android.app.LoaderManager; import android.content.Loader; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.Log; impor...
<?xml version="1.0" ?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd"> <chapter id="chap_intro"> <chapterinfo> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="versionfile"/> <author> <firstname>Bastien</firstname> <surname>Chev...
import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { Segmento } from 'src/app/components/segmento/SegmentoModel/segmento'; @Injectable({ providedIn: 'root' }) export class SegmentoService { /** * URL's para consu...
package com.challenge.onboarding.createUser import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compos...
import React, { useMemo} from 'react' import { useForm } from "react-hook-form"; import { HomeApi } from '../../../config/api'; import { callApi } from '../../../services/ApiService'; import { defaultHeader, toastError, toastSuccess } from '../../../services/CommonFunction'; import { displayError, formclass } from '../...
<script setup> import FancyButton from "./FancyButton.vue"; import { ref } from "vue"; const idx = ref(0); function next() { idx.value++; idx.value %= 3; } function pre() { idx.value--; idx.value += 3; idx.value %= 3; } </script> <template> <div class="example"> <h2>{{ $translate("example2.title") }}...
<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>My Portfolio</title> <link rel="stylesheet" href="bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href=...
from functools import wraps from telegram import error, ChatAction from kaga import LOGGER def send_message(message, text, *args, **kwargs): try: return message.reply_text(text, *args, **kwargs) except error.BadRequest as err: if str(err) == "Reply message not found": return messag...
export default function FoodForm({ title, defaultNama, defaultUrlGambar, defaultDeskripsi, onSubmit, defaultIngredients, loading, defaultRating, defaultTotalLikes, }) { const handleSubmit = (e) => { e.preventDefault(); const formData = new FormData(e.currentTarget); const name = formDat...
import React from "react"; import { useDispatch, useSelector } from "react-redux"; import { setScrollTop, selectScrollTop } from "../../Redux/Slice"; import { FaArrowAltCircleUp } from "react-icons/fa"; const TopButton = () => { const dispatch = useDispatch(); const scrollTop = useSelector(selectScrollTop); cons...
package stirling.software.SPDF.controller.api.security; import java.io.IOException; import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocumentCatalog; import org.apache.pdfbox.pdmodel.PDPage; import org.apac...
# == Schema Information # # Table name: predefined_diseases # # id :uuid not null, primary key # description :text default(""), not null # icd10_code :string default(""), not null # name :string default(""), not null # related_names :string ...
# importing the lib import os from langchain.agents import * from langchain.llms import OpenAI from langchain.chat_models import ChatOpenAI from dotenv import load_dotenv from langchain.sql_database import SQLDatabase from langchain.agents.agent_toolkits import SQLDatabaseToolkit from langchain.agents import AgentExecu...
import { useState } from 'react' import axios from 'axios' import { useRouter } from 'next/router' import { useSession } from 'next-auth/react' import { Box } from '@chakra-ui/react' import { Menu, MenuButton, MenuList, MenuItem } from '@chakra-ui/react' import { AiOutlineMore } from 'react-icons/ai' export default fu...
import React, {} from 'react'; import { Box, chakra, Button, useColorMode, Container, Stack, Text, useColorModeValue, VisuallyHidden, VStack, } from '@chakra-ui/react'; import { MoonIcon, SunIcon } from '@chakra-ui/icons'; import { FaInstagram, FaTwitter, FaYoutube } from 'react-icons/fa'; const S...
package pgrmongodb import ( "context" "fmt" "reflect" "regexp" "strconv" "strings" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-pl...
/* File: omp_trap3.cpp * Purpose: Estimate definite integral (or area under curve) using the * trapezoidal rule. This version uses a parallel for directive * * Input: a, b, n * Output: estimate of integral from a to b of f(x) * using n trapezoids. * * Compile: g++ -g -Wall -fopenmp -o omp_trap3...
import 'package:flutter/material.dart'; import 'package:flutter_application_1/core/style/app_colors.dart'; import 'package:flutter_application_1/core/style/app_text_style.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; // ignore: must_be_immutable clas...
import type {ChangeEvent} from 'react'; import {useCallback, useEffect, useMemo, useState, useRef} from 'react'; import {parseAsCurrency} from '~/lib/utils'; import {useLocale} from '~/hooks'; interface MultiRangeSliderProps { min: number; minValue?: number; max: number; maxValue?: number; canReset?: boolea...
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] =...
use crate::http::error::{ApplicationError, ErrorBag, RenderErrorsAsHtml}; use crate::http::extractor::ValidatedForm; use crate::http::{utils::deserialize_empty_string_as_none, AppContext}; use crate::view::authentication::{register_form, register_page}; use argon2::{ password_hash::{rand_core::OsRng, SaltString}, ...