text stringlengths 184 4.48M |
|---|
from typing import Iterable
from prefect.logging import get_logger
from prefect.server.events.schemas.events import ReceivedEvent
from prefect.server.utilities.messaging import Publisher, create_publisher
from prefect.settings import PREFECT_EVENTS_MAXIMUM_SIZE_BYTES
logger = get_logger(__name__)
async def publish(... |
<template>
<div class="flex items-center justify-between">
<nuxt-link
:to="{ name: 'talks' }"
class="text-blue-600 hover:text-blue-800"
>
< Back to list
</nuxt-link>
<button
class="px-6 py-2 bg-red-600 text-white text-xs rounded shadow-md hover:bg-red-700"
@click="del... |
import {
defer,
LinksFunction,
type LoaderFunction,
type MetaFunction,
} from "@remix-run/node";
import { Await, useLoaderData } from "@remix-run/react";
import { Suspense } from "react";
//import { deferredData01 } from "./deferredData01.server";
//import { deferredData02 } from "./deferredData02.server";
impo... |
const bcrypt = require("bcrypt");
const jwt = require("jsonwebtoken");
const gravatar = require("gravatar");
const path = require("path");
const fs = require("fs/promises");
const { nanoid } = require("nanoid");
const User = require("../models/user");
const {
ctrlWrapper,
HttpError,
avatarHandler,
sendEmail,
} ... |
<?php
namespace Drupal\{{ machine_name }}\Form;
use Drupal\Core\Entity\ContentEntityForm;
use Drupal\Core\Form\FormStateInterface;
/**
* Form controller for the {{ entity_type_label|lower }} entity edit forms.
*/
class {{ class_prefix }}Form extends ContentEntityForm {
/**
* {@inheritdoc}
*/
public func... |
== Introduction
In this section you will configure and observe traffic between the micro services that make up the example application.
Requests are routed to services within a service mesh with virtual services.
Each virtual service consists of a set of routing rules that are evaluated in order.
Red Hat OpenShift Se... |
import s from "styles/Main.module.sass"
import * as React from "react"
import {ButtonDefault} from "../utils/ButtonDefault"
import {useSelector} from "react-redux"
import {selectHireMe} from "components/blocks/HireMe/hireMe.selector"
import {useState} from "react"
import Notification from "components/blocks/utils/... |
import csv
from dataclasses import dataclass
from io import BufferedReader
from pathlib import Path
import struct
import sys
import progressbar
from slugify import slugify
from inc.yaml import yaml
from .enums import type_map, Version
from .strings import ColoStrings, get_string, XdStrings
out = {}
species_slugs = {... |
<template>
<div class="add-entry">
<p>Adding Entry</p>
<div v-if="errorOnSubmit" class="error">
<p>Error, cannot create entry</p>
</div>
<form>
<div>
<input
type="date"
name="date-select"
id="date-select"
:value="displayDate"
@input... |
import * as Handlebars from "handlebars";
import Block from "../../../helpers/classes/block";
import { Props } from "../../../helpers/models/props.model";
import { userInfoTableTmpl } from "./user-info-table.tmpl";
export interface UserInfoTableProps {
email: string;
userName: string;
firstName: string;
lastN... |
// Pascal Language Server
// Copyright 2020 Ryan Joseph
// This file is part of Pascal Language Server.
// Pascal Language Server is free software: you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 3 of
// the ... |
/*
* ArcMenu - A traditional application menu for GNOME 3
*
* ArcMenu Lead Developer and Maintainer
* Andrew Zaech https://gitlab.com/AndrewZaech
*
* ArcMenu Founder, Former Maintainer, and Former Graphic Designer
* LinxGem33 https://gitlab.com/LinxGem33 - (No Longer Active)
*
* This program is free software... |
import MockAdapter from 'axios-mock-adapter';
import $ from 'jquery';
import htmlMergeRequestsWithTaskList from 'test_fixtures/merge_requests/merge_request_with_task_list.html';
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
import initMrPage from 'helpers/init_vue_mr_page_helper';
import { stubPe... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Utilities;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.time.DateTimeException;
import java.ti... |
// Component dependencies
import { Form, Input } from "antd";
import getGfFieldId from "@/functions/wordpress/gravityForms/getGfFieldId";
// Types
interface TextAreaProps {
label: string;
errorMessage: string;
visibility: string;
maxLength: number;
isRequired: boolean;
placeholder: string;
id: number;
... |
import math
import random
import numpy as np
import cv2
class PathGenerator():
def __init__(self, min_dist, max_dist, x_limit, y_limit, n_step):
self.min_dist = min_dist
self.max_dist = max_dist
self.x_limit = x_limit
self.y_limit = y_limit
self.min_step = min_dist / n_step
... |
public class git_54 {
static class TreeNode{
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) { val = x; }
}
public static boolean isSameTree(TreeNode p, TreeNode q) {
// Base case: both nodes are null
if (p == null && q == null) {
return ... |
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
class RoleSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
... |
import Link from 'next/link';
import Image from 'next/image';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCheck } from '@fortawesome/free-solid-svg-icons';
import PageHeader from '../../components/PageHeader';
import Accordion from '../../components/Accordion';
import useClickTracking f... |
import { useNavigate } from "react-router-dom";
import { OrderItem } from "../../types";
const PTag = ({title, text}: {title: string, text: string}) => {
return (
<div className="flex gap-2 items-center">
<p className=" font-semibold text-base">{title}</p>
<p>{text}</p>
</div>
)
}
const OrderL... |
@extends('backend.layouts.app')
@section('title')
{{ __('map') }}
@endsection
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!-- MAp -->
<div class="card">
<form id="" class="form-horizontal" a... |
import UIKit
var greeting = "Hello, playground"
print(greeting)
class Artist{
let name : String
var albumArr : [Album] = []
init(name : String){
self.name = name
}
func addAlbum(album : Album){
albumArr.append(album)
}
}
class Album {
let title : String
var songs :... |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDummyLogisticTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('dummylogistic', function (Blueprint $table) {
... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.frojasg1.general.codec.impl;
import com.frojasg1.general.ClassFunctions;
import com.frojasg1.general.codec.GenericStringDe... |
import { useState, useEffect, useCallback } from "react";
import cloneDeep from "lodash.clonedeep";
const initialBoard = [
[null, null, null],
[null, null, null],
[null, null, null]
];
const dim = 3;
// row-wise
// col-wise
// diagonal1
// diagonal2
export const checkWinner = (table) => {
let colResult;
// ... |
import styled from "styled-components";
import {
v,
InputBuscadorLista,
ConvertirCapitalize,
Device,
BtnCerrar,
} from "../../index";
import iso from "iso-country-currency";
import { useState } from "react";
export function ListaPaises({ setSelect, setState }) {
const isocodigos = iso.getAllISOCodes();
co... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... |
## PR-Assistant chrome extension
PR-Assistant Chrome extension is a collection of tools that integrates seamlessly with your GitHub environment, aiming to enhance your PR-Assistant usage experience, and providing additional features.
## Features
### Toolbar extension
With PR-Assistant Chrome extension, it's [easier t... |
import fs from 'fs';
import MetaRealmManager from '../src/MetaRealms/metaRealmManager';
import LoadableRealmManager from '../src/LoadableRealms/LoadableRealmManager';
import { saveSchema } from '../src/MetaRealms';
const TEST_NAME: string = 'LoadableRealm';
const TEST_DIRECTORY: string = `__tests__/${TEST_NAME}`;
cons... |
#include "Question.h"
// Function to merge two sorted arrays and count inversions
long long mergeAndCount(int arr[], int left, int mid, int right) {
long long count=0;
// Complete the implementation here:
// START
int i, j, k;
int n1 = mid - left + 1;
int n2 = right - mid;
int L[n1], R[n2]... |
/*
Author: cuckoo
Date: 2017/02/27 22:01:26
Update: 2017/03/28 15:38:04 | 2017/07/22 14:13:20
Problem: Longest Substring Without Repeating Characters
Difficulty: Medium
Source: https://leetcode.com/problems/longest-substring-without-repeating-characte... |
package olmo.wellness.android.ui.screen.playback_video.common
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.layout.wrapContentWi... |
import React, { Component } from "react";
import { connect } from "react-redux";
import { login } from "../../actions/securityActions";
class Login extends Component {
constructor() {
super()
this.state = {
username: "",
password: "",
errors: ""
}
}
... |
/**
* O Comando "ban" banirá determinado usuário do servidor.
*/
const Discord = require('discord.js')
module.exports = {
run: async function(client, message, args) {
if (!message.member.hasPermission(['MANAGE_MESSAGES', 'ADMINISTRATOR'])) { return message.channel.send('> **Você não tem permissão para usar es... |
import { useQuery } from "@tanstack/react-query";
import SectionHelmet from "../../Components/SectionHelmet";
import useAxiosSecure from "../../Hooks/useAxiosSecure";
import SectionTitle from "../../Components/SectionTitle";
import Cover from "../../Components/Cover";
import img from "../../assets/images/slider2.jpg";
... |
# ALX Higher Level Programming : Python
## Overview
This program is designed for beginners aiming to learn Python programming. It covers essential concepts including if/else statements, loops, and functions.
## Contents
- **Lesson 1: Introduction to Python**
- Overview of Python, its syntax, and basic operations.... |
use std::collections::{HashMap, HashSet};
use regex::Regex;
advent_of_code::solution!(7);
pub fn part_one(input: &str) -> Option<String> {
let re: Regex = Regex::new(r"Step (\w+) must be finished before step (\w+) can begin.").unwrap();
let (preceding_steps, anteceding_steps) = input
.lines()
.fold(
... |
import { Container } from "react-bootstrap";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import Header from "./components/Header";
import Footer from "./components/Footer";
import HomeScreen from "./screens/HomeScreen";
import RegisterScreen from "./screens/RegisterScreen";
import LoginS... |
import { Header } from "../../components/Header";
import { Share } from "../../components/Share";
import bannerNPS from "../../assets/img/NPS.webp"
import { Container, Text, Title, SubTitle, TextPromotor, TextDetrator, VerMais } from "./styles"
const Nps = () => {
return (<>
<Header />
<Container>... |
package com.example.carbook.service.impl;
import com.example.carbook.model.dto.BlogSummaryDTO;
import com.example.carbook.model.entity.BlogEntity;
import com.example.carbook.repo.BlogRepository;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import... |
import { sleep } from './sleep';
function random(min: number, max: number) {
return min + Math.floor(Math.random() * (max - min + 1));
}
function randomColor(): string {
const minLightness = 80; // 最小亮度值
const maxLightness = 95; // 最大亮度值
const hueRange = 60; // 色调范围
const randomHue = Math.floor(Math.random(... |
import type { LoaderFunction } from "@remix-run/node";
import { Link, useLoaderData } from "@remix-run/react";
import { ArticleCardImageAdminPage } from "~/components/BlogPreview";
import type { posts } from "~/services/post.server";
import { getPosts } from "~/services/post.server";
type loaderData = {
posts: posts... |
import axios, { AxiosInstance, AxiosPromise } from 'axios'
import * as utils from '@/utils'
import { IAnyObj } from '@/defineds'
import {
IRestHeader, IResult, RequestFucNames, RequestMethod,
} from '@/defineds/utils/rest'
import { RootStore } from '@/store/types'
import store from '@store/index'
import buildURL from... |
/*
This file is part of the JUCE framework.
Copyright (c) Raw Material Software Limited
JUCE is an open source framework subject to commercial or open source
licensing.
By downloading, installing, or using the JUCE framework, or combining the
JUCE framework with any other source code, object code... |
import React from "react";
import { Col } from "react-bootstrap";
import {
Area,
AreaChart,
CartesianGrid,
Tooltip,
XAxis,
YAxis,
} from "recharts";
const Areachart = () => {
const data = [
{
month: "Mar",
investment: 100000,
sell: 241,
revenue: 10401,
},
{
month... |
package ru.practicum.shareit.user.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import ru.practicum.shareit.exception.NotFoundException;
import ru.practicum.shareit.user.model.User;
i... |
Features of C++
Introduction
C++ is a general-purpose programming language and is widely used nowadays for competitive programming. It has imperative, object-oriented, and generic programming features. C++ runs on lots of platforms like Windows, Linux, Unix, Mac, etc. It can be used to develop operating systems, brow... |
# moinmoin.rb - MoinMoin file format parser
# Copyright (C) 2006 Akira TAGOH
# Authors:
# Akira TAGOH <at@gclab.org>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the ... |
import { Row, Col, Button } from "react-bootstrap";
import { IDriver } from "../interfaces/component.interface"
interface IProps {
index: number
driver: IDriver
overtake: (id:number) => void
}
//display driver details with rb grid
export default function Driver(props:IProps) {
const { id, code, first... |
// Author: Daan van den Bergh
// Copyright: � 2022 Daan van den Bergh.
// Backend endpoints.
namespace backend {
// User endpoints.
namespace user {
// Get projects.
Endpoint projects() {
return Endpoint {
.method = "GET",
.endpoint = "/backend/user/projects",
.content_type = "application/json",
.rate_limit... |
// This file contains various flattening classes that flattens api responses into concise objects for usage.
import type {
DailyChallenge,
DailyChallengeResponse,
Topper,
TopperResponse,
User,
UserResponse,
DatabaseQuery
} from '$lib/types/types';
class DailyChallengeFlattener implements DailyChallenge {
read... |
import { Term, TypeChart, Image } from './../modules/data/data';
export const ELEMENTS = [`Fire`, `Water`, `Rock`, `Leaf`, `Electric`, `Death`] as const;
export type ElemType = typeof ELEMENTS[number];
export const BUFF_TIMINGS = [`Pre-Actions`, `With Attack`, `Post Actions`];
export type BuffTiming = typeof BUFF_TIM... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAs... |
// src/components/Order/EditOrder.js
import CompanyAppBar from '../CompanyAppBar';
import React, { useState, useEffect } from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import { getFirestore, doc, getDoc, updateDoc } from 'firebase/firestore';
import { TextField, Button, Container, Typography }... |
//
// ActivityStore.swift
// Bored
//
// Created by armin on 8/7/21.
//
import SwiftUI
import BoredSDK
class ActivityStore: ObservableObject {
@AppStorage("activityTitle") private var activityTitle: String = ""
@AppStorage("activityAccessibility") private var activityAccessibility: Double = 0.0
@A... |
/*
* Copyright (C) 2022 Starfire Aviation, LLC
*
* 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 applic... |
package com.sample;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.sample.config.JavaConfigA;
import com.sample.services.DependencyInjectionService;
import com.sample.utils.DependencyUtilB;
public class JavaBasedConfigClient {
public static void main(String[] args) {
... |
import React from "react";
import Bar from "./Bar";
import {
ChartContainer,
ChartInner,
ChartSummaryColumnLeft,
ChartSummaryColumnRight,
ChartSummaryRow,
} from "./Chart.styled";
import Header from "./Header";
const Chart = ({ data }: any) => {
const weeklyAmounts = data.map(
(dataRow: { amount: numbe... |
import React, { useEffect, useState } from "react";
import QRCode from "qrcode";
import { getNumberOfFactsState } from "../../services/GameStatesService";
import { Backdrop } from "@mui/material";
interface PlayerLinkQRProps {
gameId: string;
qrHeaderText: string;
qrInstructions: string
}
export const PlayerLinkQR... |
package ptoa
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/uber/peloton/.gen/peloton/api/v1alpha/job/stateless"
"github.com/uber/peloton/pkg/aurorabridge/fixture"
)
func TestNewJobUpdateSummary_Timestamps(t *testing.T) {
testCases := []struct {
name string
event... |
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatNativeDateModule } from '@angular/material/core';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { MatCheckboxModu... |
/*
setPeriod(период) - установка периода в микросекундах и запуск таймера. Возвращает реальный период (точность ограничена разрешением таймера).
setFrequency(частота) - установка частоты в Герцах и запуск таймера. Возвращает реальную частоту (точность ограничена разрешением таймера).
setFrequencyFloat(часто... |
\section{Durchführung}
\label{sec:Durchführung}
Zur Analyse der Funktionsweise des SciFi Detektors wird in diesem Versuch eine einzelne szintillierende Faser genauer betrachtet. Der dafür verwendete
Versuchsaufbau ist in \autoref{sec:aufbau} beschrieben und das Messprogramm wird in \autoref{sec:messprogramm} erklärt.
... |
//
// UserSettingsViewController.swift
// kufar-analogue
//
// Created by Bahdan Piatrouski on 14.04.23.
//
import UIKit
import FirebaseAuth
import SPIndicator
class UserSettingsViewController: UIViewController {
@IBOutlet weak var nameTextField: UITextField!
@IBOutlet weak var emailTextField: UITextF... |
-- Show Database --
SHOW DATABASES;
-- Create Database --
CREATE DATABASE book_store;
-- Use Database --
USE book_store;
-- Show Table --
SHOW tables;
-- Create Table --
CREATE TABLE books
(id INT AUTO_INCREMENT PRIMARY KEY,
author1 VARCHAR(100) NOT NULL,
author2 VARCHAR(100),
author3 VARCHAR(100),
title VARCHAR(10... |
import { combineReducers } from 'redux'
import { brokerageReducer as brokerage } from './brokerage/slice'
import { fundRecoveryReducer } from './fundRecovery/reducers'
import identityVerificationReducer from './identityVerification/reducers'
import interestReducer from './interest/reducers'
import layoutWallet from '.... |
package com.vylitkova.wardrobe.accessories;
import com.vylitkova.wardrobe.clothes.Clothes;
import org.bson.types.ObjectId;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.anno... |
#include <iostream>
using namespace std;
class Node{
public :
int data;
Node* left;
Node* right;
Node(){
cout << "Hi! I am a constructor without data" << endl;
}
Node(int data){
this -> data = data;
this -> left = NULL;
this -> right = NULL;
}
};
voi... |
!!-------------------------------------------------------
!!---- Crystallographic Fortran Modules Library (CrysFML)
!!-------------------------------------------------------
!!---- The CrysFML project is distributed under LGPL. In agreement with the
!!---- Intergovernmental Convention of the ILL, this software cannot b... |
from fastapi import APIRouter, Depends, Query
from sqlalchemy.orm import Session
from sqlalchemy import or_
from .schemas import Book
from .database import get_db
router = APIRouter()
@router.get("/books/")
def search_books(query: str = Query(None), db: Session = Depends(get_db)):
if not query:
return []
... |
from rest_framework.views import APIView
from rest_framework.response import Response
from django.contrib.auth.models import User
from rest_framework.permissions import IsAuthenticated
from Product.models import Product, Product_availability, Category_availability, ProductCategory
from ZapioApi.api_packages import *
fr... |
#include <memory>
// Any : 可以代表并接收任意类型
class Any
{
public:
Any() = default;
~Any() = default;
Any(const Any &) = delete; // 因为unique_ptr
Any &operator=(const Any &) = delete;
Any(Any &&) = default;
Any &operator=(Any &&) = default;
// 使得Any接收任意类型data,并存入Derived对象 由base管理.
template <... |
package br.com.alura.AplicandoOrientacaoObjetos.screenmatch.modelos;
/*
* A HERANÇA PERMITE TORNAR O CÓDIGO MAIS UTILIZÁVEL
*/
/*
* SUPERCLASSE/CLASSE MÃE/CLASSE PRINCIPAL
* IMPLEMENTAÇÃO DA CLASSE Comparable<> POSSIBILITA A COMPARAÇÃO DE LISTAS
* ALÉM DA CLASSE Comparable, O JAVA POSSUI UMA OUTRA INTERFACE CHAM... |
package Clase65;
import java.util.Scanner;
public class Cadenas {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scanner = new Scanner(System.in);
// Tarea 1: Extraer la cuarta y quinta letra de una cadena
System.out.print("Ingrese una cadena de texto: ");
... |
/*
Josiah - Oct 29, 2020
Handles loading JSON data from Unsplash.
*/
import SwiftUI
struct Photo: Identifiable, Decodable {
var id: String
var alt_description: String?
var urls: [String : String]
//var user: [String : String]
//var user: String?
//var user: [String : String]
//var to... |
#
# (C) Tenable Network Security, Inc.
#
include("compat.inc");
if (description)
{
script_id(55523);
script_version("$Revision: 1.5 $");
script_cvs_date("$Date: 2014/12/26 13:58:58 $");
script_bugtraq_id(48539);
script_osvdb_id(73573);
script_xref(name:"EDB-ID", value:"17491");
script_name(english:"vs... |
import 'package:flutter/foundation.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:flutter/material.dart';
import 'package:learning_get_it/pages/home/home_store.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:learning_get_it/services/getit_service.dart';
class Ho... |
import {sanityClient, urlFor} from "../../lib/sanity";
import Image from "next/image";
import {PortableText, PortableTextComponentsProvider} from "@portabletext/react";
const usageQuery = `*[_type == "usage" && slug.current == $slug][0]{
title,
_id,
description,
featuredImage
}`;
const slugUsage = ({post}) => {
c... |
import {IProjectCard} from '../IProjectCard';
import {Card} from '../Card';
import {CardType} from '../CardType';
import {Player} from '../../Player';
import {CardName} from '../../CardName';
import {MAX_OCEAN_TILES, REDS_RULING_POLICY_COST} from '../../constants';
import {PartyHooks} from '../../turmoil/parties/PartyH... |
import { test, type Page, type BrowserContext } from '@playwright/test';
import ProfilePage from '../ui/pages/profile-page';
import apiPaths from '../utils/apiPaths';
import pages from '../utils/pages';
let profilePage: ProfilePage;
test.beforeEach(async ({ page }) => {
await page.goto(pages.profile);
profil... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "object.h"
#include <assert.h>
void Object_destroy (void *self)
{
Object *obj = self;
if(obj) {
if(obj->description) {
free(obj->description);
}
free(obj);
}
}
void Object_describe(void *self)
{
Object *obj = self;
printf(... |
import 'package:flutter/material.dart';
class PopupMenu extends StatelessWidget {
const PopupMenu({super.key});
@override
Widget build(BuildContext context) {
return PopupMenuButton(
icon: const Icon(Icons.menu, size: 30.0, color: Colors.white),
itemBuilder: (BuildContext context) {
retu... |
// SPDX-License-Identifier: GPL
pragma solidity ^0.6.6;
import "./interfaces/IOneSwapToken.sol";
import "./interfaces/IOneSwapFactory.sol";
import "./interfaces/IOneSwapRouter.sol";
import "./interfaces/IOneSwapBuyback.sol";
contract OneSwapBuyback is IOneSwapBuyback {
uint256 private constant _MAX_UINT256 = uin... |
<?php
/**
* LiteMage
* @package LiteSpeed_LiteMage
* @copyright Copyright (c) LiteSpeed Technologies, Inc. All rights reserved. (https://www.litespeedtech.com)
* @license https://opensource.org/licenses/GPL-3.0
*/
namespace Litespeed\Litemage\Console\Command;
use Symfony\Component\Console\Input\InputArgum... |
import React, { useEffect, useState } from 'react';
import { Card, Form, Input, Button, Upload, message, Select } from 'antd';
import { UploadOutlined } from '@ant-design/icons';
import axios from 'axios';
import { useParams, useNavigate } from 'react-router-dom';
const { Option } = Select;
const ProductEdit = () =>... |
import { useEffect, useState } from "react";
import { fetchMoviesFromApi, fetchMovieGenre } from "../movieApi";
import { FaAngleRight } from "react-icons/fa";
import Card from "./Card";
import Loading from "./Loading";
export default function FeaturedMovies() {
// State variables
const [movies, setMovies] = useSta... |
"""Recipe Class
This class represents a recipe with its ingredients and instructions.
"""
class Recipe:
"""
A recipe object containing its details and functionalities.
Args:
id (int): The unique identifier of the recipe.
name (str): The name of the recipe.
category (str): The cat... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<link rel="stylesheet" href="index.css">
<link href="https://cdn.jsdelivr.net/npm/boots... |
import PostModel, { IPost } from "@models/posts";
import { connectToDB } from "@utils/database";
import { Post } from "@utils/type";
async function gethandler(req: Request, { params }, res: Response) {
console.log(params.id);
await connectToDB();
const post = await PostModel.findById(params.id).populate("user");... |
require("dotenv").config();
require("express-async-errors");
// express
const express = require("express");
const app = express();
//rest of the packages
const morgan = require("morgan");
const cookieParser = require("cookie-parser");
const fileUpload = require("express-fileupload");
// Security packages
const rateL... |
import 'package:chat_appv2/screens/homescreen.dart';
import 'package:flutter/material.dart';
import 'package:chat_appv2/auth/createAccount.dart';
import 'package:chat_appv2/auth/methods.dart';
class LoginScreen extends StatefulWidget {
const LoginScreen({super.key});
@override
_LoginScreenState createState() =>... |
## DESCRIPTION
## Functions: Input and Output
## ENDDESCRIPTION
## KEYWORDS('functions','domain','range','input','output','interval notation')
## DBsubject('Precalculus')
## DBchapter('Functions')
## DBsection('Composite and Inverse Functions')
## Date('01/01/10')
## Author('Paul Pearson')
## Institution('Fort Lewis ... |
import 'package:flutter/material.dart';
import 'package:healthline/res/style.dart';
import 'package:healthline/screen/widgets/elevated_button_widget.dart';
import 'package:healthline/utils/translate.dart';
class PaymentMethodScreen extends StatefulWidget {
const PaymentMethodScreen({super.key, required this.callback... |
<?php
/*
* ReceiptBuilder.class.php -- receipt builder class
*
* Copyright 2011 World Three Technologies, Inc.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Founda... |
package me.khajiitos.jackseconomy.screen;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import me.khajiitos.jackseconomy.JacksEconomy;
import me.khajiitos.jackseconomy.curios.CuriosWallet;
import me.khajiitos.jackseconomy.init.Packets;
import me.khajiitos.jackseconomy.init... |
setwd("C:/Users/aleja/OneDrive/Escritorio/Alejandra/UCM/2023/Segundo Semestre/Tesis/Datos")
df <- read.csv("bin_5_2000Da_10000Da_talca_e_coli_v2.csv",sep = ",", header = TRUE)
# Verificar si hay presencia de valores nulos
any(is.na(df))
# Si muestra los valores, entonces no hay valores nulos
#na.fail(df)
#Solo para ... |
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <limits> // Inclusión necesaria para numeric_limits
using namespace std;
char palabras[30][12] = { "manzana", "pera", "naranja", "toronja", "fresa", "mango", "uva", "sandia", "mandarina",
"cereza", "frambu... |
export const HttpErrorCodes = {
404: "Not Found",
400: "Bad Request",
409: "Conflict",
} as const;
export interface HttpError extends Omit<Error, "name"> {
statusCode: keyof typeof HttpErrorCodes;
error: string;
}
const createHttpError = (statusCode: keyof typeof HttpErrorCodes, message: string): HttpError ... |
<template>
<div class="screen-adapter" :style="style">
<slot />
</div>
</template>
<script lang="ts" setup>
import {withDefaults, reactive, onMounted} from 'vue';
interface ScreenAdapterState{
width?: number
height?: number
}
/**
* s:{
* color: ‘’,
* width: '',
* height: ''
* }
* v-bind:params=... |
package quiz01;
import java.util.Scanner;
public class MethodQuiz02 {
public static void main(String[] args) {
//정수 2개를 받아서 합을 출력하는 문장
//1.반환도 없고 매개변수도 없는 메서드show()
/*
System.out.println("[두 수의 합을 구합니다]");
//2.반환은 있고, 매개변수는 없는 메서드 input() - 2번호출로
Scanner scan = new Scanner(System.in);
System.o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.