text stringlengths 184 4.48M |
|---|
<?php
//Trabajamos con sesiones, empezamos poniendo session_start()
session_start();
//Cargamos el Autoload de composer
require dirname(__DIR__, 2)."/vendor/autoload.php";
use Libreria\Autores;
function Hayerror($n, $a, $p) {
$error = false;
if (strlen($n) == 0) {
$_SESSION['error_nombre'] = "Rellena e... |
const { generatePages } = require('../info/inventory')
const { reply } = require('../../utils/messageUtils')
exports.command = {
name: 'getinv',
aliases: ['geti'],
description: 'Fetches a users inventory.',
long: 'Fetches a users inventory using their ID.',
args: {
'User ID': 'ID of user to check.'
},
example... |
import { Pipe, PipeTransform } from '@angular/core';
import { ValidationErrors } from '@angular/forms';
@Pipe({
name: 'validationErrors'
})
export class ValidationErrorsPipe implements PipeTransform {
transform(errors?: ValidationErrors | null, ...args: unknown[]): unknown {
if (!!errors) {
let messages... |
//
// PanierViewController.swift
// Animalss
//
// Created by Mac Mini on 14/1/2024.
//
import UIKit
import CoreData
class PanierViewController: UIViewController ,UITableViewDelegate, UITableViewDataSource{
var animals = [String]()
@IBOutlet weak var tablefav: UITableView!
... |
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:hw_technical_test_2/blocs/banner_cubit/banner_cubit.dart';
import 'package:hw_technical_test_2/blocs/banner_cubit/banner_state.dart';
class BannerSection extends StatefulWidget {
const B... |
<?php
/**
* @file
* Handling for cross-posting.
*/
/**
* Shows either the status owner (if the status was posted to one's own profile)
* or the status owner and status poster (if the status was posted elsewhere).
* Also shows the user picture.
*/
class statuses_views_handler_field_cross_pic extends views_han... |
"""
List type - lista
Összetett adattípus, iterable object
Mutable data type - megváltoztatható
A lista tulajdonságai:
- hozzá tudunk adni elemet / elemeket
- törölni tudunk elemet / elemeket
- módosítani tudunk meglévő elemet / elemeket
"""
my_list = [1, 2, 3, "Ricsi", (1, 4, 3, 5), [1, 3, "Karcsi"]]
m... |
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/document/bucket/bucketid.h>
#include <vespa/document/base/documentid.h>
#include <vespa/searchlib/docstore/compacter.h>
#include <vespa/vespalib/stll... |
#include <assert.h>
#ifndef FACTORIAL_H
#define FACTORIAL_H
/**
@brief Calculate the factorial of a number.
@param num The number for which factorial is to be calculated.
@return The factorial of the number.
@pre num must be a non-negative number.
@note This function is suitable for numbers up to 20. For nu... |
/* eslint-disable react/jsx-props-no-spreading */
import styled from 'styled-components';
import { Link } from 'react-router-dom';
import { nanoid } from 'nanoid';
import numberFormat from '../utils/NumberFormat';
import optionPriceFormat from '../utils/OptionPriceFormat';
import defaultTheme from '../styles/Defau... |
package com.example.imagetopdf.Adpters;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.net.Uri;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.... |
<template>
<div class="propro">
<h2>xlsx</h2>
<el-button @click="exportData">导出Excel</el-button>
<!-- <el-upload>导入文件Excel</el-upload> -->
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="date" label="Date" width="180" />
<el-table-column prop="name" label="Name" wid... |
import React, { useEffect, useState } from 'react'
import Button from 'react-bootstrap/Button';
import Modal from 'react-bootstrap/Modal';
import Form from 'react-bootstrap/Form';
import { useFirebase } from '@/context/backend';
import { useRouter } from 'next/router';
const addUserType = async (em) => {
const res =... |
import PropTypes from 'prop-types';
import ImageGalleryItem from '../ImageGalleryItem/ImageGalleryItem';
import style from '../styles.module.css';
const ImageGallery = ({images, openModal, }) => {
return (
<ul className={style.ImageGallery}>
{images.map(({id, webformatURL, largeImageURL... |
<script>
import { getContext } from 'svelte';
import { formatJSON, codeMirrorUtils } from '$lib/utils';
import { codemirror, withCodemirrorInstance } from '@neocodemirror/svelte';
import { json } from '@codemirror/lang-json';
import { yaml } from '@codemirror/legacy-modes/mode/yaml';
import { StreamLanguage } fro... |
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title')</title>
<meta name="... |
import React from 'react';
import { View } from 'react-native';
import { AllHtmlEntities } from 'html-entities';
import { RadioButton } from 'components/RadioButton';
import { RadioWrapper, RadioWithLabel, RadioLabel } from './styles';
import { RadioGroupProps } from './types';
const entities = new AllHtmlEntities();... |
"""All pyproject.toml wrangling."""
import functools
import logging
from typing import Any, Optional, cast
import toml
logger = logging.getLogger(__name__)
@functools.cache
def current_pyproject_toml(toml_file_path: str) -> Optional[dict[str, Any]]:
"""Load and cache pyproject.toml file."""
try:
wit... |
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
let fixture: ComponentFixture<AppComponent>;
let app: AppComponent;
beforeEach( w... |
package designpattern.flyweight;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.loggi... |
<template>
<section
class="card"
:class="{
'has-rating': selectedRate && submitted
}"
>
<template v-if="!selectedRate || !submitted">
<div class="star">
<img src="@/assets/icon-star.svg" alt="star" />
</div>
<h1>How did we do?</h1>
<p>
Please let us kn... |
from django.db import models
from django.db.models.signals import pre_save, post_save
from django.dispatch import receiver
from django.utils.text import slugify
from taggit.managers import TaggableManager
from core.models import PublishableBaseModel, ImageBaseModel
from properties.utils import property_images
# Crea... |
package site.metacoding.white.web;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import or... |
import { Component } from 'react';
import PropTypes from 'prop-types';
import css from '../ContactForm/ContactForm.module.css';
class ContactForm extends Component {
state = {
name: '',
number: '',
};
handleChange = ({ target: { name, value } }) => {
this.setState({ [name]: value });
};
handleS... |
package models
import "time"
type Billing struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement" example:"1"`
CompanyID uint `json:"company_id" gorm:"type:integer" example:"1"`
Company Company `json:"company" gorm:"foreignKey:CompanyID"`
Amount float64 `json:"amount" gorm:"type:float" examp... |
import nltk
cfg = nltk.CFG.fromstring("""
S -> NP VP
NP -> Det N | 'John'
VP -> V NP
Det -> 'the' | 'a'
N -> 'dog' | 'ball'
V -> 'chased' | 'caught'
""")
parser = nltk.ChartParser(cfg)
def generate_parse_tree(sentence):
words = sentence.split()
trees = list(parser.parse(words))
if no... |
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name="backListener"
type="com.creative.share.apps.alforat.interfaces.Listeners.BackListener"/>... |
# 现在,在 SQL 和 NoSQL 之间做出选择比以往任何时候都容易
> 原文:<https://itnext.io/choosing-between-sql-and-nosql-is-now-easier-than-ever-9d467628630c?source=collection_archive---------6----------------------->
## TL;DR:除非 ACID 合规性是一个关键问题(你在金融、电子商务或政府部门),否则选择 NoSQL。
[ACID](https://en.wikipedia.org/wiki/ACID_(computer_science)) (原子性、一致性、隔离... |
"""
This script provides a diagnostic overview ML model.
Diagnostic features consists of :
1. execution time for training
2. provides model prediction
3. Dataset value analysis
4. Environment correctness
author: Ondrej Ploteny <ondrej.ploteny@thermofisher.com>
Nov 2023
"""
import pickle
import subproc... |
@extends('layouts.admin.admin')
@section('title')
Admin - Dashboard
@endsection
@section('header')
<div class="flex justify-between items-center">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
Welcome {{ $user }}
</h2>
<a href="{{ route('post.create') }}"
class=" text-lg... |
import { Avatar, Space, Typography } from 'antd';
import React, { useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
import { Link } from 'react-router-dom';
import orderApi from '../../../../../api/orderApi';
import ManageOrderTable from '../../../components/ManageOrderTable';
const { Text... |
<?php
namespace App\Services;
use App\Enums\TypeEnums;
use App\Models\Incoming;
use App\Models\Item;
use App\Models\Plate;
use Barryvdh\DomPDF\Facade\Pdf;
use Illuminate\Support\Facades\DB;
class IncomingService
{
public $incoming;
public $plates;
public function __construct(Incoming $incoming)
{
... |
# Type Casting
Converter o tipo de dado valor em outro tipo.
Converter uma variável do tipo double para uma variável do tipo int. Observe o exemplo abaixo:
**Código:**`
```
public class Typecasting {
public static void main(String[] args) {
double nota = 9.6;
System.out.println("tipo doub... |
#include <algorithm>
#include <cassert>
#include <chrono>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <map>
#include <span>
#include <string>
#include <vector>
std::pair<bool, bool> DupCount(std::string_view line) {
std::map<char, int> counter;
std::for_each(line.begin(), line.end(), ... |
# 프리온보딩 2주차 과제
## 🌐 배포 주소
### https://my-pre-onboard-12th-2-8.vercel.app/
## ⚙ 로컬 실행 방법
1. 프로젝트 내려받기 `git clone https://github.com/jypman/my-pre-onboard-12th-2.git ./`
2. 패키지 설치: `npm install`
3. 애플리케이션 실행: `npm start`
4. 테스트 코드 실행 `npm test`
## 🙋about me
| 박진영 ... |
package com.thinkdevs.noteapp.database;
import java.util.List;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
@Dao
public interface NoteDao {
@Insert(onConflict = OnConfl... |
<template>
<div aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<li class="page-item">
<button aria-label="Previous" class="page-link" @click="handlePrevPage">
<span aria-hidden="true">«</span>
</button>
</li>
<li class="page-... |
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class JobAppliedForUser extends Mailable
{
use Queueable, SerializesModels;
public $jobItem;
public... |
import React, { useState } from "react";
import "./CounterApp.css"; // Import your CSS file for styling
function CounterApp() {
const [count, setCount] = useState(0);
const handlePlus = () => {
setCount(count + 1);
};
const handleMinus = () => {
setCount(count - 1);
};
const handleReset = () => ... |
# Robot Framework Page Object Model Demo
## Robot Framework Introduction
[Robot Framework](http://robotframework.org) is a generic open source
automation framework for acceptance testing, acceptance test driven
development (ATDD), and robotic process automation (RPA). It has simple plain
text syntax and it can be exte... |
package types
import (
"encoding/json"
"fmt"
"time"
cmn "my-tendermint/tendermint/libs/common"
"my-tendermint/tendermint/types"
)
//-----------------------------------------------------------------------------
// RoundStepType enum type
// RoundStepType enumerates the state of the consensus state machine
type... |
import './App.css';
import React, { useState, useEffect } from 'react';
import Sidebar from './components/Sidebar';
import Editor from './components/Editor';
import Split from 'react-split';
import 'react-mde/lib/styles/css/react-mde-all.css';
import { nanoid } from 'nanoid';
export default function App() {
const [n... |
import 'package:flutter/material.dart';
import '../item.dart';
class ExpansionPanelRadioEx extends StatefulWidget {
const ExpansionPanelRadioEx({Key? key}) : super(key: key);
@override
State<ExpansionPanelRadioEx> createState() => _ExpansionPanelRadioExState();
}
class _ExpansionPanelRadioExState extends Stat... |
package exception.handler;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.LinkedHashSet;
import java.util.Set;
public class UnprocessableEntity extends ApiError{
private record ValidationError(String property, String message) {
}
private final Set<ValidationError> validationErrors = new ... |
import {useEffect, useState} from "react";
import {subMonths} from "date-fns";
import {collection, DocumentData, getDocs, onSnapshot, query, Timestamp, where} from "firebase/firestore";
import {firebaseDatabase} from "~/domain/firebase";
export function useWeightData(timeRange: "daily" | "weekly" | "monthly" = "daily"... |
import json
import os
import numpy as np
import torch
from torch.utils.data import Dataset
from .language_utils import word_to_indices, VOCAB_SIZE, letter_to_index
def read_data(train_data_dir, test_data_dir):
"""parses data in given train and test data directories
assumes:
- the data in the input dire... |
import React, { useEffect, useState } from 'react'
import ReactDOM from 'react-dom'
import './options.css'
// Material UI Component
import {Box, Button, Card, CardContent, Grid, Switch, TextField, Typography} from '@mui/material';
// Utils
import { setStoredOptions, LocalStorageOptions, getStoredOptions } from '../... |
<script>
import {errorState} from "../../store/SiteStore";
import { onMount } from "svelte";
import {push , querystring} from "svelte-spa-router";
import qs from 'qs';
import SectionLayout from '../../components/layout/SectionLayout.svelte'
import FileUpload from "../../components/utils/FileUplo... |
const fs = require('fs')
const path = require('path')
const transform = require('./convert-svg-to-omi')
const folderPath = 'dist'
if (!fs.existsSync(folderPath)) {
// 文件夹不存在,创建文件夹
fs.mkdirSync(folderPath)
}
const svgDir = 'src/_icons/svg'
const iconDir = 'dist'
const indexFile = 'dist/index.js'
const data = fs.r... |
# Optionals
TypeScript doesn't technically have "optional" types. Instead, users must create union types that incorporate either `null` or `undefined`:
```typescript
const x: User | null = { name: 'Bill Gates' };
// Error: x is possibly 'null'
console.log(x.name);
```
Rust, on the other hand, has an official `Optio... |
import { Test, TestingModule } from '@nestjs/testing';
import { PaymentService } from '../payment.service';
import { Repository } from 'typeorm';
import { PaymentEntity } from '../entities/payment.entity';
import { getRepositoryToken } from '@nestjs/typeorm';
import { paymentMock } from '../__mocks__/payment.mock';
imp... |
import React, { useState } from "react";
import { Story, Meta } from "@storybook/react/types-6-0";
import { Modal, Props } from "../components/Modal";
import { Button } from "../components/Button";
import { Form } from "../components/Form";
import { FormFieldsType } from "../model";
export default {
title: "Modal",... |
import { useFetchQuery, useRouterQuery } from "@/hooks";
import { Avatar, Button, message, Modal, Select, TableProps, Tag } from "antd";
import dayjs from "dayjs";
import { AntDesignOutlined, DeleteOutlined, EyeOutlined } from "@ant-design/icons";
import { IAnswerCategories } from "@/modules/answer-category/model/answe... |
-- BBDD libreria
-- 1. Number of records in the table "libros".
SELECT count(*) AS records
FROM libros;
-- 2. Number of books published by "Planeta".
SELECT sum(cantidad) AS 'editorial Planeta'
FROM libros
WHERE editorial = 'Planeta';
-- 3. Number of books of the writer "Borges" (also if he is coauthor).
SELEC... |
import { INestApplication } from '@nestjs/common';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import * as path from 'path';
import { ApiModule } from './app/api/api.module';
const PACKAGE_FILE_PATH = path.join(__dirname, '../package.json');
export async function bootstrapSwagger(app: INestAppli... |
<?php
use App\Models\Menu;
use App\Models\tablle;
use App\Models\User;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
... |
/* Copyright (C) 2017 Coos Baakman
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applicat... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
/************************ box-sizing原理 ************************/
/*
html,
body {
height: 100%;
padding: 0;
margin: 0;
}
.wrap {
... |
const request = require('supertest')
const app = require('../app')
const URL_ACTORS = '/actors'
const actor = {
firstName: "ronald",
lastName: "reagan",
nationality: "UES",
image: "https://es.wikipedia.org/wiki/Ronald_Reagan#/media/Archivo:Official_Portrait_of_President_Reagan_1981.jpg",
birthday:... |
const ApiError = require('../error/ApiErrors');
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const { User } = require('../models/models');
const generateJwt = (last_name, id, email) => {
return jwt.sign(
{ last_name: last_name, id: id, email: email },
process.env.SECRET_KE... |
//normalmente ao mechermos com typescript vamos nos deparar com uma pasta "public" e uma pasta "src"
//para a pasta public vai o html e o javascript , para a pasta src vai o codigo typescript.
//para GERAR o codigo JAVASCRIPT do codigo TYPESCRIPT, damos o comando no terminal assim "tsc o nome da pasta e o nome do arqu... |
# Task
Reverse order of elements in array
## I => O
```
[1] => [1]
[1, 2] => [2, 1]
[1, 2, 3] => [3, 2, 1]
[1, 2, 3, 4] => [4, 3, 2, 1]
```
### Real life approach
Assuming elements in array are pieces of paper arranged in a line from left to right
1. Swap leftmost piece with rightmost piece
2. Swap second leftmost... |
#pragma once
#include <string>
using namespace std;
class videoGame
{
private:
string gameName;
double gameCost;
int itemNum;
int stock;
public:
videoGame();
videoGame(string n, double cost, int num, int snum);
//setters
void setName(string n) { gameName = n; }
void setCost(double... |
let myLibrary = [];
let newBookButton = document.querySelector(".new-button");
let dialog = document.querySelector("dialog");
let closeDialog = document.querySelector(".close-dialog");
let form = document.querySelector("form");
let title = document.querySelector("#title");
let author = document.querySelector("#author")... |
#ifndef __ILIGHTNODE_H_INCLUDE__
#define __ILIGHTNODE_H_INCLUDE__
#include "ISceneNode.h"
#include "ISceneManager.h"
enum E_LIGHT_TYPE
{
ELT_POINT,
ELT_DIRECTIONAL,
ELT_SPOT
};
/*
D3DLIGHTTYPE Type;
D3DCOLORVALUE Diffuse;
D3DCOLORVALUE Specular;
D3DCOLORVALUE Ambient;
D3DVECTOR Position;
D3DVECTOR Directi... |
import { render, screen } from "@testing-library/react"
import UserEvent from "@testing-library/user-event"
import PwaEnabler from "."
import {
setServiceNavigator,
spyAsIPad,
spyAsAndroid,
spyOnReferrer,
} from "../../../__mocks__/windowMock"
describe("PwaEnabler", () => {
const renderComponent = (onCancel ... |
import { Notify } from 'notiflix/build/notiflix-notify-aio';
const form = document.querySelector('form.form');
const options = {
position: 'center-bottom',
distance: '15px',
borderRadius: '15px',
timeout: 10000,
clickToClose: true,
cssAnimationStyle: 'from-right',
};
form.addEventListener('submit', onSubmi... |
package com.atguigu.gmall0401.cart.service.impl;
import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.annotation.Service;
import com.alibaba.fastjson.JSON;
import com.atguigu.gmall0401.bean.CartInfo;
import com.atguigu.gmall0401.bean.SkuInfo;
import com.atguigu.gmall0401.cart.mapper.Ca... |
package com.paradise.hellth.data.repository
import com.google.firebase.database.ChildEventListener
import com.google.firebase.database.DataSnapshot
import com.google.firebase.database.DatabaseError
import com.google.firebase.database.ValueEventListener
import com.paradise.hellth.util.model.HealthRecord
import com.para... |
// Copyright (C) 2023 Light, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is di... |
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
interface CustomNextRequest extends NextRequest {
user?: any;
}
// This function can be marked `async` if using `await` inside
export async function middleware(request: CustomNextRequest) {
const { pathname, origin } = req... |
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/views/controls/button/image_button.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/ima... |
import { InputLabel } from "@/components/Elements/Texts/InputLabel";
import { yupResolver } from "@hookform/resolvers/yup";
import { SubmitHandler, useForm } from "react-hook-form";
// state
import { RadioGroupForm } from "@/components/Elements/Forms/RadioGroupForm";
import { SelectForm } from "@/components/Elements/Fo... |
# SMS Spam Detection Project
This project focuses on developing a machine learning model to accurately classify SMS messages as spam (unwanted messages) or ham (legitimate messages). The goal is to enhance user experience and security by effectively identifying and filtering out spam.
## Project Overview
In this Jup... |
<script setup lang="ts">
import MobileSideBar from './MobileSideBar.vue'
import { convertImgUrl } from '@/utils'
import { useAppStore, useUserStore } from '@/store'
const [appStore, userStore] = [useAppStore(), useUserStore()]
const [router, route] = [useRouter(), useRoute()]
// 菜单项 TODO: 直接从路由中加载? 似乎不可行
const menuOp... |
#ifndef SIDEWALK_H__
#define SIDEWALK_H__
#include "c4d.h"
#include "lib_noise.h"
/// Options for GetHardRndAngle()
enum class RANDOMANGLE
{
GETALL = 0, ///< Get all kinds of random angles
GET180 = 1 ///< Get only angles divideable by 180°
} ENUM_END_LIST(RANDOMANGLE);
/// This class builds a complete s... |
// // src/App.js
// import React, { useState } from "react";
// import "./App.css";
// import ImageGallery from "./ImageGallery";
// import OverlayText from "./OverlayText";
// function App() {
// const [selectedImage, setSelectedImage] = useState(null);
// const handleImageClick = (imageUrl) => {
// setSelec... |
package es.eduardo.gymtracker;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.firestore.Docume... |
import { Route } from "@angular/router";
import { AuthComponent } from "../../components/auth/auth.component";
import { Paths } from "../../shared/enums/path.enum";
export const routes: Route[] = [
{
path: Paths.AUTH,
component: AuthComponent,
children: [
{
path: Paths.SIGN_IN... |
package com.example.entity;
import com.example.model.Order;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Entity
@Table(name = "orders")... |
import { Box, Typography, Stack } from "@mui/material";
import Aos from "aos";
import { useEffect } from "react";
const ExerciseVideos = ({ exerciseVideos, name }) => {
useEffect(() => {
Aos.init({ duration: 2000 });
});
return (
<Box
data-aos="fade-up"
sx={{ marginTop: { lg: "203px", xs: "20p... |
#ifndef IMPIANTO_H
#define IMPIANTO_H
#include <vector>
#include "data.h"
#include "bombola.h"
#include "veicolo.h"
#include "funzioni.h"
class Impianto //classe astratta
{
private:
std::vector<Bombola*> serbatoi;
public:
virtual ~Impianto();
virtual Impianto *clona() const=0;
virtual std::string getIn... |
import { BadRequestException, Injectable } from '@nestjs/common';
import { IReservation } from './interfaces/IReservation';
import { ID } from 'src/types/CommonTypes';
import { ReservationDto } from './dto/reservation.dto';
import { ReservationSearchOptions } from './interfaces/IReservationSearchOptions';
import { Rese... |
from django.test import TestCase
from ..models import LicenceVersion
from ..factories import LicenceVersionFactory, LicenceFactory
class LicenceVersionTests(TestCase):
def test_create(self):
obj = LicenceVersionFactory.create()
qs = LicenceVersion.objects.filter(pk=obj.pk)
self.assertTrue... |
// listado de todas las oportunidades de practica que corresponden a los intereses del estudiante
// -------------------------------------------------------------------------------------------------
import React from 'react';
import {
Box, Heading, Text, Wrap, WrapItem,
} from '@chakra-ui/react';
import { useNavigat... |
package dev.langchain4j.store.embedding.mongodb;
import com.mongodb.MongoClientSettings;
import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoClients;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.model.Filters;
import dev.langchain4j.data.segment.TextSegment;
import dev.langcha... |
<script lang="ts" setup>
import {
NAvatar,
NBadge,
NButton,
NCard,
NCol,
NForm,
NFormItem,
NImage,
NInput,
NModal,
NPagination,
NPopover, NPopselect, NRow, NSlider, NStatistic, NSwitch, NTabPane, NTabs, useDialog, useMessage,
} from 'naive-ui'
import {computed, onBeforeMount, onMounted, reactive, ref} from ... |
/*
* Copyright (C) 2023 The ORT Server Authors (See <https://github.com/eclipse-apoapsis/ort-server/blob/main/NOTICE>)
*
* 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
*
* https://w... |
import requests
from bs4 import BeautifulSoup
import pandas as pd
from urllib.parse import quote
import chatGPTSummary
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
def fetchAndSaveAsHTML(url, path):
# Increase ... |
<header>
<nav
class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"
>
<div class="container">
<a class="navbar-brand" [routerLink]="['/']">Vizualinio programavimo C kalba kursai</a>
<button
class="navbar-toggler"
type="button"
... |
---
title: will-change
slug: Web/CSS/will-change
tags:
- CSS
- Propriété
- Reference
translation_of: Web/CSS/will-change
---
<div><section class="Quick_links" id="Quick_Links"><ol><li><strong><a href="/fr/docs/Web/CSS">CSS</a></strong></li><li><strong><a href="/fr/docs/Web/CSS/Reference">Référence CSS</a></strong... |
import 'package:app_geek_plus/Modules/movies/movies_controller.dart';
import 'package:app_geek_plus/application/ui/widgets/movie_card.dart';
import 'package:app_geek_plus/models/movie_model.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get_state_manager/src/rx_flutter... |
import React, { useState } from 'react';
import { WorktimeRecord } from '../../behavior/worktime/types';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faFileLines } from '@fortawesome/free-solid-svg-icons';
import { WorktimeEditingModal } from './WorktimeEditingModal';
import { Button } fro... |
<!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">
<link rel="stylesheet" href="assets/css/style.css">
<title>History web</title>
<link rel="stylesheet" href="... |
.\" $OpenBSD: rpki-client.8,v 1.4 2019/08/09 09:50:44 claudio Exp $
.\"
.\" Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permis... |
<div *ngIf="status != null">
<div class="d-flex justify-content-center my-3">
<div class="alert alert-danger" role="alert">
{{ status!.error.message }} - {{ status!.message }}
</div>
</div>
</div>
<div *ngIf="status == null" class="d-flex justify-content-center my-3">
<form [formGroup]="pedido... |
import src.utils.data_processing as dp
import numpy as np
from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import OneHotEncoder, OrdinalEncoder, StandardScaler, FunctionTransformer
from sklearn.compose import ColumnTransformer
class Processing(object):
de... |
// Cineware SDK //
// (c) MAXON Computer GmbH, all rights reserved //
#ifndef C4D_RENDERDATA_H__
#define C4D_RENDERDATA_H__
#include "c4d_baselist4d.h"
#include "c4d_rootvideopost.h"
#include "c4d_rootmultipass.h"
namespace cineware
{
#pragma pack (push, 8)
... |
// widgets/bottom_bar.dart
import 'package:flutter/material.dart';
class BottomBar extends StatelessWidget {
final int selectedIndex;
final Function(int) onItemTapped;
const BottomBar({super.key, required this.selectedIndex, required this.onItemTapped});
@override
Widget build(BuildContext context) {
r... |
from keymgmt.models import SSHKey, Environment, Host, SSHAccountAvailable
import os
import requests
import glob
from collections import OrderedDict
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.conf import settings
class ImportPuppetdb:
def __init__(self):
self.setting... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.