text
stringlengths
184
4.48M
from django.test import TestCase from django.contrib.auth import get_user_model # Create your tests here. class CustomerUserTests(TestCase): def test_create_user(self): User = get_user_model() user = User.objects.create_user( username="Devin", email='devin@gmail.com', password='testpas...
import algosdk from "algosdk"; import AlgoMonetaryManager from "../../algo/AlgoMonetaryManager"; import AlgoClient from "../../algo/AlogClient"; import { ALGO_MIN_ACCOUNT_BALANCE, ALGO_MIN_TRANSACTION_FEE, } from "../../algo/constants"; import IdentityClient from "../identity/IdentityClient"; import { UserType } fr...
<?php /**\addtogroup scheduled_task * @{ */ Fakoli::usingFeature("auto_form"); class TaskScheduleHelper { static function drawScheduleBox($id, $value, $readOnly = false) { echo "<table id='{$id}' class='task_schedule'><thead><tr><th>&nbsp;</th>"; for($i = 0; $i < 7; ++$i) { $day = jddayofweek($i, 2); ...
<!DOCTYPE html> <html> <head> <title>Analisis y Visualizacion de Datos</title> <!-- Carga de la biblioteca Chart.js desde un CDN --> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> </head> <body> <h1>Ingrese sus datos en la tabla</h1> <table id="data-table"> <tr> ...
import {Injectable} from '@angular/core'; import {HttpClient, HttpHeaders} from '@angular/common/http'; import {Observable, of} from 'rxjs'; import {catchError, map, tap} from 'rxjs/operators'; import {Hero} from '../hero'; import {MessageService} from './message.service'; const httpOptions = { headers: new HttpHea...
// ignore_for_file: deprecated_member_use, file_names import 'package:flutter/material.dart'; class WidgetRaisedButton extends StatelessWidget { final String text; final void Function() press; final Color color, textColor; const WidgetRaisedButton({ Key? key, required this.text, required this.pres...
import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { testWidgets('Test find TextFormField widgets', (tester) async { await tester.pumpWidget(const MyApp()); await tester.pump(); final nameTextField = find.byKey(const Key('nameTextField')); final phon...
import React, { useState } from "react"; import axios from "axios"; import { useNavigate } from "react-router-dom"; import "./css/RegisterPage.css"; import { toast } from "react-toastify"; const RegisterPage = () => { const [name, setName] = useState(""); const [email, setEmail] = useState(""); const [password, ...
import { useForm } from "@inertiajs/react"; export default function Create({ categories }: any) { const { data, setData, post, errors } = useForm({ name: "", price: "", image: null as File | null, description: "", category_id: "", }); const handleSubmit = (e: React....
<template> <div> <form> <label for="nome">Nome</label> <input type="text" name="nome" id="nome" v-model="novoUsuario.nome"> <label for="email">Email</label> <input type="email" name="email" id="email" v-model="novoUsuario.email"> <label for="senha">Senha</label> <input type="...
import sys import os import random import pandas as pd sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from generate_data.base_data import get_base_variables from equations.up_and_out_call_Brown import price_up_and_out_call_brown from generate_data.find_beta import find_optimal_beta # Ini...
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; //댓글을 볼 수 있는 페이지 class CommentPage extends StatelessWidget { final DocumentSnapshot document; CommentPage(this.document); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( ...
/* Monster_Fatguy.cpp AI for the fat guy on the putra level */ #include "../../idlib/precompiled.h" #pragma hdrstop #include "../Game_local.h" #include "../Projectile.h" class rvMonsterHarvester : public idAI { public: CLASS_PROTOTYPE(rvMonsterHarvester); rvMonsterHarvester(void); void InitSpawnArgsVariabl...
library ieee; use ieee.std_logic_1164.all; library std; use std.textio; use work.lib.all; entity processor_control is port ( clock : in std_logic; reset : in std_logic; alu_zero : in std_logic; mem_done : in std_logic; opcode : in opcodes; mem_src : out T_mem_src; mem...
// TEST: pass // TYPE: expr /* STDOUT: hi 123! bla u 6 äöü e1 e2 e3 e4 e5 e6 e7 */ fn printf {C} (fmt:*u8,...) : i32; fn abort {C} () : void; fn assert(e:bool) : void { if (!e) abort(); }; var a : u32 = 123; var b : u32; b = a + b + 5; if (b != 128) abort(); printf(&"hi %d!\n"[], 123); printf(&"%s %...
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { UsersModule } from './users/users.module'; import { TypeOrmModule } from '@nestjs/typeorm'; import { BooksModule } from './books/books.module'; import { AuthModule } from './au...
import React, { useState } from 'react'; import SubmitButton from '../SubmitButton'; import DateTimePicker from 'react-datetime-picker'; import { addHours, addMinutes } from 'date-fns'; import styled from 'styled-components'; const FormWrapper = styled.div` & > form > div { margin-bottom: 11px; } `; const Dat...
.. _oran-o2-application-b50a0c899e66: O-RAN O2 Application .. rubric:: |context| In the context of hosting a |RAN| Application on |prod|, the |O-RAN| O2 Application provides and exposes the |IMS| and |DMS| service APIs of the O2 interface between the O-Cloud (|prod|) and the Service Management & Orchestration (S...
from flet import * from utils.colors import * from utils.validation import Validator class Signup(Container): def __init__(self, page: Page): super().__init__() self.alignment = alignment.center self.validator = Validator() self.expand = True self.bgcolor = blue sel...
/** * Copyright (c) 2015, Lucee Assosication Switzerland. All rights reserved. * * 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.1 of the License, or (at your op...
import { App, Stack, StackProps } from 'aws-cdk-lib'; import { EventBus, Rule } from 'aws-cdk-lib/aws-events'; import { LambdaFunction, EventBus as BusTarget } from 'aws-cdk-lib/aws-events-targets'; import { Runtime } from 'aws-cdk-lib/aws-lambda'; import { NodejsFunction, SourceMapMode } from 'aws-cdk-lib/aws-lambda-n...
################################################################### ################# Random Forest Classification setwd("F:\\DataMining_R\\3_LectureData") library(caret) lp=read.csv("LoanPay.csv") head(lp) summary(lp) lp[is.na(lp)] = 0 #replace NA with 0 nameList=c("loan_status","Principal","terms","age","educatio...
import random import numpy as np from matplotlib import pyplot as plt from nearest_neighbour import learnknn, predictknn from utils import gensmallm LABELS = [2, 3, 5, 6] CORRUPTED_FACTOR = 0.15 def run_knn_over_sample_size(k: int, sample_size_max: int, sample_sizes_steps: int, repeats: int, title: str): print...
// // ViewController.swift // project5 // // Created by 1 on 2020/05/08. // Copyright © 2020 wook. All rights reserved. // import UIKit class ViewController: UITableViewController { var allWords = [String]() var usedWords = [String]() override func viewDidLoad() { super.viewDidL...
import type { ComponentProps, FC, PropsWithChildren, ReactNode } from 'react'; import { KeepColors } from '../../Keep/KeepTheme'; export interface KeepCarouselTheme { base: string; indicators: { active: { off: { base: string; color: IndicatorsTypeColors; ...
//import { homeConstant } from "../../constants/homeConstants"; import { HEADER_QUERY_CONSTANT } from "../../constants/homeConstants"; import { FOOTER_QUERY_CONSTANT } from "../../constants/homeConstants"; import React, { useContext, useEffect } from "react"; import { Container, Row, Col } from "react-bootstrap"; impor...
package org.project.bookmanager.datasource; import org.project.bookmanager.entity.Publisher; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.jdbc...
import { join } from 'path'; import htmlToText from 'html-to-text'; import nodemailer from 'nodemailer'; import nodemailerSendgrid from 'nodemailer-sendgrid'; import juice from 'juice'; import pug from 'pug'; import envConfig from '../../../config/v1/env/env.config'; import config from '../../../config'; import { HTM...
@extends('layouts.admin') @section('titile', 'Create Produk') @push('prepend-style') <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="styl...
/*************************************************************************** * ProbeMode.h -- * * * ***********************IMPORTANT NMAP LICENSE TERMS************************ * ...
import { useCallback, useMemo } from "react"; import { useMantineReactTable } from "mantine-react-table"; import { ActivateUserBtn, TableContent } from "../../.." import { useTecnicoStore, useUiTecnico } from "../../../../hooks"; export const TecnicosTable = () => { const { isLoading, tecnicos, setActivateTecnico ...
import MotoGPAdmin from 0xa49cc0ee46c54bfb import MotoGPPack from 0xa49cc0ee46c54bfb import NonFungibleToken from 0x1d7e57aa55817448 import FlowToken from 0x1654653399040a61 import FungibleToken from 0xf233dcee88fe0abe import MotoGPTransfer from 0xa49cc0ee46c54bfb // The SalesContract's role is to enable on-chain sale...
import { conditionalFields, inputField, object, radioButton, selectField, step, upload, } from '../../generator/functions' import { createCamelCaseOptionsV2, createCondition } from '../../generator/helpers' const danovnikBase = [ object( 'ulicaCislo', { required: true }, { objectDispl...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <button>냥냥펀치</button> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <script> const URL = 'https:/...
import 'package:flutter/material.dart'; import 'package:mynotes/constants/routes.dart'; import 'package:mynotes/services/cloud/cloud_note.dart'; import 'package:mynotes/services/cloud/firebase_cloud_storage.dart'; import '../../utils/show_loading_dialog.dart'; class NoteListView extends StatefulWidget { final List<...
package com.kejin.view.gesture; import android.content.Context; import android.graphics.RectF; import android.util.AttributeSet; import android.view.Gravity; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.annotation.Nul...
import { useEffect } from 'react'; import {Routes,Route} from 'react-router-dom' import {useDispatch} from 'react-redux'; import Home from './routes/home/home-component'; import Navigation from './routes/navigation/navigation.component'; import Authentication from './routes/authentication/authentication.component'; ...
package tests.modelTest; import src.model.SoldBooks; import org.junit.jupiter.api.Test; import src.model.TheDate; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; public class SoldBooksTest { @Test public void testSoldBooks() { ...
import AppKit /* Inspired by https://rderik.com/blog/managing-uti-and-url-schemes-via-launch-services-api-from-swift/ https://github.com/Lord-Kamina/SwiftDefaultApps https://www.droidwin.com/cannot-change-default-browser-for-webloc-files-in-ventura-fix/ */ @main public struct Main { public static func main() { ...
<!--<app-login (userConnectedEmitter)="userConnected($event)" (userDeconnectedEmitter)="userDeconnected($event)" > </app-login>--> <!-- tout cela est affiché ssi l'utilisateur est connecté --> <div *ngIf="monService.isConnected"> <!-- affiche l'ensemble des playlists disponibles (début) --> Les playlists : ...
import PropTypes from "prop-types"; import {Link} from "react-router-dom"; function UserItem ({user}) { return( <div className="card shadow-md compact card-side bg-neutral"> <div className="flex-row items-center space-x-4 card-body"> <div> <div className="av...
import React, {useState} from 'react' import styled from 'styled-components' import {FilmType, SimilarFilmType} from '../../../api/filmAPI' import {ImdbCard} from '../../ImdbCard/ImdbCard' import {useDispatch, useSelector} from "react-redux"; import {AppRootStateType} from "../../../app/store"; import {setFilm, setFilm...
package pages; import org.apache.log4j.Logger; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; public class BlogPage extends BasePage{ WebDriver driver; Logger...
<?php namespace Database\Factories; use App\Models\Exam; use Illuminate\Database\Eloquent\Factories\Factory; class ExamFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Exam::class; /** * Define the model's defau...
package com.goodworkalan.paste.connector; import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import com.goodworkalan.dovetail.Path; import com.goodworkalan.ilk.association.IlkAssociation; import com.goodworkalan.ilk.inject.InjectorBuilder; import com.g...
import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; import 'package:sugar_mill_app/views/cane_screens/add_cane_view/add_cane_model.dart'; import '../../../widgets/cdrop_down_widget.dart'; import '../../../widgets/ctext_button.dart'; impor...
import java.util.*; public class SudokuSolver { private static final int BOARD_SIZE = 9; private char[][] board; public SudokuSolver(char[][] initialBoard) { this.board = new char[BOARD_SIZE][BOARD_SIZE]; for (int i = 0; i < BOARD_SIZE; i++) { System.arraycopy(initialBoard[i], ...
//reclamo.js import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import { Button, Table } from 'react-bootstrap'; //la siguiente linea generaba un warning de falta de uso, se comento para eliminar si no genera problemas //import { useNavigate } from 'react-router-dom'; const ...
import { StyleSheet, ImageBackground, SafeAreaView } from "react-native"; import StartGameScreen from "./screens/StartGameScreen"; import GameOverScreen from "./screens/GameOverScreen"; import { LinearGradient } from "expo-linear-gradient"; import { useEffect, useState } from "react"; import GameScreen from "./screens/...
<script setup lang="ts"> import { ref, watch } from 'vue'; const nombre = ref('nombre'); const apellido = ref('apellido'); const mensajeInvalido = ref(''); const mensajeedad = ref(''); const mensajetelefono = ref(''); const edad = ref(0); const genero = ref(''); const telefono = ref(''); function mensaje() { if...
// // Api.swift // APILearning // // Created by Luiz Sena on 16/08/22. // import Foundation //Using completion handler class API { static func getUsers() { let url = URL(string: "http://adaspace.local/users")! let task = URLSession.shared.dataTask(with: url) { (data, response, err...
import { useState } from "react"; import styled from "styled-components"; import { VideoData } from "./SoriAward"; import gold from "../../../assets/gold.png"; import silver from "../../../assets/silver.png"; import bronze from "../../../assets/bronze.png"; import smiling from "../../../assets/smiling.png"; import { s3...
package com.dnd.gooding.domain.file.domain; import java.io.File; import java.io.IOException; import java.util.Optional; import java.util.UUID; import org.springframework.web.multipart.MultipartFile; import lombok.Builder; import lombok.Getter; @Getter public class FileCreate { private String extension; private St...
// // ViewController.swift // Weather-test-app // // Created by Serhii Navka on 05.08.2022. // import UIKit import Core import Combine class HomeViewController: UITableViewController { var viewModel: HomeViewModel! var searchResultsController: SearchResultsController! private var searchController:...
import { useState, useEffect } from 'react'; import { ethers } from 'ethers'; const useWallet = () => { const [account, setAccount] = useState(''); const [state, setState] = useState(''); const [error, setError] = useState(''); useEffect(() => { const checkWallet = async () => { setState('loading');...
import { motion } from "framer-motion"; import { useEffect } from "react"; import { useState } from "react"; import { styles } from "../styles"; import { ComputersCanvas } from "./canvas"; const Hero = () => { const [typedText, setTypedText] = useState(""); const typingOptions = [ "Web Application", "Colla...
import React, {Component} from 'react'; import {View, Text,StyleSheet, TouchableOpacity, ActivityIndicator, Image} from "react-native"; import AsyncStorage from '@react-native-community/async-storage'; import axios from "axios"; import animacaoTorneira from "../animacoes/animacaoTorneira.json"; import Lottie from "lott...
package pt.isec.amov.ui.screens import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMa...
import { describe, expect, it } from 'vitest'; import { Appointment } from '../entities/appointment'; import { InMemoryAppointmentsRepository } from '../repositories/in-memory/in-memory-appointments-repository'; import { getFutureDate } from '../tests/utils/get-future-date'; import { CreateAppointment } from './create-...
import { Body, Controller, Delete, ForbiddenException, Get, Headers, Param, Patch, Put, UseGuards } from '@nestjs/common'; import FindOneParams from '../../utils/findOneParams'; import AgentService from './agent.service'; import Agent from './entities/agent.entity'; import { ApiBearerAuth, ApiOperation, ApiParam, ApiTa...
#include <stdlib.h> #include <stdio.h> #include <string.h> #include "general.h" #include "instructions.h" #include "symbols.h" int ROM_IRQ_ADDR[] = {0xC803, 0xC074 }; int PRODOS_IRQ_ADDR = 0xBFEB; char *mem_str[3] = { "RAM", "ROM", "none" }; /* LSR, ROL, ROR, ? */ char *read_instructions[] = { "adc", "and",...
/* eslint-disable no-restricted-imports */ import { createStitches } from "@stitches/core"; import type * as Stitches from "@stitches/core"; export type { VariantProps, PropertyValue, ScaleValue } from "@stitches/core"; import { colors } from "./colors"; import { space, spaceAliases, SpaceToken } from "./space"; expo...
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using OfficeMenStore.Application.Interfaces; using OfficeMenStore.Application.Models.User; namespace OfficeMenStore.Api.Controllers { [Route("api/[controller]")] [ApiController] public class UsersController : ControllerBase { ...
import React, { useState, useEffect } from 'react'; import { Calendar, momentLocalizer } from 'react-big-calendar'; import moment from 'moment'; import 'react-big-calendar/lib/css/react-big-calendar.css'; const localizer = momentLocalizer(moment); const Cal_no_input = () => { const [events, setEvents] = useState([]...
### Containerized Installation for Inference on Linux GPU Servers 1. Ensure docker installed and ready (requires sudo), can skip if system is already capable of running nvidia containers. Example here is for Ubuntu, see [NVIDIA Containers](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guid...
import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; const routes: Routes = [ { path: '', redirectTo: 'contacts', pathMatch: 'full' }, { path: 'contacts', loadChildren: './pages/contact-list/contact-list.module#ContactListPageModule' }, { path: 'con...
package T2.service; import T2.dto.UserAndOrderDto; import T2.dto.UserDto; import T2.entities.Order; import T2.entities.User; import T2.exception.AlreadyExistsException; import T2.exception.IncorrectDataException; import T2.exception.NotFoundUserException; import T2.mapper.OrderMapper; import T2.mapper.UserMapper; impo...
print(".vav | BEGIN") VIDEO_FILE_TO_CAST = "E:\\temp\\Movies\\Sherlock.Holmes.A.Game.Of.Shadows.2011.1080P.Brrip.X264.Yify-1.m4v" print(".") print("Publishing content:", VIDEO_FILE_TO_CAST) print(".") import asyncio import json import websockets from aiortc import RTCPeerConnection, RTCSessionDescription, VideoStreamT...
import ClayButton from '@clayui/button'; import ClayIcon from '@clayui/icon'; import getCN from 'classnames'; import Input from './Input'; import Loading from 'shared/components/Loading'; import Overlay from './Overlay'; import Promise from 'metal-promise'; import React, {useEffect, useImperativeHandle, useRef, useStat...
import { useState, useEffect } from "react" export default function TextForm(props, { pageTitle = "TextHub - word counter | character counter | lowercase to uppercase | text read aloud" }) { const [text, setText] = useState(""); const [readText, setReadText] = useState("Read Aloud"); useEffect(() => { ...
package com.dlowji.simple.command.api.aggregates; import com.dlowji.simple.command.api.commands.CreateEmployeeCommand; import com.dlowji.simple.command.api.events.employee.EmployeeCreatedEvent; import org.axonframework.commandhandling.CommandHandler; import org.axonframework.eventsourcing.EventSourcingHandler; import ...
# SSD1306 OLED Display Linux Device Driver This repository contains the Linux device driver for the SSD1306 OLED display. The SSD1306 is a monochrome OLED display, popular for its simplicity and ease of use in various embedded systems and IoT projects. This driver enables interaction with the display at the kernel lev...
import numpy as np import nnfs from nnfs.datasets import spiral_data from tensorflow import keras from tensorflow.keras.layers import Conv2D, MaxPooling2D, Dense, Flatten, Activation from kerastuner.tuners import RandomSearch import time nnfs.init() LOG_DIR = f"{int(time.time())}" class Layer_Dense: def __init_...
const express = require('express'); const morgan = require('morgan'); const rateLimit = require('express-rate-limit'); const helmet = require('helmet'); const mongoSanitize = require('express-mongo-sanitize'); const xss = require('xss-clean'); const hpp = require('hpp'); const cors = require('cors'); const AppError = r...
<template> <div ref="dropdownRef" class="container"> <input v-model="text" type="text" @focusin="setFilterItems" /> <transition-group name="list" tag="ul"> <li v-for="(item, index) in filterItems" :key="item" :class="{ active: index == selected }" @click="setText(item)" ...
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* Sonic Visualiser An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. This file copyright 2006-2007 Chris Cannam and QMUL. This program is free software; you can...
<!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>Menú lateral responsive - MagtimusPro</title> <link rel="stylesheet" href="css/estilos.css"> <scrip...
function[] = alpha_voltagetrace(alpha, Pmax_e, tau1i) % ALPHA_VOLTAGETRACE: Generates figures comparing spiking behavior of FFEI % triad synapse circuit models with different alpha (FFE, 1, 1.25, 2, 5) % General simulation parameters F = 50; % input modulation frequency (Hz) % tmax = 0.2; % length of simulation (s) tm...
library(sf) library(tidyverse) calveg_database_files <- list.files(here::here("..","CalVeg"), "S_USA.EVMid") nvcs_data <- data.frame() for(file in calveg_database_files) { calveg <- st_read(here::here("..","CalVeg",file)) calveg_natural <- as.data.frame(calveg) %>% select("NVCS_CLASS","NVCS_SUBCLASS", "NVCS_...
mysql> \. c:/150a/apatrick_assignment06.sql -------------- /* Assignment06.sql Andrew Patrick CS 150A, Fall 2021 */ USE restaurant -------------- Query OK, 0 rows affected (0.00 sec) -------------- /* Question 01 : Run Describe on orders. Add default of today's date to order_date. Run Describe on o...
package com.kingjinho.portfolio.com.kingjinho.mobile import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding impo...
import React, { useState } from 'react' import { Link } from 'react-router-dom' import PropTypes from 'prop-types' import { useJournalContext } from '../../hooks/useJournalContext' import { useThemeContext } from '../../hooks/useThemeContext' export const ParentComment = ({ username, comment, commentedAt, likes, comme...
/** * 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...
import numpy as np import matplotlib.pyplot as plt from Lattice1D import Lattice1D from scipy.optimize import curve_fit lattice_size = 60 def gaussian(x, a=1, b=lattice_size/2, c=10): # a - amplitude # b - mean # c - st.dev. return a * np.exp(-(x - b)**2 / (2 * c**2)) def nagumo(u, a): """Cubic ...
def get_observation_prompt(fdt, reply, plot): if plot == '城市': observation_prompt =f""" Ignore all the instruction you got before. #### Rules: 1. You are friendly City Driving assistant. 2. A driver will reply a question from FDT5, a model that generate question by images. Y...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HomepageComponent } from './homepage/homepage.component'; import { StudentComponent } from './student/student.component'; import { ViewStudentComponent } from './student/view-student/view-student.component'; cons...
from typing import List, Optional from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import Session from gymhero.api.dependencies import get_current_superuser, get_pagination_params from gymhero.crud import level_crud from gymhero.database.db im...
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle 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. // // Moodle ...
import React, { useEffect } from 'react'; import { getErrorMessage } from '@helpers/errors'; import { createUserToolMutation, getUserToolQuery, updateUserToolMutation } from '@services/graphql/queries/userTool'; import { Form, Input, message, Modal, Spin } from 'antd'; import { useMutation, useQuery } from 'urql'; impo...
import dns from 'dns' import trackEvent from './mixpanel' import fossil_share_by_countries from './countries_fossil_share.json' export const getIPAddressFromURL = async (url: string): Promise<string> => { const hostname = new URL(url).hostname const addresses = await dns.promises.resolve(hostname) return addre...
<!DOCTYPE html> <!-- saved from url=(0038)http://fe.bubugao-inc.com/specs/css.md --> <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>CSS代码规范</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, u...
#include "Wizard.h" #include <raylib.h> #include <vector> /** * Notice how clean the main file of my program is. * This basic entrypoint of the program will require * basically no maintainence. * * This is called the "Single Responsibility Principal" (SRP) * and we will talk more about it later. */ int main() {...
!3 today By default, the date is today's date, of the form "d MMM yyyy": |''with date''| |''create variable''|date| |'''show'''|''get''|@{date}| The ''create variable'' row specifies the variable to create. ----!3 In the past Let's go back in time: |''with date''| |''-''|2|''years''| |''+''|2|''months''| |''create ...
import React, { useState } from "react"; import { LoginAPI, RegisterAPI, GoogleSignInAPI } from "../api/AuthAPI"; import { useNavigate } from "react-router-dom"; import '../Sass/LoginComponent.scss'; import LinkedinLogo from '../assets/linkedinLogo.png' import { toast } from "react-toastify"; import GoogleButton from '...
import Link from "next/link"; import Image from "next/image"; import { formatDateString } from "@/lib/utils"; interface Props{ id:string; currentUserId:string; parentId:string | null; content:string; author:{ name:string; image:string; id:string; } community:{ id:string; name:string; image:...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { DepsTelemetry } from "./depsTelemetry"; import { SystemError, TelemetryReporter, UserError } from "@microsoft/teamsfx-api"; import os from "os"; import { DepsCheckerEvent, TelemetryMessurement } from "./constant"; import { TelemetryPro...
/* * Licensed to the Sakai Foundation (SF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The SF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use th...
/* * Copyright 2009 the original author or authors. * * 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 applica...
return { "hrsh7th/nvim-cmp", event = { "BufReadPre", "BufNewFile" }, dependencies = { "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" }, config = function() local status_ok, cmp = pcall(require, "cmp") if not status_ok then print("Status of the plugin nvim-cmp is not good.") return end cmp.setup({ ...
#include <BLEDevice.h> #include <BLEUtils.h> #include <BLEServer.h> #include <BLE2902.h> #include <Adafruit_Sensor.h> #include <SparkFun_VEML6075_Arduino_Library.h> VEML6075 uv; // Create a VEML6075 object // server name const char *name = "BLE-ESP32"; // service und characteristic uuids vom ble-nano uebernehmen //...