text
stringlengths
184
4.48M
/*************************************************************************************************/ /*! \file login_command.cpp \attention (c) Electronic Arts. All Rights Reserved. */ /*************************************************************************************************/ /**************...
import configparser import requests import streamlit as st from langchain import OpenAI from langchain.callbacks import get_openai_callback import os LANGUAGE_INSTRUCTIONS_DICT = { # "Chinese": "- 请使用中文输出\n", "English": "- Please output English.\n", } # New: Dictionary for academic paper section prompts PAP...
import { createAsyncThunk } from "@reduxjs/toolkit"; import { getBlogAPI, getBlogsAPI } from 'apis/axios/blog/get' import { REDUX_SLICE_NAMES, BLOG_DETAILS_DATA_FIELDS, BRIEF_BLOG_DATA_FIELDS } from 'utilities/constants' import { briefBlogsSeletor } from './BlogsSlice' import { RequestBriefBlogsInfoPr...
import { Component } from '@angular/core'; import {AbstractControl, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators} from "@angular/forms"; import {AuthServiceService} from "../services/auth-service.service"; import {Router} from "@angular/router"; @Component({ selector: 'app-registration', templ...
import { BottomSheetModal, BottomSheetModalProvider, } from "@gorhom/bottom-sheet"; import React, { ReactNode, useCallback, useEffect, useMemo, useRef, } from "react"; import { StyleSheet, View } from "react-native"; import OutsidePressHandler from "react-native-outside-press"; import IconButton from "../...
import { useState } from "react" import Searching from "../../general/Searching" import { Card, CardActions, CardContent, CardHeader, IconButton, Typography } from "@mui/material" import { Link } from "react-router-dom" import { GridDeleteIcon } from "@mui/x-data-grid" import EditIcon from '@mui/icons-material/Edit'; i...
import pytest from flask import url_for from app.models import User def test_get_register(test_client, test_app): """Test registration page access.""" with test_app.test_request_context(): response = test_client.get(url_for('main.register'), follow_redirects=True) assert response.status_code =...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { UserComponent } from './main/user/user.component'; import { AddUserComponent } from './main/user/add-user...
//Interface interface CamisetaBase{ setColor(color); getColor(); } //Decorador function estampar(logo: string){ return function(target: Function){ target.prototype.estampacion = function():void{ console.log("Camiseta estampada con el logo de: "+logo); } } } //Clase (molde d...
function xq = lanczos(t, x, tq, a) % xq = LANCZOS(t, x, tq, a) % % Interpolate a signal using Lanczos kernel. % % INPUT: % t time of the original signal, must be equally spaced % x original signal % tq requested time for interpolated signal % a scale factor for Lanczos kernel % ...
>>>> ```yaml 标题: 4.变量、作用域、内存 variable、scope、memory 摘要: - 变量与原始值、引用值 - 执行上下文 - 垃圾回收 ``` <<<< 1.原始值 & 引用值 primitive value & reference value ES的变量可包含2种值类型: 原始值、引用值。 "原始值 primitive value"是最简原子化数据单位。 "引用值 reference value"是由多个值一起构成的对象。 存储原始值的变量,在访问该变量时,直接访问该原始值。称"按值访问(by value)"。 存储...
/* * Copyright (C) 2016 - present Instructure, Inc. * * 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, version 3 of the License. * * This program is distributed in the hope...
// // Document.swift // Blocks // // Created by 沈畅 on 5/8/19. // Copyright © 2019 Chang Shen. All rights reserved. // import UIKit class Document: UIDocument { struct BlocksBundle: Codable { let blocks: [Block] let deletedUUIDs: Set<UUID> } static let blocksChangedNotificatio...
import io import datetime import zipfile import functools import numpy as np import pandas as pd import requests import slr import slr.wind def missing2nan(value, missing=-99999): """convert the value to nan if the float of value equals the missing value""" value = float(value) if value == missing: ...
import { Button, HStack, Heading, Image, List, ListItem, Spinner, Text, } from "@chakra-ui/react"; import useGenres, { Genre } from "../hooks/useGeners"; import getCroppedImageUrl from "../services/image-url"; import GenreSkeleton from "./GenreSkeleton"; interface Props { onSelectGenre: (genre: Genre...
<template> <v-col cols="12" md="4"> <div class="flip-card my-16"> <div class="flip-card-inner border rounded-xl bg-white"> <div class="flip-card-front"> <canvas id="graphe" class="px-4 py-1"> </canvas> </div> </div> </div> </v-col> <v-col cols="12" md="8"> ...
import { Router } from "express"; import Category from '../model/Category.js'; import { sanitizeInput } from "../utils/index.js"; const router = new Router(); /** * @swagger * /categories: * get: * summary: Get all categories * tags: [Categories] * responses: * "20...
import { Box,CssBaseline, Stack, useTheme } from '@mui/material' import React from 'react' import Header from '../components/Header'; import Title from '../components/Title'; import SmallTitle from '../components/SmallTitle'; import GroupButton from '../components/GroupButton'; import UseTitle from '../components/UseT...
package ex02_loop; public class Ex03_break { public static void main(String[] args) { // break문 // switch문을 종료할 때 사용한다. // 반복문(for, while)을 종료할 때 사용한다. // 모금 목표 : 100000원 // 한 번에 30원씩 모금 // 1회 모금액 30원 현재 30원 // 2회 모금액 30원 현재 60원 // ... int total = 0; int money = 30; int serial = 0; ...
/** * @file Endianness.ts @verbatim 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 law or agreed to in writing, ...
package org.jsp.adminBus.service; import java.util.Optional; import org.jsp.adminBus.dao.AdminDao; import org.jsp.adminBus.dto.Admin; import org.jsp.adminBus.dto.ResponseStructure; import org.jsp.adminBus.exception.LoginInvalidException; import org.springframework.beans.factory.annotation.Autowired; import org.spring...
import { syntaxTree } from '@codemirror/language' import type { EditorState, Extension, Range } from '@codemirror/state' import { RangeSet, StateField } from '@codemirror/state' import type { DecorationSet } from '@codemirror/view' import { Decoration, EditorView, WidgetType } from '@codemirror/view' interface ImageWi...
import React, { useState, useEffect } from 'react'; import apiClient from '../../spotify'; import './favorites.css'; export default function Favorites() { const [favorites, setFavorites] = useState([]); useEffect(() => { const fetchFavorites = async () => { try { const response = await apiClient...
#' Independence Metropolis-Hastings #' #' @param x The current state (scalar or numeric vector). #' @param log_target A function taking a scalar or numeric vector that evaluates the log-target #' density, returning a numeric scalar. #' @param pseudo List specifying the pseudo-target (proposal distribution). If the li...
import React, { useMemo, Dispatch, createContext } from "react"; export interface IFirebaseData { id: string; amount: number; category: string; date: string; transactionType: string; description: string; } export type FirebaseDataContextType = { firebaseData: IFirebaseData[]; setFirebaseData: Dispatch...
// The boilerplate includes a definition of repeat. repeat will take a Function operation, and a Number num, and invoke operation num times: // // var count = 0 // repeat(function() { // count++ // }, 100) // // console.log('executed %d times.', count) // // => executed 100 times. // // BUT no...
# Documentation This section is related to your work on clean code and documentation in week 5. I originaly failed to make my part of the app that was due for week 3,, but I am now commenting it as I finished it during this week's practical. ## Clean Code Rules ### Rule 1: Meaningful Variable Names **Summary**: In ...
+++ title = "How to use, with Codex" author = ["Shane Mulligan"] date = 2021-10-11T00:00:00+13:00 keywords = ["codex", "pen", "openai", "emacs"] draft = false +++ ## Summary {#summary} This is a prompt for obtaining examples of how to use something, such as a function or an import. ## Bindings {#bindings} {{< high...
package com.nopcommerce.common; import org.testng.annotations.Test; import commons.BasePage; import commons.BaseTest; import commons.PageGeneratorManager; import pageObjects.nopCommerce.portal.UserAddressPageObject; import pageObjects.nopCommerce.portal.UserCustomerInfoPageObject; import pageObjects.nopCommerce.porta...
<!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" ...
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2016 The Android Open Source Project 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/lic...
import 'package:flutter/material.dart'; import 'package:labsql/homepage.dart'; import 'package:labsql/createprofilepage.dart'; import 'package:labsql/myprofilepage.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatefulWidget { const MyApp({super.key}); @override State<MyApp> createState()...
import { Component } from '@angular/core'; import { FormArray, FormGroup } from '@angular/forms'; import { Router } from '@angular/router'; import { Observable } from 'rxjs'; import { DialogService } from '@tylertech/forge-angular'; import { Utils } from 'src/utils'; import { IProfile } from 'src/app/shared/interfaces...
/* Q. Level wise linkedlist Given a binary tree, write code to create a separate linked list for each level. You need to return the array which contains head of each level linked list. Input format : The first line of input contains data of the nodes of the tree in level order form. The data of the nodes of the tree ...
import { TestBed } from '@angular/core/testing'; import { ContactsService } from './contacts.service'; import { HttpClient, HttpErrorResponse } from '@angular/common/http'; import { of, defer } from 'rxjs'; import { contact } from '../shared/contact.model'; describe('ContactsService', () => { function asyncData<T>(...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using BusinessObject.BusinessObject; using Service.Interface; using AutoMapper; using BusinessObject.DTO.Response; using...
import { Component, Input, OnInit } from '@angular/core'; import { Comment } from '../../interfaces/comment.model'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { PostService } from '../../services/post.service'; import { getAuth } from 'firebase/auth'; import { app } from '../../../app.m...
package com.github.hemoptysisheart.parking.client.google import com.github.hemoptysisheart.parking.client.google.data.AutocompleteParams import com.github.hemoptysisheart.parking.client.google.data.DirectionsParams import com.github.hemoptysisheart.parking.client.google.data.DirectionsRoute import com.github.hemoptysi...
/* O objetivo desse VPL é praticar os comandos de entrada e saída específicos de C++ (cin, cout) e também a utilização do tipo string. Não utilize outros comando de entrada como o getline. Escreva um programa que lê apenas uma única palavra da entrada. Em seguida, seu programa deve contar o número de vogais presente n...
import React, { useState } from "react"; import { AiOutlineArrowRight as SendArrow } from "react-icons/ai"; interface IMessagesInput { handleSendMessage: (value: string) => void; } export const MessagesInput = ({ handleSendMessage }: IMessagesInput) => { const [messageValue, setMessageValue] = useState<string>(""...
import { useState } from 'react'; import BoxShadow from '../../../../components/BoxShadow/BoxShadow'; import './Board.scss'; import { CellData, Mark, TurnsData } from '../../../../utils/types/interfaces'; import { renderIcon } from '../../../../utils/helpers/helpers'; interface BoardProps { onSelectCell: (rowIndex: ...
# 수들의 합 ----- ### 🌞 문제 서로 다른 N개의 자연수의 합이 S라고 한다. S를 알 때, 자연수 N의 최댓값은 얼마일까? ### 📝 입력 첫째 줄에 자연수 S(1 ≤ S ≤ 4,294,967,295)가 주어진다. ### 👋 출력 첫째 줄에 자연수 N의 최댓값을 출력한다. ### 🚩 입출력 예제 - 입력 200 - 출력 19 ### 👩‍💻 풀이 ```python s = int(input()) answer = 0 start = 1 end = s while start <= end: mid = (start + ...
<?php namespace App\NotificationPublisher\Infrastructure\Persistence\Repository; use App\NotificationPublisher\Domain\Entity\Notification; use App\NotificationPublisher\Domain\Repository\NotificationRepository; use App\NotificationPublisher\Infrastructure\Persistence\Entity\DoctrineNotification; use DateTime; use Doc...
package software.wings.service.impl.yaml.handler.infraprovisioner; import static io.harness.data.structure.EmptyPredicate.isEmpty; import static io.harness.data.structure.EmptyPredicate.isNotEmpty; import static io.harness.exception.WingsException.USER; import static io.harness.validation.Validator.notNullCheck; impo...
<?php namespace Devinci\Bladekit; use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\Log; class DirectiveRegistry { /** * Register all Bladekit directives. * * @return void */ public static function registerAllDirectives() { self::registerBladekitStylesDirec...
package proj; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpSession; import jakarta.ws.rs.*; import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; @Path("/bid") public class AuctionController { @Context private HttpServletReq...
<script setup> import { reactive, inject, watch, ref, onMounted} from 'vue'; import axios from 'axios'; import debounce from 'lodash.debounce'; import CardList from '../components/CardList.vue' const { cart, addToCart, removeFromCart } = inject('cart'); const items = ref([]); const filter...
<?php namespace App\Events; use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illumina...
/* |-------------------------------------------------------------------------- | Routes |-------------------------------------------------------------------------- | | This file is dedicated for defining HTTP routes. A single file is enough | for majority of projects, however you can define routes in different | files ...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. // Provides test cases for TextBoxBase properties introduced in Orcas. namespace Test.Uis.TextEditing { #regio...
import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:login_test/pages/login.page.dart'; class HomePage extends StatefulWidget { const HomePage({super.key}); @override State<HomePage> createState() => _HomePageState(); } class _HomePageState extends State<Ho...
import { Injectable } from '@angular/core'; import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor, } from '@angular/common/http'; import { Observable } from 'rxjs'; import { AccountService } from '../_services/account.service'; import { User } from '../_models/user'; import { catchError, take } from 'rxjs/o...
#ifndef LIBIM_LOG_LEVEL_H #define LIBIM_LOG_LEVEL_H #include <stdexcept> #include <string_view> namespace libim { struct LogLevel final { enum Level { Verbose = 8, Debug = 4, Info = 2, Warning = 1, Error = 0 }; ...
<!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"> <meta name="description" content=""> <meta name="author" content=""> <title>WeTrip</title> <link rel="i...
import {UserSecretKey, UserPublicKey, UserSigner, Mnemonic } from '@elrondnetwork/erdjs-walletcore/out'; import { JsonBIP44CoinTypeNode } from '@metamask/key-tree'; import sha256 from 'crypto-js/sha256'; import Hex from 'crypto-js/enc-hex' import * as bip39 from "bip39" export interface userAccount{ SK: UserSecr...
using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; public class World { internal static World world; internal Dictionary<Vector2Int, Chunk> chunks = new(); internal WorldSettings settings; internal WorldData data; internal WorldSettings.Gamerules gameru...
![Installation Guide For Project Elixir](https://i.imgur.com/42LxtAl.png) ### Installation Guide For Project Elixir on Redmi Note 12 Pro Speed / POCO X5 Pro 5G (redwood) ### **Note:** - The device must have an unlocked bootloader. If you are moving from Android 9/10/11/12/13 to Android 14, it is necessary CLEAN FLA...
# plugin The `plugin` transformer allows you to use a [plugin](../plugins.md) providing a custom transformer in your schema. This transformer has the following properties: - `name`: The name of the plugin. This is the path to the plugin file. - `args`: The arguments to pass to the plugin. This can be empty or any JS...
<template> <div class="home h-full w-4/5 lg:w-3/4 m-auto"> <section class="flex flex-wrap justify-between mb-8 mt-8 lg:mt-16"> <category-selector v-on:change-category="onChangeCategory" :categorySelected="category" :hasOptionForAll="true" /> <button @click="bulkDe...
namespace Tempore.Tests.Tempore.Server.Services; extern alias TemporeServer; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using FluentAssertions; using global::Tempore.Storage.Entities; using global::Tempore.Tests.Infraestructure; using Microsoft.Extensions.Logg...
import fs from 'fs'; import path from 'path'; import { ethers } from 'ethers'; import { initRpcApi, loadProvider } from './utils'; import ExchangeContract from './ExchangeContract'; import IERC20Contract from './IERC20Contract'; import FactoryContract from './FactoryContract'; import FarmContract from './FarmContract...
<!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>模块</title> </head> <body> <script> function createModule(str1, str2) { // 第一种方法:字面量定义...
import dotenv from 'dotenv'; dotenv.config(); import express from 'express'; import { fileURLToPath } from 'url'; import path, { dirname } from 'path'; import cookieParser from 'cookie-parser'; import favicon from 'serve-favicon'; import fs from 'fs'; import passport from 'passport'; import { Strategy as LocalStrategy...
from pygame import * from random import randint mixer.init() mixer.music.load('space.ogg') fire_sound = mixer.Sound('fire.ogg') font.init() font2 = font.Font(None,36) img_back = "galaxy.jpg" img_hero = "rocket.png" img_enemy = "ufo.png" img_bullet = 'bullet.png' score = 0 lost = 0 window = display.set_mode((700...
# Load Packages lapply(c("dplyr", "ggplot2", "move", "sf", "lubridate", "raster", "tidyr"), require, character.only = TRUE) # ################################################################################################################# # ### LOAD DATA ### # ################# # # Load Capture Data # trap.raw <- rea...
package org.ccs.app.core.authenticate.domain; import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.ToString; import org.ccs.app.core.authenticate.domain.converter.RoleCodeToStringConverter; import org.ccs.app.core.share.domain.BaseCreatedAndUpdatedDateTime; import org.hibe...
/** * Copyright 2008 - 2015 The Loon Game Engine 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 appl...
import { NextApiRequest, NextApiResponse } from "next"; import withHandler, { ResponseType } from "@libs/server/withHandler"; import client from "@libs/server/client"; import { withApiSession } from "@libs/server/withSession"; async function handler( req: NextApiRequest, res: NextApiResponse<ResponseType> ) { if...
'use client' import React from 'react' import CardAdminItem from './CardAdminItem' import ClassIcon from '../icons/ClassIcon' import UsersIcon from '../icons/UsersIcon' import PremiumIcon from '../icons/PremiumIcon' import { useCategory } from '@/utils/swr' import { useSession } from 'next-auth/react' import { usePathn...
import { useEffect, useState } from 'react'; import './mainApp.css' import Loading from './components/Loading'; import Job from './components/Job'; // API URL const apiURL = "https://course-api.com/react-tabs-project"; const TabsApp = () => { const [data, setData] = useState([]); const [loading, setIsLoading] = us...
import axios from "axios"; import React from "react"; import { setLoading, showMessage } from "../utils"; import "../css/other.css"; export default class Other extends React.Component { componentDidUpdate(props) { if (!props.display && this.props.display) { window.location.hash = "other"; ...
import Link from "next/link" import type { CreatureCategory } from "@prisma/client" import { prisma } from "@/server/db" import ImageCard from "../ui/ImageCard/ImageCard" import { ReactNode } from "react" type Props = { categorySlug: CreatureCategory["slug"] categoryTitle: CreatureCategory["title"] } const Creature...
""" Создать базовый шаблон для интернет-магазина, содержащий общие элементы дизайна (шапка, меню, подвал), и дочерние шаблоны для страниц категорий товаров и отдельных товаров. Например, создать страницы «Одежда», «Обувь» и «Куртка», используя базовый шаблон. """ from flask import Flask from flask import render_templ...
package sqlite import ( "database/sql" _ "github.com/mattn/go-sqlite3" "github.com/pkg/errors" ) var ErrMetisTxNotFound = errors.New("metis tx not found") type MetisTx struct { ID uint64 `json:"id" sql:"id"` TxHash string `json:"tx_hash" sql:"tx_hash"` TxData string `json:"tx_data" sql:"tx_data"` Pushed ...
import type * as T from "../types/openapi.js"; import { getSchemaId } from "./announce.js"; import { AnnouncementType, BroadcastAnnouncement } from "./dsnp.js"; import { getApi } from "./frequency.js"; import { bases } from "multiformats/basics"; import { hexToString } from "@polkadot/util"; import axios from "axios"; ...
import { Component } from '@angular/core'; import { state, style, trigger } from '@angular/animations'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], animations: [ trigger('box', [ state('start', style({ background: 'blue' })), state...
import { Box, Heading, Img, HStack, VStack, Text, Stack, keyframes } from '@chakra-ui/react' import React from 'react' import { DiHtml5, DiCss3, DiJavascript1, DiReact, DiNodejsSmall, } from 'react-icons/di' import { SiMongodb, SiExpress } from 'react-icons/si' import frontend from '../assets/frontend.jpg' import backe...
import { CornerType, ParticleType, RectangleType } from "./ParticleTypes"; import { addCenterGravity, addForce, update } from "./ParticleUtils"; import { MUTUAL_REPULSION_MULTIPLE } from "./constants"; export function getNewParticleArray(particles: ParticleType[]): ParticleType[] { return particles.map((particle) =>...
#include "lists.h" /** * add_nodeint - adds a new node at the beginning of a linked list * * @head: pointer to header pointer * @n: the number to insert * * Return: the address of the new elments, null otherwise. */ listint_t *add_nodeint(listint_t **head, const int n) { listint_t *start = NULL; if (head == ...
import React, { createContext, useReducer, useContext, useEffect, useCallback, ReactNode, } from "react"; type AuthState = { isAuthenticated: boolean; }; type AuthAction = { type: "LOGIN" } | { type: "LOGOUT" }; type AuthContextType = { state: AuthState; dispatch: React.Dispatch<AuthAction>; sign...
// // ViewController.swift // Todoey // // Created by Angela Yu on 16/11/2017. // Copyright © 2017 Angela Yu. All rights reserved. // import UIKit import RealmSwift class TodoListViewController: UITableViewController, UIGestureRecognizerDelegate { var todoItems : Results<Item>? let realm = try! ...
<?php if ( !function_exists('WPBaseTheme__PostTypeNoticia') ) { function WPBaseTheme__PostTypeNoticia() { $labels = array( 'name' => _x( 'Notícias', 'Post Type General Name', 'wpbasetheme' ), 'singular_name' => _x( 'Notícia', 'Post Type Singular Name', 'wpbasetheme' ), 'menu_name'...
package main import ( "backend/models" "context" "database/sql" "flag" "fmt" _ "github.com/lib/pq" "log" "net/http" "os" "time" ) const version = "1.0.0" type config struct { port int env string db struct { dsn string } jwt struct { secret string } } type AppStatus struct { Status strin...
#!/bin/bash # Function to check if a directory exists function check_directory() { local expanded_path=$(eval echo $1) if [ -d "$expanded_path" ]; then return 0 # Directory exists else return 1 # Directory does not exist fi } _load_completion() { CONFIG_DIR="$HOME/.config/tmuxp" ...
import React from 'react'; import GlobalStyle from './globalStyles'; import Home from './pages/HomePage/Home'; import Services from './pages/Services/Services'; import Players from './pages/Players/Players'; import SignUp from './pages/SignUp/SignUp'; import Contact from './pages/Contact/Contact'; import Terms from './...
package invest.megalo.adapter import android.content.Context import android.util.TypedValue import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView import android.widget.Toast import androidx.core.content.ContextCompat imp...
import './App.css'; import dayjs from 'dayjs'; import { useState, useEffect } from 'react'; import { enUS } from "@mui/material/locale"; import { LocalizationProvider } from '@mui/x-date-pickers'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import Container from "@mui/material/Container"; import Bo...
using HospitalCrud.Model; namespace HospitalCrud.Repositories { /// <summary> /// Interface for a data repository containing patients /// </summary> public interface IPatientRepository : IRepository<Patient> { /// <summary> /// Retrieve a patient by their CPF number /// </summary> /// <param name="cpf">T...
var db = require('../config'); var bcrypt = require('bcrypt-nodejs'); var Promise = require('bluebird'); var mongoose = require('mongoose'); var userSchema = mongoose.Schema({ username: { type: String, index: {unique:true}}, password: String }); var User = mongoose.model('User', userSchema); userSchema.pre('sav...
/* * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at * http://www.eclipse.org/legal/epl-2.0. * * This Source Code may also be made available under...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- RESPONSIVE --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- SEO --> <!-- KEYWORDS --> <meta name="keywords" content="Restaurante,comida,car...
import { ExtractJwt, Strategy } from 'passport-jwt'; import { PassportStrategy } from '@nestjs/passport'; import { Injectable } from '@nestjs/common'; import { jwtConstants } from '../jwt.constants'; import { AuthService } from '../service/auth.service'; // This code defines a JWT (JSON Web Token) strategy for authent...
import { Component, OnInit } from '@angular/core'; import { IHotel } from './models/hotel.model'; import { HotelsService } from './services/hotels.service'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'], }) export class AppComponent implements OnInit ...
// /**************************************************************************** // ** // ** Copyright (C) 2015-2022 M-Way Solutions GmbH // ** Contact: https://www.blureange.io/licensing // ** // ** This file is part of the Bluerange/FruityMesh implementation // ** // ** $BR_BEGIN_LICENSE:GPL-EXCEPT$ // ** Commercial ...
package mr import ( "fmt" "log" "sync" "time" ) func (t *task) ToReply(nReduce int, r *RequestTaskReply) { r.InputFiles = make([]string, len(t.inputFiles)) copy(r.InputFiles, t.inputFiles) r.TaskNum = t.tid.id r.NumReducers = nReduce r.Type = t.ttype r.WorkerId = t.assignedId r.ReduceTaskNum = t.tid.reduce...
<template> <div class="Feed"> <content-input class="Feed_editor Feed_item p-15 mb-20 br-s bg-bg-weak shadow-s" :placeholder="placeholder" :read="read" :constellation="constellation" :is-trigger="true" @focus="isEditorActive = true" ...
#ifndef AST_H #define AST_H #include "src/token.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/STLExtras.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Function.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Type.h" #include "llvm/IR/Ver...
#pragma once #include "nn_layer.h" class LinearLayer : public NNLayer { private: const float weights_init_threshold = 0.01; Matrix W; Matrix b; Matrix Z; Matrix A; Matrix dA; void initializeBiasWithZeros(); void initializeWeightsRandomly(); void computeAndStoreBackpropError(Matrix& dZ); void computeAndSt...
// importar la función sum del archivo app.js const { sum } = require('./app.js'); // comienza tu primera prueba test('adds 14 + 9 to equal 23', () => { //dentro de la prueba llamamos a nuestra función sum con 2 números let total = sum(14, 9); // esperamos que la suma de esos 2 números sea 23 expect(t...
import React, { useState } from 'react'; import { useDispatch } from "react-redux"; import { Link, useNavigate } from 'react-router-dom'; import portalogo from "../../assets/image/learningportal.svg"; import { useRegisterMutation } from "../../features/auth/authApi"; export default function StudentRegistration() { ...