text stringlengths 184 4.48M |
|---|
use std::error::Error;
use std::fmt::{Display, Formatter};
use std::mem::size_of;
use std::rc::Rc;
//RC
fn takes_a_string(string: String) {
println!("{}", string);
}
fn takes_a_string_again(string: String) {
println!("{}", string);
}
fn takes_string() {
let s = "I am a string".to_string();
takes_a_st... |
#ifndef POLYNOMIAL
#define POLYNOMIAL
#include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::istream;
using std::ostream;
using std::string;
struct Item
{
double coef;
int exp;
//in order to inplement quick sort,
//-we need the double direction
Item* next... |
import { paramCase } from 'change-case';
import { Link as RouterLink } from 'react-router-dom';
// @mui
import { Box, Card, Link, Typography, Stack, IconButton, Button, Grid } from '@mui/material';
// routes
import { PATH_DASHBOARD } from '../../../../routes/paths';
// utils
import { fCurrency } from '../../../../utils... |
package THEiAirlineBeans;
import THEiAirlineEntity.PaymentRecord;
import THEiAirlineEntity.Trips;
import THEiAirlineEntity.Passenger;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import javax.persistence.EntityManag... |
{% extends 'layout.html' %}
{% block body %}
<h1>Order Starters - Table {{table_id}}</h1>
<hr>
<div id="Tablestarters">
<div class="row-fluid" id="main">
{% for starter in starters %}
{% if loop.index0 % 3 == 0 %}
<div class="row">
{% endif %}
<div class="col-sm-4">... |
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {AuthGuard} from '@shared/guards/auth.guard';
const routes: Routes = [
{
path: 'auth',
loadChildren: () => import('./pages/auth/auth.module').then(m => m.AuthModule)
},
{
path: '',
canActivate: [A... |
import { Command } from 'commander'
import inquirer from 'inquirer'
import { initConfig, addConfigOptions } from '../lib/config'
import * as gitCrypt from '../lib/git-crypt'
import { errors } from '../lib/errors'
/**
* Unlocks the repository.
*/
const command = new Command()
.name('unlock')
.description('Unlock... |
import React, { Component } from "react";
/* eslint no-eval: 0 */
import { Display } from "../components/miniComponents/Display/Display";
import { Title } from "../components/miniComponents/Titles/Title";
import { ContainerButtons } from "../components/medioComponents/ContainerButtons/ContainerButtons";
import "./Calc... |
<!Doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="css/detalle.css">
<link rel="stylesheet... |
## --- Day 19: Monster Messages ---
You land in an airport surrounded by dense forest. As you walk to your high-speed train, the Elves at the <span title="This is a purely fictional organization. Any resemblance to actual organizations, past or present, is purely coincidental.">Mythical Information Bureau</span> conta... |
import { useState } from 'react';
const initialFriends = [
{
id: 118836,
name: 'Clark',
image: 'https://i.pravatar.cc/48?u=118836',
balance: -7,
},
{
id: 933372,
name: 'Sarah',
image: 'https://i.pravatar.cc/48?u=933372',
balance: 20,
},
{
id: 499476,
name: 'Anthony',
... |
---
title: 'Introspecting Conduit v0.13'
dateString: 'June 21, 2022'
mainImageUrl: '/blogIcons/conduit_logo.png'
excerpt: 'Unlimited config power'
publisher: 'kon14'
publisherPosition: 'Backend Developer'
publisherIcon: 'https://avatars.githubusercontent.com/u/1786609?v=4'
tags: ['Updates', 'Development','Open source',... |
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
public class Codec {
static final String NULL_STRING = "null";
// Encodes a tree to a single string.
public String serialize(TreeNode ro... |
<p align="center">
<img src="https://miro.medium.com/v2/resize:fit:4800/format:webp/1*yYAypHYu_kEGbc-BreWzkw.png" alt="Firedancer Node Visual Guide">
</p>
# Firedancer Node Deployment Guide
**Firedancer is early stage software and should only be deployed on testnet / devnet now. Please do not deploy on mainnet yet.... |
package com.bupt.hospital.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;
import lombok.NoArgsCons... |
const AppError = require("./appError");
const httpStatus = require("http-status");
/**
* An error that occurred when executing a database
* query isn't successful.
*/
class DatabaseError extends AppError {
/**
* Constructor.
* @param {string | undefined} message Error message.
* @param {boolean} isFatal Indi... |
import sys
from typing import List, Optional
if sys.version_info >= (3, 8):
from typing import TypedDict
else:
from typing_extensions import TypedDict
from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
MaxResults = int
NextToken = str
PageSize = int
Qos = int
Retain = bo... |
<?php
namespace App\Http\Requests;
use App\Models\File;
use App\Models\User;
use Illuminate\Foundation\Http\FormRequest;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class AccessRightsRequest extends ApiFormRequest
{
/**
* Determine if the user is authorized to make this request.
*... |
import { TestBed } from '@angular/core/testing';
import { provideRouter, withComponentInputBinding } from '@angular/router';
import { RouterTestingHarness, RouterTestingModule } from '@angular/router/testing';
import { of } from 'rxjs';
import { LocalisationDetailComponent } from './localisation-detail.component';
de... |
import '../custom.css';
import { Link } from 'react-router-dom';
import React, { useState, useEffect } from 'react';
// import { useHistory } from 'react-router-dom';
const entry = {
id: "",
firstName: "",
lastName: "",
department: "",
className: "",
gender: "",
age: "",
graduated: ""
... |
/*
* Copyright 2015 Persinity Inc.
*
* 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 ... |
import React, { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import './paginaCadastro.css'
import {
Box,
Button,
FormControl,
IconButton,
InputAdornment,
InputLabel,
OutlinedInput,
TextField,
Typography,
} from '@mui/material'
import NewUserModal from './Modal'
import { Visib... |
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* readline();
char* ltrim(char*);
char* rtrim(char*);
int parse_int(char*);
/*
* Complete the 'timeInWords' functio... |
package ru.savrey;
import org.junit.jupiter.api.*;
import static org.junit.jupiter.api.Assertions.*;
import java.util.Calendar;
import java.util.Iterator;
import java.util.LinkedList;
import org.mockito.*;
import static org.mockito.Mockito.*;
public class MainTest {
public static void main(String[] args) {
... |
import React from "react";
import {
Box,
Typography,
List,
ListItem,
ListItemText,
FormControlLabel,
Checkbox,
} from "@mui/material";
import { formatDate } from "@fullcalendar/core";
const SidebarEvent = ({ event }) => (
<ListItem
sx={{
display: "flex",
flexDirection: "column",
a... |
import React, { useState } from 'react';
import ReactDOM from 'react-dom';
import TotoContext from './TotoContext';
import Child from './Child';
import Enfant from './Enfant';
import DumbElement1 from './DumbElement1';
import DumbElement2 from './DumbElement2';
import DumbElement3 from './DumbElement3';
import './style... |
import type { ICType } from '@kiltprotocol/sdk-js';
import AddBoxOutlinedIcon from '@mui/icons-material/AddBoxOutlined';
import { Box, Button, Paper, Stack, SvgIcon, Typography } from '@mui/material';
import React from 'react';
import { Link } from 'react-router-dom';
import { LogoCircleIcon } from '@credential/app-c... |
# using recursion:
def is_palindrome(s):
s = ''.join(char.lower() for char in s if char.isalnum())
if len(s) <= 1:
return True
if s[0].lower() == s[-1].lower():
return is_palindrome(s[1:-1])
return False
# however recursion method fails for too long string as it may exceed maximum recu... |
<!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>Document</title>
</head>
<body>
<a href="/ejercicios/">Go back</a>
<p><em>Abre la consola</em></p>
... |
import initialState from './initialState';
//Import Utils.
import { calculateTime } from '../../utils/functions';
const reducer = (state = initialState, action = {}) => {
switch (action.type) {
case "SET_NOTIFICATION_MESSAGE":
state = {
...state,
objNotificatio... |
// создайте класс User со свойствами name и age и методом sayHi который выводит в консоль фразу 'Привет'
// и создать экземпляр класса
// 1.
class User {
constructor(name, age) {
(this.name = name), (this.age = age);
}
sayHi() {
console.log(`Hello ${this.name} your age is ${this.age}`);
}
}
const use... |
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Clip</title>
<script src="https://cdn.t... |
import 'dart:convert';
import 'package:get/get.dart';
import 'package:get/get_connect/http/src/utils/utils.dart';
import 'package:http/http.dart' as http;
import 'package:musicapp/rout.dart';
import '../env.dart';
import '../models/persons.dart';
import '../models/tokenModel.dart';
class AuthBACKEND {
final String ... |
import { useEffect, useRef, useState } from 'react';
export const useLoopPolicyStatus = () => {
const time = useRef();
const [loopRequesting, setLoopRequesting] = useState(false);
useEffect(() => {
return () => {
clearTimeout(time.current);
setLoopRequesting(false);
};
}, []);
const che... |
```This is a run anywhere example. After this search is an example which has more comments explaining how it works.````
| makeresults
| eval foo=split("test,test2", ","), bar=split("27,33", ",")
| mvexpand foo
| mvexpand bar
| stats sum(bar) AS count BY foo
| append
[| makeresults
| eval foo="test4", co... |
import React from 'react'
import styled from '@emotion/styled'
const ContenedorFrase = styled.div`
padding: 2rem;
border-radius: 0.5rem;
background-color: white;
max-width: 800px;
@media (min-width: 992px) {
margin-top: 10rem;
}
h1{
font-family: Arial, Helvetica, sans-se... |
import { Link } from "react-router-dom";
import { useState, useEffect } from "react";
import { updateVote } from "../api";
import { fetchArticle } from "../api";
export default function ArticleCard({ article }) {
const [voteCountFromApi, setVoteCountFromApi] = useState();
const [isLoading, setIsLoading] = useState(... |
import NavBar from "@/components/NavBar";
import "../globals.css";
import type { Metadata } from "next";
import Footer from "@/components/Footer";
import { Toaster } from "react-hot-toast";
import StateProvider from "@/context/StateContext";
export const metadata: Metadata = {
title: "MBA Ecommerce",
description: "G... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Uebung 9</title>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.mi... |
import clsx from 'clsx'
import type { FC, ReactNode } from 'react'
import React from 'react'
type Props = {
children: ReactNode
className?: string
variant?: 'warning' | 'danger' | 'success'
}
const Alert: FC<Props> = ({ children, variant = 'warning', className }) => {
return (
<div
className={clsx('... |
<?php
namespace App\Http\Controllers;
use App\Models\Aviso;
use Illuminate\Http\Request;
class AvisoController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$this->middleware('admin');
}
/**
* Display a listing of the resource.
*/
public... |
/*
* Copyright Fluidware srl
*
* 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://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
import { useTranslation } from "react-i18next";
import HeadPage from "../../components/headPage/HeadPage";
import { useEffect, useState } from "react";
import apiAxios from "../../utils/apiAxios";
import Loader from "../../components/loader/Loader";
import { useParams } from "react-router-dom";
import { formateDate } f... |
#ifndef MANAGER_UTILS_TEXT_H_
#define MANAGER_UTILS_TEXT_H_
// System headers
#include <cstdint>
// Other libraries headers
#include "utils/drawing/Color.h"
// Own components headers
#include "manager_utils/drawing/Widget.h"
// Forward Declarations
class Text : public Widget {
public:
Text();
~Text() noexcept... |
<template>
<div class="field">
<div class="title">
<label :for="name" class="label">
{{ label }}
</label>
<div class="helper" @click="$emit('helper')">
{{ helper }}
</div>
</div>
<input class="input" :id="name"... |
import React, { useRef } from 'react';
import EpisodeComponent from './EpisodeComponent';
import { Episode } from './types';
import { useState } from 'react';
import { AiOutlineLeft, AiOutlineRight } from 'react-icons/ai';
interface Props {
title: string;
episodes: Episode[];
}
const EpisodeSection: React.FC<Prop... |
//
// ErrorView.swift
// Tournament
//
// Created by Øyvind Hauge on 26/04/2024.
//
import SwiftUI
struct ErrorView: View {
var error: Error
var action: (() -> Void)?
init(_ error: Error, action: (() -> Void)? = nil) {
self.error = error
self.action = action
}
var... |
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Requests\siswaRequest;
use App\Http\Requests\siswaUpdateRequest;
use App\Models\kelas;
use App\Models\siswa;
use App\Models\spp;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Fac... |
using PDDL, SymbolicPlanners
"""
ActionCommand
A sequence of one or more actions to be executed, with optional predicate
modifiers for action arguments.
"""
struct ActionCommand
"Actions to be executed."
actions::Vector{Term}
"Predicate modifiers for action arguments."
predicates::Vector{Term}
... |
# Enphase Envoy legacy support
[](https://github.com/hacs/integration#readme)
This is a HACS custom integration providing an Envoy Legacy HTML production data extension to the [Home Assistant Core Enphase Envoy integration](https://... |
import { useEffect, useState, memo } from "react";
import { ToastContainer, toast } from "react-toastify";
import 'react-toastify/dist/ReactToastify.css';
import './Card.css';
function Card({item, setCart, cart}) {
const [imageURL, setImageURL] = useState("");
const [disabled, setDisabled] = useState(false);
us... |
package com.jgeun.pokedex.core.network.api
import com.jgeun.pokedex.core.model.common.NetworkResult
import com.jgeun.pokedex.core.network.model.dto.PokemonInfoDto
import com.jgeun.pokedex.core.network.model.response.PokemonResponse
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
inter... |
import { createContext, useReducer } from "react";
import { CalculateNutritions } from "../meal-editor/utils/calculate-nutritions";
const stateStack = [];
const initialState = {
ingredientList: {},
nutritionList: {},
foodProperties: {
uniqueFoodID: "",
foodName: "",
foodWeight: 100,
foodUnit: "g... |
// lib/screens/home_screen.dart
import 'package:expense_tracker_provider/screens/add_expense_screen.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:expense_tracker_provider/providers/expense_provider.dart';
class HomeScreen extends StatelessWidget {
const Home... |
//
// NFTListViewController.swift
// DinzWeb3
//
// Created by Dino Bozic on 03.03.2024..
//
import Foundation
import UIKit
import Combine
class NFTListViewController: UIViewController {
var viewModel: NFTListViewModeling
//MARK: - Views
lazy var contentView: NFTListContentView = {
... |
import styles from "./Tasks.module.css";
import {
crosLight,
filterLightLogo,
plusLogo,
sortLightLogo,
} from "../../assets/index.js";
import Task from "./Task.jsx";
import NewTask from "./NewTask.jsx";
import { useEffect, useState } from "react";
import { TasksFilterCard } from "../UI/FunctionCard.jsx";
import... |
import Image from "next/image";
import { useTable, useExpanded, useSortBy } from "react-table";
export default function Table(props: any) {
const { id, data, columns, actions } = props;
const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } =
useTable({ columns, data }, useSortBy, useExpan... |
using CarControl.Models;
using MahApps.Metro.Controls;
using Npgsql;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
namespace CarControl.Windows
{
/// <summary>
/// Lógica interna para NovoRecebimentoWindow.xaml
/// </summar... |
import { render, fireEvent, waitFor } from '@testing-library/react';
import React from 'react';
import useFocusEvents from '../useFocusEvents';
describe('useFocusEvents', () => {
test('returns hasFocus as false when no element within the ref has focus', () => {
const TestHook: React.FC = () => {
const focu... |
import React from 'react';
import Header from './Header';
import './DonorNot.css';
import { Navigate } from 'react-router-dom';
import EtaSection from './EtaSection';
const DonorNot = () => {
const [notifications, setNotifications] = React.useState([
{
id: 1,
title: 'Pickup Request ... |
import {ToastrService} from "ngx-toastr";
import {Injectable} from "@angular/core";
import {IsMobileService} from "./is-mobile.service";
@Injectable({
providedIn: 'root'
})
export class NotifierService {
get positionClass() {
return this.isMobileService.isMobile ? 'toast-top-full-width' : 'toast-top-right';
... |
import pytest
import common
@pytest.mark.pgsql('maas', files=['subscriptions.sql'])
async def test_ok(taxi_maas, load_json, mockserver):
@mockserver.json_handler('/persuggest/internal/persuggest/v2/stops_nearby')
def _stops_nearby(request):
return mockserver.make_response(
json=load_json(... |
<?php
namespace App\DataFixtures;
use App\Entity\Article;
use App\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use Faker\Factory;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
class AppFixtures extends Fixture
{
public function __con... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HeroesComponent } from './heroes/heroes.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
// path is a st... |
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class pickup_throw : MonoBehaviour
{
// Gun Sounds here!
private AudioSource audioSource;
[SerializeField]
public AudioClip drop_weapon_sound;
[SerializeField]
public AudioClip pickup_wea... |
from dataclasses import field
from django import forms
from .models import Category, Post,Comment
class PostForm(forms.ModelForm):
status = forms.ChoiceField(choices=Post.OPTIONS)
category = forms.ModelChoiceField(queryset=Category.objects.all(),empty_label="Select")
class Meta :
model = Post
... |
<?php
class Usuario{
public $nombre;
public $clave;
public $email;
//Constructor
public function __construct($nombre, $clave, $email) {
$this->nombre = $nombre;
$this->clave = $clave;
$this->email = $email;
}
public static function guardarUsuarioCSV($usuario) {
... |
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or ... |
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
</head>
<body>
<div id="root">
<div>
<button @click="onClickText" class="btn">Hello world, Click me</button>
<span>{{ refData.myName }} - {{ msg }} - {{ info.msg2 }}</span>
<span>{{ info... |
//
// ErrorTestAlertView.swift
// Rawdah
//
// Created by Sapar Jumabekov on 07.06.2022.
//
import Foundation
import UIKit
import Stevia
// MARK: - Delegate
protocol ErrorTestAlertViewDelegate: AnyObject {
func closeTapped()
func restartTapped()
}
// MARK: - Main
class ErrorTestAlertView: UIView {
... |
#' Fits the nominal model
#'
#' Function estimates the parameters of LMA models where the category scale
#' are estimated. The function can be used to estimate the parameters of the
#' LMA model corresponding the nominal model (for multi-category items) and
#' the 2 parameter logistic model for dichotomous items. The f... |
<?php
namespace Srdorado\SiigoClient\Model\Client;
use Srdorado\SiigoClient\Exception\Rule\BadRequest;
use Srdorado\SiigoClient\Exception\Rule\UrlRuleRequestException;
use Srdorado\SiigoClient\Model\EntityInterface;
use Srdorado\SiigoClient\Model\Validator\CreditNoteValidator;
class ClientCreditNote extends Abstract... |
#include<iostream>
class bad_hmean
{
private:
double v1;
double v2;
public:
bad_hmean(double a = 0, double b = 0)
:v1(a), v2(b) {};
void mesg();
};
inline void bad_hmean::mesg()
{
std::cout << "hmean(" << v1 << "," << v2 << "): "
<< "invalid arguments:a=-b\n";
}
class bad_gmean
{
public:
double v1;
double v2... |
import React, {useState,useEffect,useMemo} from 'react';
// import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonInput, IonItem, IonLabel, IonList, IonItemDivider } from '@ionic/react';
import '../css/mainStyles.scss';
import LocalizeComponent from '../localize/LocalizeComponent';
import { useForm } from "... |
import {
Table,
Model,
Column,
DataType,
ForeignKey,
BelongsTo,
BeforeValidate,
} from "sequelize-typescript";
import { PredefinedMessageSchema } from "./PredefinedMessageSchema";
import { DropdownValueSchema } from "./DropdownValueSchema";
@Table({
timestamps: true,
tableName: "predefined_message_re... |
import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { CookieService } from 'ngx-cookie-service';
import { GooglePlaceDirective } from 'ngx-google-places-autocomplete';
import { Ad... |
/*
* 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 clases;
/**
*
* @author jquevedo3
*/
public class Fraccionario {
private int numerador;
private int denominador;
... |
<!DOCTYPE html>
<html>
<head>
<title>ToDo</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=M... |
import { PieceLetters } from "./Tetriminos";
import seedrandom from "seedrandom";
export class PieceGenerator {
private _shuffledPieces: string[] = [];
private _currentIndex: number = 0;
private rng;
constructor(seed: number) {
this.rng = seedrandom(seed.toString());
}
private shuffle... |
import { Route, Routes, useNavigate } from "react-router-dom";
import Home from "./components/Home";
import SignIn from "./components/SignIn";
import SignUp from "./components/Signup";
import ContactHistory from "./components/HistoryCard";
import { ToastContainer, toast } from "react-toastify";
import "react-toastify/d... |
<?php
namespace App\Http\Controllers;
use App\Models\Hotel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class HotelController extends Controller
{
public function index()
{
$hotels = Hotel::all();
return response()->json($hotels);
}
public function findById(... |
/// <reference types="react" />
import PropTypes from 'prop-types';
import { AnyObjectSchema } from 'yup';
import { FormProps } from './Form';
export interface NestedFormProps<TSchema extends AnyObjectSchema> extends Omit<FormProps<TSchema>, 'onError' | 'onChange' | 'value' | 'defaultValue' | 'defaultErrors'> {
nam... |
@extends('admin.layouts.app')
@section('panel')
<div class="row">
<div class="col-lg-12 col-md-12 mb-30">
<div class="card">
<div class="card-body p-0">
<div class="table-responsive--sm table-responsive">
<table class="table table--li... |
@extends('layout.template')
@section('content')
<div class="row" style="height:95%; padding:20px; background-image:url('public/images/secciones/login/loginimg.jpg'); background-size:cover;">
<div class="col-md-4">
<div class="container">
<div class="row justify-content-center">
<di... |
---
title: "PEP681 - Data Class Transformsって何のためにあるの?"
emoji: "🤔"
type: "tech" # tech: 技術記事 / idea: アイデア
topics: ["Python"]
published: true
---
この記事は[Mapbox Japan Advent Calendar 2022](https://qiita.com/advent-calendar/2022/mapbox-japan) 8日目の記事です。
## PEP681が追加された背景
[PEP681 - Data Class Transforms](https://peps.pyth... |
/* Blink Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include... |
import {Scene} from "phaser";
import {PlayerData} from "./type";
import {getHeroModelSet} from "../../assets/hero";
import {Player, IPlayer} from "./player";
export interface INonPlayableCharacter extends IPlayer {
Update: () => void;
GetPlayerData: () => PlayerData;
IsDestroyed: () => boolean;
}
export c... |
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { addFilter } from '@wordpress/hooks';
import {
InspectorControls,
withColors,
__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown, // eslint-disable-line
__experimentalUseGradient, // eslint-disable-line
__expe... |
---
title: "Key length determination in Polyalphabetic Ciphers"
date: 2023-11-24
draft: false
---
Polyalphabetic [ciphers](/ciphers) are considerably more difficult to break than
monoalphabetic ones.
Giovan Battista Bellaso devised an elegant implementation of a
polyalphabetic cipher based on the Tabula Recta that to... |
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD... |
import { CustomerDetails, CustomerQuery } from '@app/model/api.model';
import { CustomersApiService } from '@app/services/api/customers.api.service';
import { SearchRequest, SearchResponse } from '@app/model/common.model';
import { Injectable } from '@angular/core';
import { Subject, Observable } from 'rxjs';
import { ... |
/******************************************************************************\
empowerd - empowers the offline smart home
Copyright (C) 2019 - 2022 Max Maisel
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 ... |
import { useLazyQuery } from '@apollo/client';
import { isEqual } from 'lodash';
import React, { useCallback } from 'react';
import { ListRenderItemInfo } from 'react-native';
import { FlatList } from 'react-native-gesture-handler';
import Animated, { runOnJS, useAnimatedReaction, useDerivedValue } from 'react-native-r... |
import React from "react";
import Form from "./common/form";
import Datepicker from "./common/datepicker";
import axios from "axios";
import BaseJoi from "joi-browser";
import JoiDateExtensions from "joi-date-extensions";
import DatePicker, { registerLocale } from "react-datepicker";
import enGB from "date-fns/locale/e... |
//
// TransactUserBlockVM.swift
// Spasibka
//
// Created by Aleksandr Solovyev on 13.02.2023.
//
import StackNinja
final class TransactUserBlockVM<Design: DSP>: StackModel {
private lazy var userAvatar = WrappedY(ImageViewModel()
.image(Design.icon.newAvatar)
.contentMode(.scaleAspectFill)
.c... |
import { render, screen } from '@testing-library/vue'
import { vi } from 'vitest'
import { mockPostMyAddress } from './fetchers/mock'
import RegisterAddress from './RegisterAddress.vue'
import { clickSubmit, inputContactNumber, inputDeliveryAddress } from './testingUtils'
vi.mock('./fetchers')
async function fillVal... |
import React from "react";
import "./Auth.scss";
import Logo from "../../img/newlogo.png";
import { useState, useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { logIn } from "../../actions/AuthActions";
import { signUp } from "../../actions/AuthActions";
const Auth = () => {
c... |
<?php
namespace App\Http\Requests\PersonCompany;
use Illuminate\Foundation\Http\FormRequest;
class PersonCompanyAddRequest extends FormRequest
{
/**
* Prepare the data for validation.
*
* @return void
*/
protected function prepareForValidation()
{
$this->merge([
'... |
<template>
<el-form ref="form" :rules="rules" :model="form" label-width="120px" label-position="left">
<el-form-item label="用户名" prop="username">
<el-col :span="7">
<el-input v-model="form.username" />
</el-col>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-col :span... |
/**
1. 유저 프로파일 페이지
(1) 유저 프로파일 페이지 구독하기, 구독취소
(2) 구독자 정보 모달 보기
(3) 구독자 정보 모달에서 구독하기, 구독취소
(4) 유저 프로필 사진 변경
(5) 사용자 정보 메뉴 열기 닫기
(6) 사용자 정보(회원정보, 로그아웃, 닫기) 모달
(7) 사용자 프로파일 이미지 메뉴(사진업로드, 취소) 모달
(8) 구독자 정보 모달 닫기
*/
// (1) 유저 프로파일 페이지 구독하기, 구독취소
function toggleSubscribe(toUserId, obj) {
if ($(obj).text... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.