text stringlengths 184 4.48M |
|---|
from xbot.framework.utils import assertx
from lib.testcase import TestCase
class tc_eg_pass_get_values_from_testbed(TestCase):
"""
Get information from the testbed and perform checks.
"""
TIMEOUT = 60
FAILFAST = True
TAGS = ['tag1']
def setup(self):
"""
Prepare test enviro... |
import { useState, useEffect } from "react"
import { useSelector, useDispatch } from "react-redux"
import GridViewProducts from "./GridViewProducts"
import ListViewProducts from "./ListViewProducts"
import Loading from "./Loading"
import { updatePage } from "../features/filter/filterSlice"
import CartModal from "./Cart... |
import { Dialog, DialogContent, DialogTrigger } from '@/components/ui/dialog'
import React from 'react'
import CardDetails from './CardDetails'
import { Draggable, Droppable } from '@hello-pangea/dnd'
import { getContrastTextColor } from '@/lib/utils';
interface props {
cards: any[],
id: string;
listTitle: string... |
# Welcome to the Personal Project - [OptiMarket: Uncovering the Ultimate Marketing Approach](https://ayumu0622.github.io/OptiMarket_Uncovering_the_Ultimate_Marketing_Approach/)
## Access this project from [here](https://ayumu0622.github.io/OptiMarket_Uncovering_the_Ultimate_Marketing_Approach/)
Hello! I'm Ayumu Justin ... |
<template>
<div class="table-card">
<h2>Liste des Trajets</h2>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Date début</th>
<th>Date fin</th>
<th>Type Trajet</th>
<th>Code Trajet</th>
<th>Voiture</th>
<th>L... |
#include "binary_trees.h"
/**
* binary_tree_height - finds height of the tree
*
* @tree: pointer to the root node of the tree to measure the height
* Return: height of the tree
*/
size_t binary_tree_height(const binary_tree_t *tree)
{
size_t height_left = 0;
size_t height_right = 0;
if (tree == NULL)
{
ret... |
# 大型项目管理不善
> 原文:<https://dev.to/jonrimmer/megaproject-mismanagement-2lic>
接下来是由[教授本特·弗吕布杰格](https://en.wikipedia.org/wiki/Bent_Flyvbjerg)撰写的[关于大型项目你应该知道什么,为什么要知道](https://arxiv.org/pdf/1409.0003.pdf)的总结,以及对超大型项目所面临的困难的分析。对于那些在技术领域从事过大型 IT 项目的人来说,这些问题太熟悉了。所有的见解都是 Flyvbjerg 和他的来源和合作者的。任何错误都是我的。
# 好人
“大型项目”是极其庞大、复杂的项目... |
import os
import numpy as np
from keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.callbacks import ModelCheckpoint
from .sample import Sample
from .plot import CountPlotter
from .model import PredictorModel
class Trainer:
def __init__(self, sample: Sample):
self.sample = sample... |
package ent;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import connect.OracleConnectUtil;
public class EntDao {
private static EntDao entDao = new EntDao();
public EntDao() { }
pub... |
# Security - Sistema de Autenticação e Autorização
# Introdução ao codigo
Esse é um codigo que foi desenvolvido para autenticar e autorizar diferentes tipos de usuarios, dando permissões e restringindo acesso a diferentes funcionalidades. É uma pagina Web (Java SpringBoot) e que faz requisições a um banco de dados (Mo... |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { r... |
import {
Image,
ScrollView,
StyleSheet,
View,
TouchableOpacity,
Text,
} from 'react-native';
import DetailContent from '../components/atoms/DetailContent';
import CategoryRow from '../components/molecules/CategoryRow';
import {useNavigation} from '@react-navigation/native';
import {Badge} from 'react-native... |
import { createSlice } from "@reduxjs/toolkit";
import utils from "../../utils/utils";
const profileSlice = createSlice({
initialState: {
profile: {
userId: null,
nickname: null,
},
},
name: "profileSlice",
reducers: {
setProfile(state, action) {
state.userId = action.payload;
... |
'''IP calculation functions
- Original by Kailash Joshi.
- Source: https://github.com/kailashjoshi/Ipcalculator/
'''
import sys
def _dec_to_binary(ip_address):
return list(map(lambda x: bin(x)[2:].zfill(8), ip_address))
def _negation_mask(net_mask):
wild = list()
for i in net_mask:
wild.append(255 - int(i... |
"use server";
import { db } from "../_lib/db";
import { v4 as uuidV4 } from "uuid";
import { verifyEmail } from "../(auth)/verifyEmail";
import { PasswordResetToken } from "../_types/types";
const forgotPassword = async ({ email }: { email: string }) => {
const verificationToken = uuidV4();
const userEmails =... |
<?php
namespace App\Controller;
use App\Controller\AppController;
use Cake\Routing\Router;
use \Cake\Datasource\Exception\RecordNotFoundException;
use \Cake\Datasource\ConnectionManager;
/**
* GrupoUsuarios Controller
*
* @property \App\Model\Table\GrupoUsuariosTable $GrupoUsuarios
*
* @method \App\Model\Entity\... |
import React, { useState, useRef } from "react";
import styled from "@emotion/styled";
import { Link, useNavigate } from "react-router-dom";
import { useAuthContext } from "../contexts/AuthContext";
import Header from "../components/Header";
const Container = styled.div({
textAlign: "center",
});
const Wrapper = sty... |
<!DOCTYPE html>
<html lang="pt-br">
<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">
<link rel="stylesheet" href="./css/styleLogin.css">
<link rel="shortcut icon" href="assets/imagotipo.svg" ty... |
PUT-ENVIRONMENT-BLUEPRINT-CONFIGURATIPUT-ENVIRONMENT-BLUEPRINT-CONFIGURATION()
NAME
put-environment-blueprint-configuration -
DESCRIPTION
Writes the configuration for the specified environment blueprint in
Amazon DataZone.
See also: AWS API Documentation
SYNOPSIS
put-en... |
const _ = require('lodash');
const express = require('express');
const bodyParser = require('body-parser');
const { ObjectID } = require('mongodb');
var config = require('./config/config');
var { mongoose } = require('./db/mongoose');
var { Todo } = require('./models/todo');
var { User } = require('./models/user');
va... |
using System.Reflection;
using Oxx.Backend.Generators.PocoSchema.Core.Attributes;
using Oxx.Backend.Generators.PocoSchema.Core.Configuration;
using Oxx.Backend.Generators.PocoSchema.Core.Configuration.Events;
using Oxx.Backend.Generators.PocoSchema.Core.Extensions;
using Oxx.Backend.Generators.PocoSchema.Core.Models.P... |
import os
import argparse
from transformers import (
AutoModelForCausalLM,
default_data_collator,
AutoTokenizer,
set_seed,
)
from datasets import load_from_disk
import torch
from huggingface_hub import HfFolder
from transformers import Trainer, TrainingArguments
def parse_arge():
"""Parse the ar... |
//Detector PMT Header
#ifndef DetectorPMT_h
#define DetectorPMT_h
#include "globals.hh"
#include "G4LogicalVolume.hh"
#include "G4AssemblyVolume.hh"
#include "G4NistManager.hh"
namespace CeBr3
{
class DetectorPMT
{
public:
DetectorPMT();
~DetectorPMT();
//Set Functions
void SetWidth(G4double w) {width ... |
---
title: حماية صف معين في ورقة عمل Excel
linktitle: حماية صف معين في ورقة عمل Excel
second_title: Aspose.Cells لمرجع .NET API
description: قم بحماية صف معين في Excel باستخدام Aspose.Cells لـ .NET. دليل خطوة بخطوة لتأمين بياناتك السرية.
type: docs
weight: 90
url: /ar/net/protect-excel-file/protect-specific-row-in-exce... |
from datetime import datetime
from typing import List, Optional
from uuid import UUID, uuid4
from applications.models import SupportTicket, TicketStatus, Operation
class SupportService:
def submit_ticket(self, user_id, issue):
if user_id is not None and issue.strip() != '':
ticket = SupportTick... |
import { useState } from 'react';
import Button from 'react-bootstrap/Button';
import Modal from 'react-bootstrap/Modal';
import { base_api_url } from '../shared';
import { BsPlusLg } from 'react-icons/bs';
function CreateTweetModal(props) {
// user instance
const {user} = props
const [show, setShow] = useS... |
<?php
namespace App\DTOs\Components\Filters\Dropdowns;
use App\DTOs\BaseDTO;
use App\DTOs\Filters\Items\FilterItemDTO;
use App\Enums\Filters\DealTypes;
use App\Enums\Filters\Queries;
use Spatie\TypeScriptTransformer\Attributes\LiteralTypeScriptType;
use Spatie\TypeScriptTransformer\Attributes\RecordTypeScriptType;
us... |
import React from "react";
/* Hook que retorna true se o match corresponder com o media passado, e
false caso contrário */
const useMedia = (media) => {
const [match, setMatch] = React.useState(null);
/* Effect que ocorre toda vez que media for alterado */
React.useEffect(() => {
function changeMatch() {
... |
/**
* @file Utility related to static Atelier status
* @author Zebullon
*/
const _ = require('underscore');
/**
* Mapping between atelier status ID and their description as should be mirrored in atelierStatusRef DB table
* @type {{Assigned: number, ErrorOnAccept: number, InAuction: number, Complete: number, Erro... |
#include<iostream>
using namespace std;
class Number
{
private:
int iNo; //class characteristics //Abstraction
public:// baherun milnar ahe(access specifier)
//Behaviours
void Accept() //setter,for set the value
{
cout<<"Enter the value:" <<endl;
cin>>this->iNo;
}
void Display() //gette... |
<template>
<div id="app">
<div class="container">
<div class="text-center">
<h2 class="text-center mt-5">Trending Movies 🍿</h2>
<p>Keep up with the hottest movies that are trending this week.</p>
</div>
<div class="my-4">
<a href="#" @click="getTrendingMovies('day')" cl... |
mod error;
mod function;
mod notification;
mod result;
mod serial;
mod stack;
mod types;
use std::ffi::{c_char, CStr};
use base64::engine::general_purpose::STANDARD;
use base64_serde::base64_serde_type;
pub use error::*;
pub use function::*;
pub use notification::*;
pub use result::*;
pub use stack::*;
use tonlib_sys... |
###########################################################
New Step
###########################################################
prompt_log: Sample Prompt:
You are confronted with a task in which a 1-dimensional input sequence of pixels should be transformed into a corresponding output sequence. The input and output se... |
<!-- Links -->
<div th:fragment="links">
<!-- Script Links -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"
integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB"
crossorigin="anonymous"></script>
<script src="https://cd... |
package util
import (
"os"
"testing"
"time"
)
func TestDirExists(t *testing.T) {
dirPath := "./testDir"
// Создаем тестовую директорию
if err := os.Mkdir(dirPath, os.ModePerm); err != nil {
t.Fatalf("Не удалось создать тестовую директорию: %s", err)
}
defer os.Remove(dirPath) // Удаляем тестовую директорию... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_itoa.c :+: :+: :+: ... |
# Copyright (c) 2023 Robert Bosch GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under ... |
import Foundation
struct Coord { var x, y : Int }
struct Fold { var x, y : Int? }
struct Grid {
var grid: [Bool]
var rows, cols: Int
}
var coords : [Coord] = []
var folds : [Fold] = []
let coordMatch = try! NSRegularExpression(pattern: "(\\d+),(\\d+)")
let foldXMatch = try! NSRegularExpression(pattern: "fold... |
import React from 'react';
import useAdvanceSearch from '../../../Hooks/useAdvanceSearch'
const AdvanceSearchLg = () => {
const { SearchValues, handleChange, selectValues, handleChangeState, onSubmit } = useAdvanceSearch();
return (
<div className='AdvanceSearchLg'>
<div className="col-lg-2... |
// main-------------------------------------
// @file : testRe.go
// @author : Autumn
// @contact : rainy-autumn@outlook.com
// @time : 2024/5/27 18:56
// -------------------------------------------
package main
import (
"fmt"
"github.com/Autumn-27/ScopeSentry-Scan/pkg/system"
"github.com/Autumn-27/... |
// Copyright 2024 RisingWave Labs
//
// 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 ... |
package uz.john.domain.model.person.details
import uz.john.data.remote.model.person.details.MovieCrewCreditData
import uz.john.util.formatDate
import uz.john.util.roundToOneDecimal
data class MovieCrewCredit(
val adult: Boolean,
val backdropPath: String?,
val genreIds: List<Int>,
val id: Int,
val ... |
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:kidneyscan/bars/navbar.dart';
import 'package:kidneyscan/constants/colors/app_colors.dart';
import 'package:kidneyscan/keys/app_keys.dart';
import... |
<template>
<view class="carlife">
<!-- <view
class="status-bar"
:style="{ height: custom.top + 'px' }"
/>
<view class="u-flex">
<view class="u-padding-left-22">
<u-icon
name="arrow-left"
size="34"
color="#000"
/>
</view>
<view cla... |
/* eslint-disable react/jsx-no-duplicate-props */
import { Grid, IconButton, InputAdornment } from '@material-ui/core';
import Button from '@material-ui/core/Button';
import Paper from '@material-ui/core/Paper';
import TextField from '@material-ui/core/TextField';
import Typography from '@material-ui/core/Typography';
... |
package services
import (
"fmt"
"net/http"
"strconv"
enc "github.com/Elessar1802/api/src/v1/internal/encoder"
"github.com/Elessar1802/api/src/v1/internal/err"
"github.com/Elessar1802/api/src/v1/internal/passwd"
repo "github.com/Elessar1802/api/src/v1/repository"
"github.com/go-pg/pg/v10"
)
func GetUser(db *p... |
# Day 5 (System Security Part 2 & Scalability)
## Authentication and Authorization
1. Strong Authentication Mechanisms: Implement multi-factor authentication (MFA) to provide an additional layer of security beyond just passwords.
2. Least Privilege Principle: Ensure that users have the minimum levels of access (or per... |
use std::collections::BTreeMap;
use lazy_static::lazy_static;
use std::sync::Mutex;
use salvo::prelude::*;
mod handlers;
mod alumno;
mod db;
lazy_static! {
static ref ALUMNOS: Mutex<alumno::ListaAlumnos> = Mutex::new(alumno::ListaAlumnos {alumnos: BTreeMap::new()});
static ref CANT_ALUMNOS: Mutex<i32> = Mutex... |
---
title: "Create team from group"
description: "Create a new team from a group."
author: "nkramer"
ms.localizationpriority: high
ms.prod: "microsoft-teams"
doc_type: apiPageType
---
# Create team from group
Namespace: microsoft.graph
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
Create a new [te... |
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<!-- <meta content="upgrade-insecure-requests" http-equiv="Content-Security-Policy"> -->
<div th:insert="~{fragment/header :: header}"></div>
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700&display=swap" rel="s... |
package com.kaj.myapp.board;
import com.kaj.myapp.auth.Auth;
import com.kaj.myapp.auth.AuthUser;
import com.kaj.myapp.board.entity.Board;
import com.kaj.myapp.board.repository.BoardRepository;
import com.kaj.myapp.board.request.BoardModifyRequest;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oa... |
<!DOCTYPE html>
<html>
<head>
<title>My page</title>
<style>
header {
background-color: whitesmoke;
padding: 20px;
text-align: center;
}
.center-container {
display: flex;
flex-direction: column;
align-items: center;
min-height: calc(100vh - 80px); /* Subtract ... |
const express = require("express");
const router = express.Router();
const cartModel = require("../models/cart.model.js");
const productRepository = require("../repositories/product.repository.js");
const ProductRepository = new productRepository();
const passport = require("passport");
router.get("/products", passpo... |
; Read language codes from lang.txt
FileRead, lang, lang.txt ; Open the file "lang.txt" and store its contents in the variable "lang"
StringSplit, lang, lang, `n, `r ; Split the contents of "lang" into separate lines and store them in the array "lang"
; Define translation function
TranslateText(text, sourceLang, t... |
const ocrResultsContainer = document.getElementById('ocr-results');
const ocrTextarea = document.getElementById('ocr-text');
const img = document.querySelector('img');
const progress = document.querySelector('.progress');
const enrollmentTableBody = document.querySelector('#enrollment-table tbody');
function uploadEn... |
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class HelpDTO {
final String title;
final Widget widget;
HelpDTO({required this.title, required this.widget});
}
List<HelpDTO> getHelpDtoItems(Build... |
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/common-base}">
<head>
<link rel="stylesheet" th:href="@{/css/page/letsparty/home.css}" >
</head>
<div layout:fragment="content-top" class="container">
<div th:if="${errorMessage}" class="a... |
---
title: "Cuentas de emisiones a la atmósfera"
output: html_notebook
---
```{r message=FALSE, warning=FALSE}
if (!"gghighlight" %in% installed.packages()) {install.packages("gghighlight")} # Para resaltar líneas
if (!"viridis" %in% installed.packages()) {install.packages('viridis')} # Paleta colores
if (!"ggthem... |
import { Show, show, WEEK_DAY } from "../model/Show";
import { BaseDatabase } from "./BaseDatabase";
export class ShowDatabase extends BaseDatabase{
private static TABLE_NAME = "Shows";
public async createShow(show:show):Promise<void> {
try {
await this.getConnection()
.insert({
id:show.id,
week_da... |
import { apiSlice } from "../api/apiSlice";
import {
IOrderAmounts,
ISalesReport,
IMostSellingCategory,
IDashboardRecentOrders,
IGetAllOrdersRes,
IUpdateStatusOrderRes,
Order,
} from "@/types/order-amount-type";
export const authApi = apiSlice.injectEndpoints({
overrideExisting: true,
endpoints: (bui... |
from random import randint
from pygame.sprite import Sprite
import pygame
class Dice(Sprite):
""" Dice class"""
def __init__(self, main_game, id):
"""Initiate our dice"""
self.mysprites = {
0: 'sprites/dice0.bmp',
1: 'sprites/dice1.bmp',
2: 'sprites/dice2.b... |
import Box from "@mui/material/Box";
import Grid from "@mui/material/Grid";
import bg from "./bg/forgetPassword.svg";
import bgimg from "./bg/backimg.jpg";
import Button from "@mui/material/Button";
import TextField from "@mui/material/TextField";
import Typography from "@mui/material/Typography";
import Container from... |
<?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Spatie\Permission\Models\Role;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
class UserController extends Controller
{
public function __construct()
{
... |
import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'
import { StargateClient } from '@cosmjs/stargate'
type ChainClientRoutes<T> = {
[rpcEndpoint: string]: T
}
type HandleConnect<T> = (rpcEndpoint: string) => Promise<T>
/*
* This is a workaround for `@cosmjs` clients to avoid connecting to the chain more th... |
# ⚙️ Mindsync Backend Application
## ⭐ Introduction
The MindSync Backend Application is a powerful component of the MindSync platform. It is primarily an engine drafted in
Kotlin API Version 1.9 and running with the Java SDK version 17 environment. This application is responsible for
managing all the server-side oper... |
import React from 'react'
import { faker } from '@faker-js/faker'
import { render } from '@testing-library/react'
import {
Heading,
Layout,
PageContent,
Paragraph,
Sidebar,
SideBarList,
SideBarListItem,
SideBarListItemBottom,
SpacedContainer,
SpacedSidebarContainer,
} from '../Layout'
describe('Lay... |
use clippy_config::msrvs::{self, Msrv};
use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::source::snippet_with_context;
use clippy_utils::sugg::Sugg;
use clippy_utils::ty;
use rustc_errors::Applicability;
use rustc_hir::{BinOpKind, Expr, ExprKind};
use rustc_lint::{LateContext, LateLintPass};
use rus... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class Contact extends Model
{
use Soft... |
import { ApplicationError } from "@app/utils/common";
import middy from "@middy/core";
import cors from "@middy/http-cors";
import httpErrorHandler from "@middy/http-error-handler";
import httpEventNormalizer from "@middy/http-event-normalizer";
import httpHeaderNormalizer from "@middy/http-header-normalizer";
import m... |
package com.example.noterapp
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.Button
import android.widget.Toast
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import com.example.noterapp.databi... |
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:test_task/bussiness/controllers/auth_controller.dart';
import 'package:test_task/core/router/get_routes.dart';
import 'package:test_task/presentation/Widgets/accept_button.... |
#==== produce country map function ==========#
Plot_nationalmap_Uganda_func <- function() {
w2hr <- map_data("world2Hires")
UGA <- w2hr[w2hr$region=="Uganda",] # obtain Uganda country outline
ggplot() +
geom_polygon(data = UGA, aes(x=long, y = lat, group = group), color = "black", size = 0.1, fill = "lightgrey")... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
public class Main {
// 간선
private sta... |
package com.courseproject.tindar.controllers.matchlist;
import static org.junit.Assert.assertEquals;
import com.courseproject.tindar.usecases.matchlist.MatchListInputBoundary;
import com.courseproject.tindar.usecases.matchlist.MatchListResponseModel;
import org.junit.Test;
public class MatchListControllerUnitTest {... |
import React, { useEffect, useState } from "react";
import { db } from "../../Apis/firebase";
import { getDocs, collection } from "firebase/firestore";
import { toast } from "react-toastify";
import Moment from "react-moment";
import Styles from "./_admin.module.css";
import { AiOutlineUserSwitch } from "react-icons/ai... |
Series I
Write a program to generate the first 'n' terms of the following series 0.5, 1.5, 4.5, 13.5, ...
Input Format:
The input is an integer 'n' which denotes the number of terms to be printed in the series.
Output Format:
Print the series and refer the sample output for formatting.
Sample Input:
5
Sample Ou... |
import AppTable from "../../components/table";
import responseHandler from "../../hooks/response";
import CreateFileModal from "../../components/create-file-modal/create-file-modal";
import columns from "./column-definition";
import { deleteFile, listFile, patchFile } from "../../services/file";
import { useNavigate } ... |
import { Component, ElementRef, QueryList, ViewChildren } from '@angular/core';
import { OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { ViewportScroller } from '@angular/common';
import { BaseComponent } from 'src/app/components/base/base.component';
import { UIState } from 'src/app/store/... |
<?php
namespace Src\Features\BaseApp\Presentation\Controllers\DashBoardControllers;
use App\Http\Controllers\Controller;
use Src\Base\Response\DataSuccess;
use Src\Features\BaseApp\Core\Requests\WebRequests\Package\AddPackageWebRequest;
use Src\Features\BaseApp\Core\Requests\WebRequests\Package\DeletePackageWebReques... |
<script setup>
import AppLayout from "@/Layouts/AppLayout.vue";
import Welcome from "@/Components/Welcome.vue";
import DataTable from "primevue/datatable";
import Column from "primevue/column";
import Button from "primevue/button";
import Dialog from "primevue/dialog";
import HeaderCard from "../SubComponents/HeaderCar... |
// Station -> Conexió al router de casa
// NTP time -> mitjantçant la conexió wifi s'obté el temps real de qualsevol zona del món
// RTC -> Real time clock, té com a objectiu mantenir el temps després de la configuració
// inicial amb NTP (també funciona en cas de que no hi hagi conexió wifi)
#include <WiFi.h>... |
<!--
$Header: /home/cvs/lucas/doc-postgresql-es/diferencia/src/sgml/ref/alter_table.sgml,v 1.2 2001/10/08 17:33:26 rssantos Exp $
Postgres documentation
-->
<refentry id="SQL-ALTERTABLE">
<refmeta>
<refentrytitle id="sql-altertable-title">
ALTER TABLE
</refentrytitle>
<refmiscinfo>SQL - Language Statements</... |
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap... |
using System.Data;
using HiloGuessing.Domain.Interfaces;
using HiLoGuessing.Application.Services.Interfaces;
using HiloGuessing.Domain.Entities;
using Serilog;
using static System.Net.Mime.MediaTypeNames;
namespace HiLoGuessing.Application.Services
{
public class HiLoGuessService : IHiLoGuessService
{
... |
/*
* Copyright (C) 2016 John Li.
*
* Contact: John Li <jatsmulator(at)gmail.com>
*
* PJRCS 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 2 of the License, or
* (at your option) any later versi... |
import unittest
from calculator import add, subtract, multiply, divide
class TestCalculator(unittest.TestCase):
def test_add(self):
self.assertEqual(add(5, 3), 8)
self.assertEqual(add(-1, 1), 0)
self.assertEqual(add(0, 0), 0)
def test_subtract(self):
self.assertEqual(subtract... |
"use client";
import Link from "next/link";
import React, { useState, forwardRef, useEffect } from "react";
import { signIn } from "next-auth/react";
import Snackbar from "@mui/material/Snackbar";
import MuiAlert from "@mui/material/Alert";
import { useRouter } from "next/navigation";
const Alert = forwardRef(function... |
<template>
<div id="libro">
<div id="contenedorHojas" v-if="libro.paginas">
<div
class="hoja"
:class="{ girada: numeroH - 1 < centroHojas, tapada: Math.abs((numeroH-1)-centroHojas)>=1 }"
v-for="numeroH of Math.ceil(libro.paginas.length / 2)"
:key="numeroH"
:style="[
... |
package com.smarthome.uploadyiyanlogs.es;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.smarthome.uploadyiyanlogs.config.BaseConfig;
import com.smarthome.uploadyiyanlogs.util.CalendarUtils;
import com.smarthome.uploadyiyanlogs.util.EmptyUtil;
import org.slf4j.Logger;
import ... |
#!/usr/bin/env python3
""" module for task 1
"""
from flask import Flask, render_template
from flask_babel import Babel
class Config:
"""Class for configuring babbel.
"""
LANGUAGES = ["en", "fr"]
BABEL_DEFAULT_LOCALE = "en"
BABEL_DEFAULT_TIMEZONE = "UTC"
app = Flask(__name__)
app.config.from_obj... |
import {
Box,
Button,
CircularProgress,
Paper,
Typography,
} from "@mui/material";
import { Container } from "@mui/system";
import { spawn } from "child_process";
import useContratacao from "data/hooks/pages/useContratacao.page";
import useIsMobile from "data/hooks/useIsMobile";
import { BrawserService } from... |
import React from 'react';
import PropTypes from 'prop-types';
import s from './ContactItem.module.css';
const ContactItem = ({ name, number, onDeleteContact }) => (
<div className={s.item}>
<h3>{name}</h3>
<p>{number}</p>
<button onClick={() => onDeleteContact(name)}>Delete</button>
</div>
);
ContactI... |
package com.leetcode.random3;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Set;
public class WordLadder2 {
class Solution {
int min = Integer.MAX_VALUE;
Set<List<String>> ans = n... |
---
title: "\"[Updated] 2024 Approved Deciphering YouTube’s Profit for A Mil of Viewers\""
date: 2024-06-05T16:08:03.639Z
updated: 2024-06-06T16:08:03.639Z
tags:
- ai video
- ai youtube
categories:
- ai
- youtube
description: "\"This Article Describes [Updated] 2024 Approved: Deciphering YouTube’s Profit for A... |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>19.相对定位</title>
<style type="text/css">
.box1{
width: 200px;
height: 200px;
background-color: red;
}
/*
* 定位:
* -定位指的就是将指定的元素摆放到页面的任意位置,
* 通过position属性来设置元素的偏移量
*
* -可选值:
* static:默认值,元素没有开启定位
* rel... |
@{
Object filterTemplate = new Object();
filterTemplate = (new { read = "read", write = "write" });
}
<ejs-grid id="Grid" dataSource="@ViewBag.DataSource" allowPaging="true" allowFiltering="true">
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID" isPrimar... |
<?php
namespace App\Models;
use Carbon\Carbon;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Booking extends Model
{
use HasFactory;
public $table = 'bookings';
protected $dates = [
'from_date',
'created_at',
... |
<template>
<div class="menu">
<el-button
style="margin-bottom: 20px"
type="primary"
icon="el-icon-plus"
@click="toAdd"
>
添加菜单
</el-button>
<el-table v-loading="loading" :data="menus" style="width: 100%">
<el-table-column align="center" label="编号" type="index" />
... |
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:cinemapedia_app/infrastructure/datasources/moviedb_datasource.dart';
import 'package:cinemapedia_app/infrastructure/repositories/movie_repository_impl.dart';
// Este repositorio es inmutable, por lo que se puede usar un provider normal
final mov... |
import subprocess
import json
DEBUG = True
GITLAB_API_ENDOPOINT = 'https://gitlab.example.com/api/v4'
class gitlab:
"""API通信時に必要な情報をまとめたい(Issue/Branches/Commits/Merge Requests API通信時のリクエストで共通の使用するデータを毎回APIを呼び出したくない、、)
api_information = {
"mr_title": string(MRのタイトル),
"issue_id": i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.