text stringlengths 184 4.48M |
|---|
<?php
namespace App\Http\Controllers;
use App\Http\Requests\AuthRequest;
use App\Services\Auth\AuthService;
use App\Services\User\UserService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Symfony\Component\HttpFoundation\Response as RESPONSE;
class AuthController extends AbstractApiControlle... |
// Copyright 2023 RisingWave Labs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
/*
* Author:
* Philip Van Hoof <pvanhoof@gnome.org>
*
* Copyright 1999, 2007 Philip Van Hoof
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is ... |
{% extends 'base.html' %}
{% load static %}
{% block extra_head %}
<link rel="stylesheet" type="text/css" href="{% static 'css/home.css' %}">
{% endblock extra_head %}
{% block title %}Profile{% endblock title %}
{% block content %}
<div class="profile-page">
<h2>Profile Details</h2>
<img src=... |
import { OrderStatusEnum, STATUS_CODES } from '../../constants.js';
import { OrderRepository, VendorRepository } from '../../database/index.js';
import ApiError from '../../utils/ApiErrors.js';
import ApiResponse from '../../utils/ApiResponse.js';
class VendorOrderController {
constructor() {
this.vendorDb = new... |
import { useEffect, useState } from 'react';
import {
getData,
rxjsState,
triggerRxjsSubject,
} from '@utility-app/utility-project';
import './style.css';
export default function Root(props) {
const [data, setData] = useState('');
const [rxjsData, setRxjsData] = useState<string[]>([]);
useEffect(() => {
... |
import Principal "mo:base/Principal";
import Text "mo:base/Text";
import Debug "mo:base/Debug";
//Contract for NFT
actor class NFT(name : Text, owner : Principal, content : [Nat8]) = this {
private let itemName = name;
private var nftOwner = owner;
private let imageBytes = content;
public query func ... |
import cv2
from cvzone.HandTrackingModule import HandDetector
from time import sleep
import cvzone
import pyautogui
import os
cap = cv2.VideoCapture(0)
cap.set(3, 1920)
cap.set(4, 1200)
detector = HandDetector(detectionCon=1)
keys = [["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"],
["A", "S", "D", "F", "G... |
# Exercício 5: Imagine que você tem a implementação de uma classe capaz
# renderizar imagens através de uma interface que utiliza o método draw.
# Porém, no momento ela só suporta formato PNG e você também precisa ser
# capaz de renderizar imagens em SVG. Altere o código sem modificar a classe
# SvgImage , para que iss... |
package greasepaint
import "github.com/LordOfTrident/ansi-go"
var (
Black = NewColor256(ansi.Black)
Red = NewColor256(ansi.Red)
Green = NewColor256(ansi.Green)
Yellow = NewColor256(ansi.Yellow)
Blue = NewColor256(ansi.Blue)
Magenta = NewColor256(ansi.Magenta)
Cyan = NewColor256(ansi.Cyan)
White... |
# selenium小进阶+案例
## 关于验证码
验证码处理:
1. 直接把浏览器里面的cookie拿出来直接用.
2. 手动编写验证码识别的功能(深度学习)
3. 第三方打码平台(收费), 超级鹰, 图鉴
上一节, 我们聊过关于验证码的问题. 本节继续.
图鉴-好东西http://www.ttshitu.com/

这个东西. 既便宜. 有好用. 比超级鹰爽.
注册个账号. 如果不想注册. 直接用我的也OK
然后就可以用了.
官方示例:
```python
import base... |
package pt.up.fe.comp2023.visitors;
import pt.up.fe.comp.jmm.analysis.table.Symbol;
import pt.up.fe.comp.jmm.ast.AJmmVisitor;
import pt.up.fe.comp.jmm.ast.JmmNode;
import pt.up.fe.comp2023.SymbolTable;
import pt.up.fe.comp2023.node.information.Method;
import pt.up.fe.comp2023.utils.ExpressionVisitorInformation;
import... |
//{ Driver Code Starts
import java.io.*;
import java.lang.*;
import java.util.*;
class Job {
int id, profit, deadline;
Job(int x, int y, int z){
this.id = x;
this.deadline = y;
this.profit = z;
}
}
class GfG {
public static void main(String[] args) throws IOException{
... |
"use client";
import React, { useEffect, useState } from "react";
import { useRouter } from "next/navigation";
import Navbar from "../../../components/nav/Navbar";
import {
fetchCourseData,
courseData,
fetchCourses,
fetchCourseVisualData,
} from "@/app/utils/CourseUtils";
import { Label } from "@/app/components... |
---
permalink: expansion/concept_configuring_node_management_lifs.html
sidebar: sidebar
keywords: controller, module, physical, install, power, configure, node-mangement, lif, configure node-management lifs
summary: "After the controller modules are physically installed, you can power on each one and configure its node... |
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { isPresent } from 'app/core/util/operators';
import { ApplicationConfigService } from 'app/core/config/application-config.service';
import { createRequestOption } from... |
%% We are going to analyze the test accuracy across classes here
%% 1) Load data
dataFolder = "../../../../../../../data/MedNIST";
% Go through every folder (label) and load all images
categs = dir(dataFolder);
% Initialize vars
N = 58954; % total number of images
XData = zeros(64, 64, 1, N); % height = width = 64,... |
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import MenuItem from "@mui/material/MenuItem";
import Select from "@mui/material/Select";
import TextField from "@mui/material/TextField";
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import { SearchType... |
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:shop_app/const/strings.dart';
import 'package:shop_app/logic/auth.dart';
import 'package:shop_app/logic/notifier.dart';
import 'package:shop_app/router.dart';
import 'package:firebase_core/firebase_core.dart';
import 'fireb... |
import { App, Modal, Plugin, Setting } from "obsidian";
import { Display } from "./display";
import { VendingMachine } from "./vendingMachine";
import { coinIds, coinLabels } from "./coins";
export default class VendingMachinePlugin extends Plugin {
async onload() {
this.addCommand({
id: "open-vending-machine",
... |
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_grocery_store_admin/view/photo_screen/photo_screen.dart';
import 'package:provider/provider.dart';
import '../../../controller/custom_page_indicator_controller.dart';
import '../../../model/product_mo... |
# Kotlin 扩展函数与带接收器的函数文字
> 原文:<https://dev.to/frevib/kotlin-extension-function-vs-function-literal-with-receiver-411d>
# Kotlin 扩展函数和带接收器的函数文字
在 Kotlin 中,可以向现有类添加一个方法(在 Kotlin 中称为成员函数)。这被称为*扩展函数*。
也有可能从函数文本内部的类中访问成员函数。这被称为带有接收者的*函数。*
# 扩展功能
假设您想要向`StringBuilder`类添加一个新的成员函数,例如`appendMonkey()`将字符串“monkey”附加到一个字符串中。因... |
# iam-security-cdk questions
IAM Policy Validation Script (CDK) This script utilizes the AWS CDK library to validate IAM roles and policies within your deployment for full access to DynamoDB. It helps prevent accidental deployments granting excessive permissions.
Requirements: Node.js and npm installed AWS CDK install... |
import { NavLink } from 'react-router-dom'
import client1 from '../../assets/client-1.jpg'
import client2 from '../../assets/client-2.jpg'
import client3 from '../../assets/client-3.jpg'
import { motion, useAnimation } from "framer-motion";
import { useEffect } from "react";
const CardServices = () => {
const scrol... |
package com.hotel.ratingservice.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.... |
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***************************... |
# Honey Haven
(Developer: Maksims Buraks)

[live web-page](https://honeyhaven-236ab8f8ceba.herokuapp.com/)
## Table of contents
- [Honey Haven](#honey-haven)
- [Table of contents](#table-of-contents)
- [Project Overview](#project-overview)
- [Business Model](#business... |
/*
SPACING SYSTEM (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
FONT SIZE SYSTEM (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
*/
/*
MAIN COLOR : #1f8686;; #165e5e;
TINTS: #e9f3f3;
GREY COLOR : #333 ;
BORDER RADIUS: 30px;
FONT WEIGHT:
Default: 400;
Medium: 500;
Semi-Bol... |
<!doctype html>
<html lang="ja" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragment::header(title=${title})">
<meta charset="UTF-8"/>
<title></title>
<link rel="icon" href="../static/app/img/favicon.ico"/>
<link href="../static/tether/css/tether.min.css" rel="stylesheet"/>
<link href=".... |
classdef arlas < handle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Class definition arlas
% For use with ARLas (Auditory Research Laboratory auditory software)
%
% Auditory Research Lab, The University of Iowa
% Deptartment of Communication Sciences & Disorders
% The University of Iow... |
<template>
<v-container class="fill-height">
<v-row justify="center" align="center">
<v-col cols="12">
<v-card>
<v-card-title class="headline"> Tweets </v-card-title>
</v-card>
</v-col>
<v-col cols="12">
<tweet-form :form-label="'New Tweet'" @new-tweet="addNewT... |
import { useEffect, useRef, useState } from 'react';
import { useDebounce } from '../hooks/useDebounce';
import { useListenKey } from '../hooks/useListenKey';
export function Navbar({ children }: { children?: React.ReactNode }) {
return (
<nav className="navbar">
<ul>
<Logo />
{children}
... |
import { Switch, Route, NavLink } from 'react-router-dom';
import GamesList from '../Games/GamesList';
import GamesID from '../Games/GamesID';
import HeaderCSS from './HeaderCSS';
function Header() {
const nameSite = 'React Games';
return (
<HeaderCSS>
<header>
<div className='MessageWelcome'>
... |
import React, { useReducer, createContext, useCallback, useMemo, useRef } from 'react';
import {
getPage,
getLastPageNum,
getProductURLs,
getProductInfo,
hasResult,
hasProhibitedIngredients,
downloadExcel,
} from '../../js/scrap';
import prohibitedIngredients from '../../js/ingredients';
import myReduce f... |
export function Users({ users, isColored, deleteOne, changeFilter }) {
return (
<table className="w-full">
<thead>
<tr>
<th className="text-center" colSpan={1}>
Image
</th>
<th className="text-center" colSpan={2}>
<button onClick={() => changeFil... |
<?php
/**
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* ... |
package com.epam.dmgolub.gym.controller.mvc;
import com.epam.dmgolub.gym.controller.ControllerUtilities;
import com.epam.dmgolub.gym.dto.mvc.TraineeTrainingsSearchRequestDTO;
import com.epam.dmgolub.gym.dto.mvc.TrainerTrainingsSearchRequestDTO;
import com.epam.dmgolub.gym.dto.mvc.TrainingRequestDTO;
import com.epam.dm... |
<mat-toolbar color="primary">
<mat-toolbar-row>
<span>Welcome to the page</span>
<span class="example-spacer"></span>
<button mat-raised-button color="warn" (click)="openDialog()">add user</button>
</mat-toolbar-row>
</mat-toolbar>
<div class="container">
<div style="margin-top: 15px;">
<mat... |
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\ArtikelResource\Pages;
use App\Filament\Resources\ArtikelResource\RelationManagers;
use App\Models\Artikel;
use Faker\Core\DateTime;
use Filament\Forms;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Select;
use Filament\Forms... |
import torch
import torch.nn.functional as F
def preprocess_tensor_for_kl(tensor):
# 将张量的所有值转换为绝对值
tensor_abs = torch.abs(tensor)
# 按列归一化张量,使每列的和为1
column_sums = tensor_abs.sum(dim=0, keepdim=True)
tensor_normalized = tensor_abs / column_sums
return tensor_normalized
def cosine_similarity_... |
import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
import React from "react";
import {
PROJECT_STATUS_CLASS_MAP,
PROJECT_STATUS_TEXT_MAP,
} from "@/constants.jsx";
import TasksTable from "../Task/TasksTable";
import Footer from "@/Components/Footer";
function Show({ auth, success, project, tasks, que... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Random Password Generator</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>Generate a <br/><span>Random Passwor... |
//
// Created by johannes on 11/12/21.
//
#ifndef PROJECT_MASS_ASSIGNEMENT_H
#define PROJECT_MASS_ASSIGNEMENT_H
#include "aweights.h"
#include "blitz/array.h"
#include "io_utils.h"
#include "transformations.h"
/*
* Return the nearest grid point for a single coordinate.
*
* @param coord coordinate.
* @param n_gri... |
# Dataset Factorization
This is the pytorch implementation of the following NeurIPS 2022 paper:
**[Dataset Distillation via Factorization](https://arxiv.org/abs/2210.16774)**
*Songhua Liu, Kai Wang, Xingyi Yang, Jingwen Ye, and Xinchao Wang.*
<img src="https://github.com/Huage001/DatasetFactorization/blob/main/teas... |
document.querySelector('.timestamp').innerText = (new Date()).toLocaleTimeString();
document.querySelector('.ajax-html').addEventListener('click', getHtmlAjax);
const XHR_STATE_DONE = 4;
const HTTP_STATUS_CODE = 200;
function getHtmlAjax () {
const xhr = new XMLHttpRequest();
xhr.onreadystatechange =... |
const ApiDirectory = artifacts.require("ApiDirectory");
const expect = require('chai').expect;
const utils = require("./helpers/utils");
const example = require("./helpers/api_examples");
const api1 = example.api_1;
const api2 = example.api_2;
const api3 = example.api_3;
contract("ApiDirectory", (accounts) => {
le... |
/*!
# 2023 Day 25: Snowverload
## Cutting connections
<https://adventofcode.com/2023/day/25>
This is another one that was trivial in Python (due to the `networkx` library),
and so applying the same solution in Rust using `rustworkx-core`.
```python
from pathlib import Path
import networkx as nx
def read(fn):
tx... |
import json
import re
import gradio as gr
import fitz, io, os
from PIL import Image
import dotenv
from langchain_community.chat_models.openai import ChatOpenAI
import openai
dotenv.load_dotenv()
from langchain.llms import OpenAI
from langchain.chains import LLMChain
from langchain.prompts import PromptTemplate
clas... |
#include "3-calc.h"
#include <stdlib.h>
#include <stdio.h>
/**
* main - Entry point
* Description: Performs simple operations (+, -, *, /, %) on two integers.
* Usage: calc num1 operator num2
* num1 and num2 are integers.
* operator is one of: +, -, *, /, %.
* Error cases:
* - If the number of arguments is wron... |
#ifndef ANIMATOR_H
#define ANIMATOR_H
#include "includes.h"
using steady_clock = std::chrono::steady_clock;
typedef std::chrono::time_point<steady_clock> time_point;
enum class AnimUpdate
{
Once,
Loop,
PingPong
};
struct AnimData
{
std::size_t index = 0;
bool played = false;
bool reverse = f... |
import 'package:cafejari_flutter/core/di.dart';
import 'package:cafejari_flutter/core/extension/null.dart';
import 'package:cafejari_flutter/ui/app_config/app_color.dart';
import 'package:cafejari_flutter/ui/components/back_button_app_bar.dart';
import 'package:cafejari_flutter/ui/state/global_state/global_state.dart';... |
import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormControl} from "@angular/forms";
import {CityApiService} from "../../../Core/Https/city-api.service";
import {TransferAPIService} from "../../../Core/Https/transfer-api.service";
import {MessageService} from "../../../Core/Services/message.service... |
import React, { useState,useEffect } from "react";
import { Container, Box, Typography, Divider } from "@mui/material";
import Button from "@mui/material/Button";
import Logo from "../assest/logo.png";
import { Link, animateScroll as scroll } from "react-scroll";
import "./Header.css"; // Import your custom CSS file
... |
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Security.Claims;
using web;
using web.Models;
[Route("api/[controller]")]
public class ClothesController : ControllerBase
{
private readonly ClothesConte... |
import React from 'react';
import AuthContext from '../contexts/AuthContext';
import useStorage from '../hooks/useStorage';
import links from '../utility/links';
export default function AuthProvider(props) {
const [token, setToken] = useStorage(localStorage, 'token');
const [profile, setProfile] = useStorage(local... |
import axios from 'axios';
import { Tool } from 'langchain/tools';
class BingAPI extends Tool {
name = 'bing';
description =
`a search engine. useful when you need to answer questions about current events and time related questions.` +
`input should be a search query. When arriving at the final or likely ... |
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:http/http.dart' as http;
import 'package:profile_finder/core/utils/color_constant.dart';
import 'package:profile_finder/core/utils/size_utils.dart';
import 'package:profile_finder/model_fina... |
// KILT Blockchain – https://botlabs.org
// Copyright (C) 2019-2023 BOTLabs GmbH
// The KILT Blockchain 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 License, or
// (at your option... |
// Copyright 2018-2023 Sophos Limited. All rights reserved.
#pragma once
#include "SulDownloader/suldownloaderdata/DownloadedProduct.h"
#include "SulDownloader/suldownloaderdata/IRepository.h"
#include <map>
#include <string>
#include <vector>
namespace SulDownloader
{
class ProductUninstaller
{
public:... |
import * as PIXI from 'pixi.js';
import { PixiMap } from './PixiMap';
import { PixiInternalLayer } from './PixiInternalLayer';
import { MapLayer } from './layers/MapLayer';
import { IPosition } from './MercatorMap';
import { Vector2 } from './Vector2';
import { ILatLong } from '@/cottno/lib/interfaces/ILatLong';
/**
... |
import React, { useState, useEffect } from "react"
import { Breadcrumb } from 'antd';
import { HomeOutlined } from '@ant-design/icons';
import { useLocation } from "react-router-dom";
export default function Bread() {
const [breadName, setbreadName] = useState()
const { pathname } = useLocation();
useEffe... |
import React, { useState } from "react";
interface FilterProps {
onFilterChange: (filters: {
name?: string;
status?: string;
species?: string;
type?: string;
gender?: string;
}) => void;
}
const Filter: React.FC<FilterProps> = ({ onFilterChange }) => {
const [name, setName] = useState("");
... |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php wp_title(); ?> <?php bloginfo( 'name' ); ?></title>
<!-- Framework CSS -->
<link rel="stylesheet" href="http://www.blueprintcss.org... |
import threading
import requests
# Использование неинициализированных данных
def use_uninitialized_data():
var = None # должно быть инициализировано
print(var + 1) # TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
# Утечки ресурсов
def resource_leak():
file = open('some_file.txt', 'w'... |
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close> X </button>
</mat-dialog-actions>
<div class="container">
<h2 mat-dialog-title align="center">Registration Form</h2> <br>
<mat-stepper [linear]="isLinear" #stepper>
<mat-step [stepControl]="Form1" label="Personal Details">
<fo... |
<template>
<o-modal
v-model:active="computedValue"
role="dialog"
:full-screen="fullScreen"
:aria-label="title"
aria-modal
auto-focus
trap-focus
:can-cancel="['escape', 'outside']"
@close="emit('close')"
>
<header class="modal-card-header">
<slot name="header">
<... |
// src/pages/Sedes.jsx
import React, { useState, useEffect } from 'react';
import axios from '../services/axiosConfig';
import SedesModal from '../components/SedesModal';
import ToggleSwitch from '../components/ToggleSwitch';
import Card from '../components/Card';
const Sedes = () => {
const [sedes, setSedes] = useS... |
import {Injectable} from '@angular/core';
import {Observable, of} from "rxjs";
import {HttpClient} from "@angular/common/http";
import {Country} from "../common/country";
import {map} from "rxjs/operators";
import {State} from "../common/state";
class GetResponseStates {
}
@Injectable({
providedIn: 'root'
})
expor... |
const express = require('express');
const cors = require('cors');
const app = express();
const mongoose = require('mongoose');
require('dotenv').config();
const register = require('./api/register');
const login = require('./api/login');
const productRouter = require('./api/products');
app.use(cors());
app.use(express.... |
import LogEntry from '../../../components/LogEntry/LogEntry'
import './user-logs.scss'
import LoadingSpinner from '../../../components/Loading/LoadingSpinner/LoadingSpinner'
import ErrorText from '../../../components/Error/ErrorText'
import {
useSectionsQuery,
useUserLogsQuery,
} from '../../../graphql/hooks/graphq... |
%FILE internal/type-05.html
%LASTMOD
%KEY pgsql-type05
%TITLE 日付/時刻表示形式とタイムゾーンの設定
%CHAPTER 日付/時刻表示形式の切り替え
<p>
SET datestyle文で日付/時刻表示形式を切替えます。書式は次のとおりです。
</p>
[<書式>]
<pre>
SET datestyle TO 'DATESTYLE[, DATESTYLE, ...]'
</pre>
<br>
<table><tr bgcolor="#cccccc">
<th>DATESTYLE</th> <th>説明 </th>
</t... |
/*
* GeoTools - The Open Source Java GIS Toolkit
* http://geotools.org
*
* (C) 2002-2008, Open Source Geospatial Foundation (OSGeo)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free ... |
% region Filename parsing.
% Provides macros manipulating strings of tokens.
\RequirePackage{xstring}
% Store the jobname as a string with category 11 characters.
\edef\normaljobname{\expandafter\scantokens\expandafter{\jobname\noexpand}}
\StrBetween{\normaljobname}{hw-}{-q}[\homeworknumber]
\StrBehind{\normaljobname}... |
package adapters
import (
"context"
"fmt"
"time"
"google.golang.org/grpc/codes"
"gitlab.cmpayments.local/creditcard/authorization/internal/entity"
"cloud.google.com/go/spanner"
infraSpanner "gitlab.cmpayments.local/creditcard/authorization/internal/infrastructure/spanner"
)
type reversalRepository struct {... |
package objs;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.math.FlxPoint;
import flixel.path.FlxPath;
import flixel.util.FlxDirectionFlags;
import flixel.util.FlxTimer;
import ui.TextPopup;
import ui.TextTrigger;
import util.Input;
/**
* ...
* @author aeveis
*/
enum ObjType
{
Light;
Krill;
Other;
... |
class Plato {
const baseCalorias = 100
const cocinero // necesario para el torneo
method cocinero() = cocinero
method cantidadAzucar()
// Punto de entrada punto 1
method cantidadCalorias() = 3 * self.cantidadAzucar() + baseCalorias
}
class Entrada inherits Plato {
method esBonito() = true
override metho... |
<template>
<div v-show="showFlag" class="food" transition="move" v-el:food>
<div class="food-content">
<div class="image-header">
<img v-bind:src="food.image">
<div class="icon-top" @click="hide">
<i class="icon-arrow_lift"></i>
</div>
</div>
... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
/*!
* \file MIsScalar.hpp Traits meta-class that helps to check if given
* type is a scalar type.
* \brief Traits meta-class: scalar type checking trait.
* \author Ivan Shynkarenka aka 4ekucT
* \version 1.0
* \date 13.12.2006
*/
/*
FILE DESCRIPTION: Traits meta-class: scalar type ch... |
package io.github.brenoepics.at4j.azure.lang;
import com.fasterxml.jackson.databind.node.ObjectNode;
/** Represents a language with its code, name, native name and direction. */
public class Language {
private String code;
private String name;
private String nativeName;
private LanguageDirection direction;
... |
import { SetStateAction, SyntheticEvent, useEffect, useState } from "react";
import { useFoodModalContext } from "./FoodModal";
import { Food } from "../../types/Food";
import { supabase } from "../../api/supabaseClient";
import { useAppDispatch } from "../../app/hooks";
import { addFood } from "../../features/data/dat... |
<script setup lang="ts">
import { TrashIcon, XMarkIcon } from "@heroicons/vue/24/outline";
import { vOnClickOutside } from "@vueuse/components";
import { onKeyStroke } from "@vueuse/core";
import { defineProps } from "vue";
import ButtonComponent from "../Button/ButtonComponent.vue";
import "./DeleteModal.scss";
const... |
# Update DNS server configuration on RHEL
## Add DNS A Records
To update the DNS server configuration on RHEL (Red Hat Enterprise Linux) and add new A records, you can follow these general steps:
1. Log in to your RHEL server with administrative privileges (such as the root user or a user with sudo access).
2. Deter... |
import clsx from "clsx";
import type { ButtonHTMLAttributes, DetailedHTMLProps, ReactNode } from "react";
import React, { forwardRef } from "react";
import { Loader } from "./Loader";
export type ButtonVariants = "primary" | "secondary" | "danger" | "material";
interface Props
extends DetailedHTMLProps<
Button... |
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* WC_Stripe_Customer class.
*
* Represents a Stripe Customer.
*/
class WC_Stripe_Customer {
/**
* Stripe customer ID
* @var string
*/
private $id = '';
/**
* WP User ID
* @var integer
*/
private $user_id = 0;
/**
* Data from API
* @var arra... |
import { fireEvent, render, screen } from "@testing-library/react";
import { App } from "./App";
const getButtonElementByText = (text: string) =>
screen.getByRole("button", { name: text });
describe("5種類の商品購入ボタン", () => {
describe("コーヒー 480 円 のボタン", () => {
it("ボタンが表示される", () => {
render(<App />);
... |
#ifndef TACHYON_BASE_BUFFER_VECTOR_BUFFER_H_
#define TACHYON_BASE_BUFFER_VECTOR_BUFFER_H_
#include <utility>
#include <vector>
#include "tachyon/base/buffer/buffer.h"
namespace tachyon::base {
template <typename T>
class VectorBuffer : public Buffer {
public:
static_assert(sizeof(T) == 1);
VectorBuffer() = de... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Tymon\JWTAuth\... |
import numbers
from copy import deepcopy
import numpy as np
import qutip as qt
from qutip.cy.spconvert import arr_coo2fast, cy_index_permute
from qutip.permute import _permute # To support the _permute2 function
class NQobj(qt.Qobj):
"""
The NQobj (Named Qobj) class is an extension of the QuTip's Qobj class... |
# encoding: utf-8
# Copyright (c) 2012-2014, Jungwacht Blauring Schweiz. This file is part of
# hitobito and licensed under the Affero General Public License version 3
# or later. See the COPYING file at the top-level directory or at
# https://github.com/hitobito/hitobito.
class ApplicationController < ActionCont... |
import { NotAllowedError } from "@/core/errors/not-allowed-error";
import { EditUserUseCase } from "@/domain/account/application/use-cases/edit-user";
import { CurrentUser } from "@/infra/auth/current-user-decorator";
import { UserPayload } from "@/infra/auth/jwt.strategy";
import {
BadRequestException,
Body,
Con... |
/**
* pauli_osg.h
*
* @copyright Copyright (c) 2023 Austrian Academy of Sciences
* @author Andrew J. P. Garner
*/
#pragma once
#include "dictionary/operator_sequence_generator.h"
#include "scenarios/pauli/indices/nearest_neighbour_index.h"
namespace Moment::Pauli {
class PauliContext;
/**
* Genera... |
<?php
namespace App\Controller;
use App\Entity\CartaAutorizacionInventario;
use App\Entity\Inventario;
use App\Entity\OrdenInventario;
use App\Form\InventarioType;
use App\Repository\InventarioRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonRespon... |
import { useEffect, useState } from 'react'
import { type AppState, appStateSchema } from '~/types/AppState'
export const useAppState = (): [AppState, (newAppState: AppState) => void] => {
const [appState, setAppState] = useState<AppState>({
reactChallenge: {
completedLowBlocks: [],
},
})
useEffec... |
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity=... |
pragma solidity ^0.4.11;
contract smartVoting {
// maps candidates (bytes32) with number of votes recived (uint8)
mapping (bytes32 => uint8) public votesReceived;
// a separate array of candidate names, since Solidity lacks a .keys method
bytes32[] public candidateList;
// constructor function
function smartVo... |
import { Site } from '../entries/Site'
import { Timestamp } from 'firebase/firestore'
describe('Site', () => {
it('Supports base fields', () => {
const site = new Site({
name: 'fwafawfa',
description: 'faefaefa bdbmper odcöoabuw',
lovesCount: 24,
})
expect(site.name).toBe('fwafawfa')
... |
import React from "react";
export interface PreSaveDataValue {
dataElementId: string;
optionComboId: string;
fieldId: string;
feedbackId: string | undefined;
oldValue: string;
}
export interface DataValue {
dataElementId: string;
categoryOptionComboId: string;
value: string;
}
interfa... |
import { Rarity } from "../../../shared/port/rarity";
import { CharacterClass } from "./character-class";
import { Skill } from "./skill";
import { Stat } from "./stat";
interface ICharacterProps {
id: number;
class: CharacterClass;
mutation: number;
rarity: Rarity;
image: string;
name: string;
skills: S... |
# OpenSearch
Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.29.0"><span class="tc-version">:material-tag: v0.29.0</span></a>
## Introduction
The Testcontainers module for OpenSearch.
## Adding this module to your project dependencies
Please run the following co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.