text
stringlengths
184
4.48M
import { get, has, isEmpty, isNil } from "lodash"; import { useRouter } from "next/router"; import { useEffect, useState } from "react"; import { useAccount } from "wagmi"; import { constants } from "../../config"; import { fetchUserDetails, useAppDispatch, useAppSelector } from "../../store"; import { isRight } from "...
package com.googlecode.lanterna.gui2; import java.io.IOException; import java.util.Arrays; import java.util.HashSet; import java.util.Set; /** * Test/example class for various kinds of window manager behaviours * @author Martin */ public class SimpleWindowManagerTest extends TestBase { public static void main(...
def infinite_fibonacci(): x_1=0 x_2=1 #The yield keyword in python works like a return with the only difference is that instead of returning a value, # it gives back a generator object to the caller. #When a function is called and the thread of execution finds a yield keyword in the function, the function #exe...
from flask import Flask, request, jsonify, render_template from flask_cors import CORS import sqlite3 import json from impressao_ci import imprimir_ci from iscas import localiza_iscas app = Flask(__name__, template_folder='templates', static_folder='static') DATABASE = 'bd_norte.db' @app.route('/') def index(): ...
import React from "react"; import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; import Navbar from "./components/Navbar"; import Home from "./components/Home"; import SearchResults from "./components/SearchResults"; import BookDetails from "./components/BookDetails"; import "./App.css"; function ...
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:dartz/dartz.dart'; import 'package:food_court/repository/rating_repository.dart'; import 'package:mofeed_owner/features/auth/data/user_storage.dart'; import 'package:mofeed_shared/constants/fireabse_constants.dart'; import 'package:mofeed_shared/dat...
const mongoose = require('mongoose'); const { isURL } = require('validator'); const { VALIDATION_ERROR } = require('../utils/constants').ERROR_MESSAGES; const cardSchema = new mongoose.Schema({ name: { type: String, required: true, minLength: 2, maxLength: 30, }, link: { type: String, req...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>DevFolio</title> <link href="images/favicon.ico" rel="icon" size="32x32"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1...
import React, { useState, useEffect} from "react"; import generateRandomKey from "../helpers/randomKey"; import Place from "../components/Place"; const Places = () => { const [ placeKeys, setPlaceKeys ] = useState([]); const [ placeValues, setPlaceValues ] = useState([]); const [ placeLoaded, setPlaceLo...
package E_Commerce.Client.oauth; import E_Commerce.Client.domain.AuthenticationType; import E_Commerce.Client.domain.Customer; import E_Commerce.Client.service.CustomerService; import E_Commerce.Client.service.ICustomerService; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation....
--- title: 《c++之路》用户定义的类型--User-Defined Types tags: - c++ - Types keywords: 'c++,Types,分片下载' description: 文件下载在文件大小、网络带宽等限制下就会呈现劣化趋势,故此要解决特殊手段解决 abbrlink: '8905' date: 2023-07-29 21:41:08 categories: photos: cover: sticky: --- c++除了内置类型外,还支持用户自定义类型,以便用户可以方便的编写高级应用程序,此处我们主要学习`struct`, `union`,`enum`,`class` <!-- m...
CREATE TABLE emp ( `Emp_id` INT NOT NULL, `Emp_name` VARCHAR(40), `Dept` VARCHAR(40), `Salary` INT, PRIMARY KEY (`Emp_id`) ); INSERT INTO emp (`Emp_id`, `Emp_name`, `Dept`, `Salary` ) VALUES ('1', 'Ram', 'HR', '10000'), ('2', 'Amrit', 'MRKT', '20000'), ('3', 'Ravi', 'HR', '30000'), ('4', 'Nitin', 'MRKT', '40000'), ('5...
package ar.edu.unlp.info.oo1.ejercicio18; import java.time.LocalDate; public abstract class Contrato { protected LocalDate inicioContrato; protected Empleado empleado; public Contrato(LocalDate inicioContrato, Empleado empleado) { this.inicioContrato = inicioContrato; this.empleado = empleado; } public ...
<?php use App\Http\Controllers\PostController; use Illuminate\Support\Facades\Route; use App\Http\Controllers\CategoryController; use App\Http\Controllers\HomeController; use App\Http\Controllers\UserController; /* |-------------------------------------------------------------------------- | Web Routes |-------------...
{% extends 'base.html.twig' %} {% block title %}Products{% endblock %} {% block body %} <style> .example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; } .example-wrapper code { background: #F5F5F5; padding: 2px 6px; } </style> <div class="example-wrapper"> <h1 ...
package network.palace.dashboard.utils; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import lombok.Getter; import network.palace.dashboard.Dashboard; import network.palace.dashboard.Launcher; import network.palace.dashboard....
import React, { useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { FieldArray, Formik } from 'formik'; import { FormikHelpers, FormikProps } from 'formik/dist/types'; import { array as validateArray, object as validateObject } from 'yup'; import dayjs from 'dayjs'; import { R...
import React, { useEffect, useState } from "react"; import useSwiper from "swr"; import MovieCard from "../component/movie/MovieCard"; import { fetcher, keyId } from "../config"; // https://api.themoviedb.org/3/search/movie?api_key= const MoviesPage = () => { const [itemOffset, setItemOffset] = useState(0); // Sim...
import { forwardRef, Inject, Injectable } from '@nestjs/common'; import { ShopItem } from 'src/shop/shop-item.entity'; import { UserService } from '../user/user.service'; import { ShopService } from '../shop/shop.service'; import { AddItemEntity, AddProductToBasketRes, GetTotalBasketPriceRes, ListProductFromBasketRes, ...
import { Field, InputType } from "type-graphql"; @InputType() export class UpdatePersonDto { @Field() userid: number; @Field({ nullable: true }) name?: string; @Field({ nullable: true }) email?: string; @Field({ nullable: true }) mobile?: string; @Field({ nullable: true }) gender?: string; @...
package com.example.video.streaming.controller; import static com.example.video.streaming.helper.VideoCreator.createBasicVideoResponseDto; import static com.example.video.streaming.helper.VideoCreator.createVideoRequestDto; import static com.example.video.streaming.helper.VideoCreator.createVideoResponseDto; import st...
import { useGithubQuery } from "../../../../types.d"; import { ContributionType, ContributesData } from "./types"; const judgeContributionType = (contributionCount: number) => { switch (contributionCount) { case 0: return ContributionType.NONE; case 1: return ContributionType.ONCE; case 2: ...
import random # my global variables obstacles = [] my_x = -97 my_y = 197 def does_it_overlap(obstacles, point): """ This function checks if the obstacle we are trying to create overlaps with any of the obstacles already in the list. :Params - obstacles - (list of tuples) list of aleady existing obst...
import * as XLSX from 'xlsx' describe('Login Fallido', function() { beforeEach(() => { cy.task('logMessage', 'Iniciando prueba para verificar Listener'); cy.visit(Cypress.env('baseUrl')); }); it('Intento de inicio de sesión fallido con datos del Excel', () => { cy.readFile(...
<!-- File containing signup page @author: Dominik Vágner @email: xvagne10@stud.fit.vutbr.cz --> {% extends "layout.html" %} {% from "macros/fields.html" import render_text_field, render_boolean_field, render_alert%} {% block title %} Login - Smartcity {% endblock %} {% block body %} <div class="vh-100 d-flex ju...
Secure API Endpoints in Ubuntu: Step-by-Step Guide This tutorial will guide you through the process of setting up and securing API endpoints in Ubuntu using Node.js, Express, HTTPS, and JWT authentication. Step 1: Install Prerequisites First, ensure Node.js and npm (Node Package Manager) are installed on your Ubuntu s...
import { call, put, select, takeLatest } from "redux-saga/effects"; import { requestUsers, addUsers, setError, deleteUser, DeleteUserPayload, RequestUsersPayload } from "../../slices/users"; import { getUsers, deleteUser as deleteUSerRequest } from "../../../api/users"; import { PayloadAction } from "@redux...
import '../../dbHelper/constants.dart'; import 'package:flutter/material.dart'; import '../charts.dart'; import '../panel_left/panel_left_page.dart'; class Product { String name; bool enable; Product({this.enable = true, required this.name}); } class PanelRightPage extends StatefulWidget { @override _Pane...
import numpy as np import matplotlib.pyplot as plt # Load matrix data from CSV files, treat all data as strings matrix1 = np.genfromtxt('matrix1.csv', delimiter=',', dtype='str') matrix2 = np.genfromtxt('matrix2.csv', delimiter=',', dtype='str') # Use the first row as headers headers = matrix1[0, :] matrix1 = matrix1...
import React from 'react'; import { ComponentStory, ComponentMeta } from '@storybook/react'; import { LeaderBoardTable } from './LeaderBoardTable'; // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export export default { title: 'Lockspread/LeaderBoardTable', comp...
import { Elysia } from "elysia"; import { getAllOrdersWithBookDetails, getAllCustomers, getAllBooks } from "../handler/index"; // Define routes using the Elysia router const appRoutes = new Elysia() // Route to retrieve all orders with book details .get('/orders', async ({set}) => { try { ...
import bind from 'decorators/bind'; import Component from 'components/component'; import React from 'react'; import PropTypes from 'prop-types'; import {addUser} from 'actions/users'; import New from './new'; export default class NewUserContainer extends Component { static propTypes = { fragments: PropTypes.obj...
using System.Linq; namespace BetterDay.Models { public struct Percentage { public DateTime startDate { get; set; } public DateTime endDate { get; set; } public int totalTasks { get; set; } public int tasksDone { get; set; } public float percentage { get; set; } } ...
# Minor_DET_IoT_AnoukPebesma <h1>Hoe maak je een Philips Hue in minder dan 5 euro?</h1> In dit artikel/verslag neem ik jou meer naar hoe jij dit kan maken. Ik zal hierbij de stappen uitleggen en de daarbij gemaakte fouten ook laten zien. <h2> Wat heb je nodig? </h2> <li>1x Arduino Board (ESP8266)</li> <li>1x Jump wi...
<?php /** * CubeWp admin gallary field * * @version 1.0 * @package cubewp/cube/fields/admin */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * CubeWp_Admin_Gallery_Field */ class CubeWp_Admin_Gallery_Field extends CubeWp_Admin { public function __construct( ) { add_filter('cubewp/admin/post/ga...
@html_text_substitution=readme.txt|<a href="readme.html">readme.txt</a> @external-css=allegro.css @document_title=Allegro `const'-correctness <center><h1><b> Allegro `const'-correctness </b></h1></center> <hr> <i> This is a short document about the introduction of `const'-correctness to Allegro. It details what changes...
<?php /** * novena_wp functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package novena_wp */ if ( ! defined( '_S_VERSION' ) ) { // Replace the version number of the theme on each release. define( '_S_VERSION', '1.0.0' ); } /** * Sets up theme defaults and...
package DiningPhilosopher; import java.util.Random; /** * Created by tianbingleng on 2/12/2017. */ public class Philosopher implements Runnable{ private int id; private Chopstick leftChopstick; private Chopstick rightChopstick; private Random random; private int eatingCounter; private volat...
// Copyright 2023 lucarondanini // // 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 t...
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <title> @yield('title') </title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" sizes="180x180" href="{{asset('storage/app/...
using Audiobookshelf.ApiClient.JsonConverters; using System; using Newtonsoft.Json; namespace Audiobookshelf.ApiClient.Dto { public class BookChapter { /// <summary> /// The ID of the book chapter. /// </summary> [JsonProperty("id")] public int Id { get; private set; } ...
import datetime import logging from typing import Annotated, Literal from fastapi import Depends, HTTPException, status from fastapi.security import OAuth2PasswordBearer from jose import ExpiredSignatureError, JWTError, jwt import bcrypt from api.database import database, user_table logger = logging.getLogger(__name_...
- What is Database? - database server - RDBMS type / NoSQL (eg. MongoDB) - SQL-91 is the standard to write the queries - database consists of - table - rows and colummns (a single column is a tuple) - products - postgresql, mysql, MariaDB, Oracle, MySQL server, Cassandra, MongoDB etc. - ...
/** @jsxImportSource @emotion/react */ import { css } from "@emotion/react"; import Image from "next/image"; import React, { useEffect, useState, useRef } from "react"; interface Props { label: string; visible?: boolean; color?:string; setVisible?: React.Dispatch<React.SetStateAction<boolean>>; withIcon?: b...
import React, { Provider } from 'react' import { Alert, Image, StatusBar } from 'react-native' import { Text, View } from 'react-native-animatable' import { SafeAreaView } from 'react-native-safe-area-context' import { styles } from '../Stylos/Styles' import RadialGradient from 'react-native-radial-gradient'; import { ...
function validator(value) { // 1.传入15位或者18位身份证号码,18位号码末位可以为数字或X const idCard = value // 2.身份证中的X,必须是大写的 if (value.includes('x')) return '证件号码错误' // 3.判断输入的身份证长度 if (!(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(idCard))) return '证件号码错误' // 4.验证前两位城市编码是否正确 const aCity = { 11: '北京', 12: '天津', ...
import { Typography } from '@mui/material'; import React from 'react'; type ReportEntry = { soma: number; qualificacao: string; }; type Report = { [area: string]: ReportEntry; }; type ReportComponentProps = { report: Report | undefined; // Use the correct prop name and allow for 'undefined' }; const bulletS...
package com.sterotype; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import java.util.List; @Component("emp") public class Employee { @Value("coder") private String name; @Value("1") private int id; @Value(("#{ad}")) private List<...
import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:tenantmodule/services/payments_service.dart'; class UtilityPaymentTab extends StatefulWidget { const UtilityPaymentTab( {Key? key, required this.unitItems, required this.paymentOptions, required t...
import { AuthService } from '@app/auth/services/auth.service'; import { UserCredentials } from '@app/auth/user-credentials.interface'; import { ServerLogger } from '@app/logger/logger'; import { ConversationService } from '@app/messages-service/services/conversation.service'; import { UserCreation } from '@app/user/int...
/***************** Writing Markup with JSX *********************/ // - In React, rendering logic and markup live together in the same place—components. // - Each React component is a JavaScript function that may contain some markup that React renders into the browser. /* - JSX and React are two separate things. They...
import { Schema } from '@coveo/bueno'; import { DateRangeRequest } from '../../../../../features/facets/range-facets/date-facet-set/interfaces/request'; import { RangeFacetRangeAlgorithm, RangeFacetSortCriterion } from '../../../../../features/facets/range-facets/generic/interfaces/request'; import { ConfigurationSecti...
import java.util.* fun main(){ // 확장 함수 // 이미 있는 클래스에 메서드를 추가하는 개념 // 추가된 메서드는 같은 프로그램 내에서만 사용이 가능하다. // 자바 코드로 변경될 때 객체의 ID를 받아 사용하는 코드로 변경된다. val str1 = "abcd" // 추가한 메서드 호출 println(str1.getUpperString()) str1.printString() } // 확장함수 정의 // 클래스명.추가할 메서드 fun String.getUpperString() :...
## Application de la porte d'Hadamar $$|\psi> = i|0> + (2 + i)|1>$$ $$H|\psi> = iH|0> + (2 + i)H|1>$$ $$H|\psi> = \frac{i}{\sqrt{2}}(|0> + |1>) + \frac{(2 + i)}{\sqrt{2}}(|0> - |1>)$$ $$H|\psi> = \frac{i|0>}{\sqrt{2}} + \frac{i|1>}{\sqrt{2}} + \frac{(2 + i)|0>}{\sqrt{2}} - \frac{(2 + i)|1>}{\sqrt{2}}$$ $$H|\psi> = \fr...
<!--example of a survey form for feedback--> <!--live demo can be found at https://codepen.io/aleks-hat/pen/wvprmjv --> <!--layout inspiration from FCC: Survey Form--> <!DOCTYPE HTML> <html> <head> <title>Survey Form</title> <link rel="stylesheet" href="styles.css"> </head> <div class="container"> <header cla...
#pragma once #include <stdint.h> #include <stdlib.h> /** Min positive capacity of mutable byte buffer. */ extern const size_t kByteBufferMinPositiveCapacity; /** * Auto-resizable mutable byte buffer. Empty buffer is not allocated. */ struct MutableByteBuffer { /** * Beginning of buffer (or `NULL` if buffe...
// // NSPersistentStoreCoordinator+Extension.swift // // Created by Sergey Spivakov on 1/30/17. // Copyright © 2017 Sergey Spivakov. All rights reserved. // /// NSPersistentStoreCoordinator extension import Foundation import CoreData /// Extension to support iOS 9 & iOS10+ extension NSPersistentStoreCoordinator {...
import { Component } from '@angular/core'; import { Router } from '@angular/router'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { AuthService } from 'src/app/auth/auth.service'; import Swal from 'sweetalert2'; @Component({ selector: 'app-login', templateUrl: './login.component.htm...
// components/MonthYearInput/MonthYearInput.tsx import React, { useState } from "react"; import { DateTime } from "luxon"; const MonthYearInput: React.FC<{ value: string; onChange: (value: string) => void; }> = ({ value, onChange }) => { const [date, setDate] = useState( value ? DateTime.fromISO(value) : Da...
import React, { useEffect } from 'react' import { createContext, PropsWithChildren, useContext, useState } from 'react' // import { mockTodos } from '../temp' import { IGlobalContext } from '../types/IGlobalContext' import { ITodo } from '../types/ITodo' import AsyncStorage from '@react-native-async-storage/async-stora...
package com.pet.core.process import com.pet.core.api.Changeable import com.pet.core.api.Eventable import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import kotlin.random.Random class Pet(stats: Stats) : Changeable<StateItem, StateChange, (change:...
""" URL configuration for dmm project. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/5.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') C...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "lists.h" /** * add_node - Adds a new node to the beginning of a list * @head: double pointer * @str: The new string that will be added * Return: the & of the new input */ list_t *add_node(list_t **head, const char *str) { list_t *new; unsigne...
defmodule UneebeeWeb.Components.Upload do @moduledoc """ Reusable file upload component. """ use UneebeeWeb, :live_component alias UneebeeWeb.Shared.CloudStorage attr :current_img, :string, default: nil attr :label, :string, default: nil attr :subtitle, :string, default: nil attr :unstyled, :boolean...
/* * Copyright 2023 Datastrato Pvt Ltd. * This software is licensed under the Apache License version 2. */ package com.datastrato.gravitino.dto.responses; import com.datastrato.gravitino.rest.RESTResponse; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; import jav...
import axios from 'axios' /** * * @param {string} email * @param {string} password * @returns Promise */ export const login = (email, password) => { let body = { email, password } // Return the response with a promice return axios.post('https://reqres.in/api/login', body) } e...
import React, { useState } from 'react'; import './Styles/main.css'; import Landing from './Pages/landing.js'; import NewProject from './Pages/newProject.js'; import ProjectHome from './Pages/projectHome.js'; import CategoryCreation from './Pages/categoryCreation.js'; import CategoryHome from './Pages/categoryHome.js...
import { ChangeEvent, Dispatch, MouseEvent, SetStateAction, useEffect, useState, } from 'react'; import { Table as MUITable, TableBody, TableCell, TableContainer, TablePagination, TableRow, Typography, Chip, Collapse, Box, IconButton, } from '@mui/material'; import CheckIcon from '@mui...
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit' import instanse from '../../axios' import { RootState } from '../store' //получение постов export const getPost = createAsyncThunk<dataType[]>('post/getPost', async () => { const { data } = await instanse.get<dataType[]>('/posts') return data }) ...
<script> import axios from 'axios'; import { toast } from 'vue3-toastify'; import { useUserStore } from '@/stores/user'; import PeopleYouMayKnow from '@/components/PeopleYouMayKnow.vue'; import Trends from '@/components/Trends.vue'; import FeedItem from '@/components/FeedItem.vue'; import { RouterLink } from 'vue-rout...
**SOAPEngine** This generic [SOAP](http://www.wikipedia.org/wiki/SOAP) client allows you to access web services using a your [iOS](http://www.wikipedia.org/wiki/IOS) app and [Mac OS X](http://www.wikipedia.org/wiki/OS_X) app. With this Framework you can create [iPhone](http://www.wikipedia.org/wiki/IPhone), [iPad](...
// // lesson_02_triangle.cpp // learn_opengl // // Created by Felix Ji on 1/6/23. // #include "lesson_02_triangle.hpp" // vertex shader const static char *vertexShaderSource = "#version 330 core\n" "layout (location = 0) in vec3 aPos;\n" "void main()\n" "{\n" " gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n"...
package frc.robot.subsystems; import java.util.Optional; import org.photonvision.EstimatedRobotPose; import org.photonvision.PhotonCamera; import org.photonvision.PhotonPoseEstimator; import edu.wpi.first.math.Pair; import edu.wpi.first.math.estimator.SwerveDrivePoseEstimator; import edu.wpi.first.wpilibj.smartdashb...
<?php use Illuminate\Support\Facades\Route; use App\Http\Controllers\CountryController as C; use App\Http\Controllers\HotelController as H; use App\Http\Controllers\OrderController as O; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------...
import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:kitap_arkadasligi/src/configs/flavors.dart'; import 'package:kitap_arkadasligi/src/store/AppStore.dart'; import 'package:kitap_arkadasligi/src/utils/di/getit_register.dart'; import 'package:kitap_arkadasligi/src/u...
#include <iostream> #include <cstdlib> #include <cstring> #include <fstream> using namespace std; #define ARRAY_SIZE(a) sizeof(a)/sizeof(a[0]) #define CHAR_TO_INDEX(c) ((int)c - (int)'a') #define ALPHABET_SIZE 26 #define MAX_WORD_LENGTH 1000000 struct node { int value; node *children[ALPHABET_SIZE]; }; ...
const express = require("express"); const app = express(); const mongoose = require("mongoose"); const cors = require('cors'); const authRoute = require("./rootes/auth"); const userRoute = require("./rootes/Users"); const postRoute = require("./rootes/Posts"); const CategoriesRoute = require("./rootes/Categories"); c...
import 'package:flutter/material.dart'; import 'package:flutter_onboarding_slider/flutter_onboarding_slider.dart'; void main() { runApp(const WelcomePage()); } class WelcomePage extends StatefulWidget { const WelcomePage({super.key}); @override State<WelcomePage> createState() => _WelcomePageState(); } clas...
use std::fmt::Display; use pest::Parser; use crate::{ast::parse_ast, errors::CompilationError, parser::*}; #[derive(Debug)] pub enum CompilationStage { LoadFile, ParseGrammar, BuildAst, } impl Display for CompilationStage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { ...
# Profundizando en diccionarios # los diccionarios guardan un orden (a diferencia de un set) diccionario = {'Nombre': 'Juan', 'Apellido': 'Perez', 'Edad': 28} print(diccionario) # los dic son mutables, pero las llaves deben ser inmutables # diccionario = {(1, 2): 'Valor1'} print(diccionario) # Se agrega una llave si ...
#include "main.h" /** * set_bit - sets the value of a bit to 1 at a given index * @n: pointer to a number * @index: the index of the bit to be set to 1 * Return: 1 if successful, otherwise -1 */ int set_bit(unsigned long int *n, unsigned int index) { unsigned long int num; num = 1; if (index > 63) { return...
# Deploying your containerized app to Azure Kubernetes Service with Jenkins CI/CD Pipeline and GitHub Webhook # Part 5 ![jenkins_aks (2)](https://github.com/mfkhan267/jenkins_on_azure2024/assets/77663612/d89eccdc-6973-46f9-85c8-9817fd84129b) This is the last part of the Jenkins CI/CD Pipeline series, where we will be...
using System; using Unity.Entities.CodeGeneratedJobForEach; using Unity.Jobs; using Unity.Jobs.LowLevel.Unsafe; namespace Unity.Entities { /// <summary> /// An abstract class to implement in order to create a system that uses ECS-specific Jobs. /// </summary> /// <remarks>Implement a JobComponentSystem...
import { useSelector, useDispatch } from "react-redux"; import { Chart as ChartJS, CategoryScale, LinearScale, BarElement, LineElement, Title, Tooltip, Legend, PointElement, } from "chart.js"; import { Bar, Line } from "react-chartjs-2"; import GeneralButton from "../components/GeneralButton"; import...
// To parse this JSON data, do // // final getTagsResponse = getTagsResponseFromJson(jsonString); import 'package:freezed_annotation/freezed_annotation.dart'; import 'dart:convert'; part 'get_tags_model.freezed.dart'; part 'get_tags_model.g.dart'; List<GetTagsResponse> getTagsResponseFromJson(String str) => ...
package com.csmtech.exporter; import java.io.IOException; import java.util.List; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.HorizontalAlignment; impo...
package kr.or.ddit.login.dao; import org.apache.ibatis.annotations.Mapper; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import kr.or.ddit.securi...
classdef Bowman2017 < otslm.iter.objectives.Objective % Cost function used in Bowman et al. 2017 paper. % Inherits from :class:`Objective`. % % .. math:: % % C = 10^d * (1.0 - \sum_{nm} \sqrt{I_nm T_nm} \cos(phi_nm - psi_nm))^2 % % target and trial should be the complex field amplitudes. % % Properties % - scale ...
@extends('layouts.auth') @section('content') {{-- sendiri --}} <!-- Page Content --> <div class="page-content page-auth" id="register"> <div class="section-store-auth" data-aos="fade-up"> <div class="container"> <div class="row justify-content-center"> <div class="col-lg-4"...
import * as dotenv from "dotenv"; dotenv.config(); import axios from "axios"; const graphqlEndpoint = "https://api.github.com/graphql"; async function getCorrectness(url: [string, string]) { try { const key = process.env.GITHUB_TOKEN; const owner = url[0]; const name = url[1]; let totalOpenIssues...
const PORT = process.env.PORT ?? 8000 const express = require('express') const { v4: uuidv4 } = require('uuid') const cors = require('cors') const app = express() const bcrypt = require('bcrypt') const jwt = require('jsonwebtoken') const Pool = require('pg').Pool require('dotenv').config() const pool = new Pool({ us...
import * as yup from "yup"; export const basicSchema = yup.object().shape({ name: yup .string() .min(8, "Nombre es muy corto") .matches( /^[A-Za-z\s]+$/, "Nombre no puede contener números ni caracteres especiales" ) .required("Campo nombre es obligatorio"), address: yup .string(...
import React from 'react'; import { makeStyles } from '@mui/styles'; import { Box, Tooltip } from '@mui/material'; import { getBranchesNames, toAcronym } from 'helpers/userlistHelpers'; const useStyles = makeStyles((theme) => { return { eachCode: { display: 'flex', alignItems: 'baseline', flexD...
using Phu.Data.Base; using Phu.Data.Interfaces; using Phu.Data.Repositories; using Phu.Service.Interfaces; using Phu.Service.Services; using System; using Unity; namespace Phu.WebAPI { /// <summary> /// Specifies the Unity configuration for the main container. /// </summary> public static class UnityC...
import React from 'react'; import axios from 'axios'; import { Stack, ImageList, ImageListItem, ImageListItemBar, Typography, TextField, IconButton, Button, Dialog, DialogActions, DialogContent, DialogTitle, DialogContentText, Autocomplete, CircularProgress, } from '@mui/material'; import ...
import * as models from './models'; import { Ability } from './models'; import { spells } from './spells'; import { getRandomNumber } from './dice'; import { askSpell } from './input'; async function main() { let isClear: boolean = false; let enemyKobold = new models.Kobold(); let bardClass: models.Chara...
<template> <div id="app"> <variform ref="variform" :form-element-data="form" :validators="validators" :converters="converters" :slot-names="['custom']"> <!-- custom element with name custom --> <template v-slot:custom="slotProps"> <custom-element :form-element-data="slotProps.formElementData...
<!DOCTYPE html> <html lang="en" class="h-100"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> {% load static %} <link rel="stylesheet" href="{% static 'style.css' %}"> <title>View Book</title> </head> <body class="h-100 w-75 mx-auto text-center p...
package problema1.application; import problema1.application.entites.Triangle; import java.util.Locale; import java.util.Scanner; public class program { public static void main(String[] args) { //Fazer um programa para ler as medidas dos lados de dois triangulos X e Y (suponha medidas válidas) em seguida,...
import type { ComputedRef, Ref } from 'vue' import type { IGroup } from '../views/user-types' import { computed } from 'vue' /** * Format a group to a menu entry * * @param group the group */ function formatGroupMenu(group?: IGroup) { if (typeof group === 'undefined') { return null } const item = { id: gr...