text stringlengths 184 4.48M |
|---|
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using NBomber.Contracts;
using NBomber.CSharp;
using NUnit.Framework;
using RedisBloom.Extensions;
namespace RedisBloom.LoadTests
{
[TestFixture]
public class BloomFilterScenarios : BaseTest
{
private static IStep CheckExistence... |
use defguard::{
auth::failed_login::FailedLoginMap,
config::{Command, DefGuardConfig},
db::{init_db, AppEvent, GatewayEvent, Settings, User},
grpc::{run_grpc_server, GatewayMap, WorkerState},
init_dev_env, init_vpn_location, logging,
mail::{run_mail_handler, Mail},
run_web_server,
wiregu... |
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
//nft
contract Hero is Ownable, ERC721Burnable {... |
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace Rilisoft
{
public class StateMachine<T> : MonoBehaviour
{
public abstract class State<T>
{
protected StateMachine<T> Ctx;
public T StateId { get; private set; }
public State(T stateId, StateMachine<T> conte... |
package br.com.transporte.appGhn.tasks.motorista;
import android.os.Handler;
import androidx.annotation.NonNull;
import java.util.concurrent.Executor;
import br.com.transporte.appGhn.database.dao.RoomMotoristaDao;
import br.com.transporte.appGhn.model.Motorista;
public class AtualizaMotoristaTask {
private fin... |
<?php
class RequestsTest_IDNAEncoder extends PHPUnit_Framework_TestCase {
public static function specExamples() {
return array(
array(
"\xe4\xbb\x96\xe4\xbb\xac\xe4\xb8\xba\xe4\xbb\x80\xe4\xb9\x88\xe4\xb8\x8d\xe8\xaf\xb4\xe4\xb8\xad\xe6\x96\x87",
"xn--ihqwcrb4cv8a8dqg056pqjye"
),
array(
"\x33\x... |
import * as React from "react";
import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
import { BurgerMenuIconButton } from "./iconbuttons";
import { useAppDispatch } from "store/hooks";
import { ll84QueryActions } from "store/ll84queryslice";
import { buildingInputActions } from "store/... |
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* 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
* Software Foundation; either version 2.1 of the License, or (at your option)
* any la... |
import asyncio
import logging
import sys
import msgpack
from typing import Callable, Any, Dict, List, Optional, Deque
from logging import Logger
from threading import Thread
from collections import deque
import nonebot
from nonebot import _driver as driver
from nonebot.log import default_filter, logger
from nonebot.ut... |
import React, { FC } from "react";
import classNames from "classnames";
import { FancyButtonAsyncTask } from "../../Fancy/Button/FancyButtonAsyncTask";
import { useClipboardWriteText } from "../../../hooks/useClipboardWriteText";
import "./ModalShareCopyButton.css";
export const ModalShareCopyButton: FC<{
text: st... |
import React, { useState } from "react";
import styles from "./css/common.module.css";
import sqlData from "../utils/json/sqlData.json";
import { Light as SyntaxHighlighter } from "react-syntax-highlighter";
import { atomOneDark } from "react-syntax-highlighter/dist/esm/styles/hljs";
import { BackButton } from "../comp... |
package com.example.repository.adapter.impl;
import com.example.events.ErrorEvent;
import com.example.events.MessageEvent;
import com.example.model.Student;
import com.example.repository.adapter.StudentRepositoryAdapter;
import com.example.repository.jpa.StudentRepository;
import lombok.RequiredArgsConstructor;
import... |
import {
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import { useCart } from '@/context/cartContext';
import { formatToBRL } from '@/utils/formatToBRL';
import Image from 'next/image';
import { useState } from 'react';
import {
CheckoutButton,
FooterContent,
Im... |
package main
import (
"flag"
"fmt"
"os"
"os/signal"
"syscall"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
)
func main() {
// 解析命令行参数,包括kubeconfig路径和Ingress命名空间
kubeconfig := flag.String("kubeconfig", "", "Path to a kubeconfig file")
namespace := flag.String("namesp... |
import { Injectable } from '@angular/core';
import { ApiService } from './api.service';
@Injectable()
export class AuthService {
constructor(
private apiService: ApiService
) { }
public static STUDENT = 0;
public static RECRUITER = 1;
public static PRIMARY_RECRUITER = 2;
public static A... |
import flask
import flask_login
import os
from flask import Flask, flash, render_template, current_app, request, redirect, session
from flask_mail import Mail, Message
from werkzeug.utils import secure_filename
import google_calendar_reader as cal
import database_library as db
import random
app = flask.Flask(__name__)... |
package crypto
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGeneratePrivateKey(t *testing.T) {
privKey := GeneratePrivateKey()
assert.Equal(t, len(privKey.Bytes()), privKeyLen)
pubKey := privKey.Public()
assert.Equal(t, len(pubKey.Bytes()), pubKeyLen)
}
func TestPrivateKeySign(t ... |
// Copyright 2022, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Author:
// 2022 - Johannes Kalmbach <kalmbach@cs.uni-freiburg.de>
#ifndef QLEVER_TRANSPARENTFUNCTORS_H
#define QLEVER_TRANSPARENTFUNCTORS_H
#include <util/Forward.h>
#include <util/TypeTraits.h>
#include <utility>
/// ... |
<?php
if (!file_exists("events/index.json")) {
return;
}
// Read json file with events
$str = file_get_contents("events/index.json");
// Convert json into array
$events = json_decode($str, true);
// Sort events DESC
uasort($events, function ($event1, $event2) {
return strtotime($event1["date"]) - strtotime(... |
import { theme } from '@/constants/themes'
import Author from '@/models/Author'
import { Ionicons } from '@expo/vector-icons'
import {
BottomSheetBackgroundProps,
BottomSheetModal,
BottomSheetView,
} from '@gorhom/bottom-sheet'
import { Text, View, useSx } from 'dripsy'
import { useCallback, useMemo, useRef } fro... |
<?php
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use App\Models\Role;
class User extends Authenticatable
{
use HasFactory, Notifiable;
... |
import 'package:flutter/material.dart';
class GradientContainer extends StatelessWidget {
final Widget child;
final List<Color> colors;
GradientContainer({required this.child, required this.colors});
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
... |
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useEffect, useState } from "react";
import { fetchData, optionsExercise } from "../api/FetchData";
import { Box, Pagination, Stack, Typography } from "@mui/material";
import { ExerciseCard } from "./ExerciseCard";
export function Exercises({ setExercises... |
<?php
use App\Events\MessagePosted;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceP... |
# Mодуль InstanceCounter, содержащий методы класса и инстанс-методы, которые подключаются автоматически при вызове include
module InstanceCounter
def self.included(base)
base.extend ClassMethods
base.include InstanceMethods
end
attr_reader :instances
module ClassMethods
# Метод класса, который в... |
import torch
from torch import nn
from torchvision import transforms as T
from PIL import Image
import numpy as np
from pathlib import Path
import random, datetime, os
import gym
from gym.spaces import Box
from gym.wrappers import FrameStack
from nes_py.wrappers import JoypadSpace
import gym_super_mario_bros
from tenso... |
import { reactive, toRefs } from "vue"
import { upload, fileList } from './interface/upload'
import { uploadFile } from '@/apis/common'
import { $$t } from '@/plugins/language/setupI18n';
import {
UploadProps,
UploadChangeParam,
message,
UploadFile
} from 'ant-design-vue'
export const useUpload = ({
... |
import React from "react";
import DiagnosisListItem from "./DiagnosisListItem";
interface DiagnosisListProps {
diagnosisCodes: string[] | undefined,
}
const DiagnosisList = ({ diagnosisCodes }: DiagnosisListProps): JSX.Element => {
let diagnoses = <div style={{fontStyle: "italic", color: "gray"}}>No diagnoses.</... |
import { lazy, Suspense } from 'solid-js'
import { Router, Routes, Route } from 'solid-app-router'
import AppHeader from './AppHeader'
import AppFooter from './AppFooter'
import '@/styles/app.css'
const Airports = lazy(() => import('@/modules/airports/components/Airports'))
const Bookings = lazy(() => import('@/mod... |
import { Handler, HandlerResponse } from "@netlify/functions"
import {
ApiAuthenticatedHandler,
AuthenticatedHandlerContext,
} from "@heist/common/contracts"
const makeResponse = (statusCode: number, body: unknown): HandlerResponse => {
const result: HandlerResponse = {
statusCode,
}
if (body) result.bod... |
import numpy as np
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
from sklearn.metrics import accuracy_score
# ÖNEMLİ
# Debug modu: True ise işlemler çıktı ekranına yazdırılır, False ise yazdırılmaz ***
DEBUG_MODE = True
# Sigmoid aktivasyon fonksiyonu
def sigmoid(x):
return ... |
const express = require('express');
const router = express.Router();
const multer = require("multer");
const upload = multer({
storage: multer.memoryStorage(), // or use multer.diskStorage() for disk storage
limits: {
fileSize: 5 * 1024 * 1024, // Adjust the file size limit as needed
},
});
const clou... |
import { h, createApp } from 'vue'
import singleSpaVue from 'single-spa-vue'
import App from './App.vue'
import router from './router'
const vueLifeCycles = singleSpaVue({
createApp,
appOptions: {
el: '#vue-app-root',
render(props: Record<PropertyKey, any> = {}) {
return h(App, {
...props,
... |
var PLAY = 1;
var END = 0;
var gameState = PLAY;
var trex, trex_running, trex_collided;
var ground, invisibleGround, groundImage;
var cloudsGroup, cloudImage;
var obstaclesGroup, obstacle1, obstacle2, obstacle3, obstacle4, obstacle5, obstacle6;
var score=0;
var gameOver, restart;
localStorage["HighestScore"] = 0;
... |
package baananou.taskmanager.restController;
import baananou.taskmanager.models.Task;
import baananou.taskmanager.services.ICategoryService;
import baananou.taskmanager.services.ITaskService;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import ja... |
import { HttpStatus } from "@nestjs/common";
import { CE_ErrorCode } from "@/common/error-code";
import { AppHttpException } from "@/common/exception";
export class NoSuchProblemException extends AppHttpException {
constructor(msg?: string) {
super(HttpStatus.NOT_FOUND, CE_ErrorCode.Problem_NoSuchProblem,... |
import type { ComponentType, PropsWithChildren, ComponentProps } from 'react'
import type { CmsComponent, ContentLinkWithLocale, ComponentFactory, ContentQueryProps, ContentType } from '@remkoj/optimizely-dxp-react'
import { print } from 'graphql'
import { createClient, Utils } from '@remkoj/optimizely-dxp-react'
impor... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('categories',... |
import 'package:meta/meta.dart';
import '../extensions/data_class_extensions.dart';
import '../tdapi.dart';
/// A document message (general file)
@immutable
class MessageDocument extends MessageContent {
const MessageDocument({
required this.document,
required this.caption,
});
/// [document] The docume... |
import styled from 'styled-components';
import { Navigate, Route, Routes } from 'react-router-dom';
import { ChatMain } from './features/chat/ChatMain';
import { CssBaseline } from '@mui/material';
import { ChatDetailsMain } from './features/chat/ChatDetailsMain';
import { AuthGuard } from './shared/AuthGuard';
import... |
import React from "react";
import { FaRegAddressCard } from "react-icons/fa";
import { Link } from "react-router-dom";
import { SlPicture } from "react-icons/sl";
import { AiOutlineHome } from "react-icons/ai";
import { useGlobalContext } from "../context";
import axios from "axios";
import { useState, useEffect } from... |
import NextAuth, { NextAuthOptions } from 'next-auth';
import { PrismaAdapter } from '@auth/prisma-adapter';
import { type Adapter } from 'next-auth/adapters';
import CredentialsProvider from 'next-auth/providers/credentials';
import GithubProvider from 'next-auth/providers/github';
import prisma from '@/lib/prisma';... |
Massachusetts Institute of Technology
6.042J/18.062J, Fall ’05: Mathematics for Computer Science
Prof. Albert R. Meyer and Prof. Ronitt Rubinfeld
December 2
revised December 2, 2005, 1086 minutes
Problem Set 10
Due: December 9
Reading: Lecture notes for weeks 13 and 14.
Problem 1. MIT students sometimes ... |
import datetime
import evaluate
import json
from datasets import Dataset, DatasetDict
from transformers import GPT2Tokenizer, GPT2LMHeadModel, TrainingArguments, Trainer
"""
This script uses the Hugging Face Trainer API to
train the DialoGPT model on the combined CareerBud dataset.
"""
# Load the JSON dataset
with op... |
# example 2.1 of section 2.2.1
# (example 2.1 of section 2.2.1) : Starting with R and data : Working with data from files : Working with well-structured data from files or URLs
# Title: Reading the UCI car data
uciCar <- read.table( # Note: 1
'car.data.csv', # Note: 2
sep =... |
create table products (
id serial primary key,
name varchar(50),
producer varchar(50),
count integer default 0,
price integer
);
create table history_of_price (
id serial primary key,
name varchar(50),
price integer,
date timestamp
);
create or replace function nalog_after()
r... |
% splits section with PJVS signal into particular segments. Removes data before
% MRs and after MRe. Calculates mean and std for segments, removes PRs and PRe
function [s_y, s_mean, s_std, s_uA] = pjvs_split_segments(y, Spjvs, MRs, MRe, PRs, PRe, dbg)
% Remove points masked by MRs and MRe
y = y(MRs + 1 : end ... |
// This program shows that an array is not a pointers
// But it decays to a pointer to the first element of the
// array by the compiler
#include <stdio.h>
int main (void) {
int array[4] = {0};
// Loop through the array and print out the address of
// each of the elements of the array
int i = 0... |
import React, { useState, useEffect, useContext, useReducer, useCallback } from 'react';
import ThemeContext from './ThemeContext';
const counterReducer = (state, action) => {
switch (action.type) {
case 'INCREMENT':
return { count: state.count + 1 };
case 'DECREMENT':
return { count: state.count... |
import axios from "axios";
import React, { useState } from "react";
import { Button, Col, Form, Row } from "react-bootstrap";
import validation from "./actions/validation";
const DeliveryForm = ({ products }) => {
const [nameValidation, setNameValidation] = useState({
valid: false,
text: null,
});
const ... |
import React from 'react';
import { View } from 'react-native';
import { categories } from '../../utils/categories';
import {
Container,
Title,
Amount,
Footer,
Category,
CategoryName,
Date,
Icon
} from './styles';
interface Category {
name: string;
icon: string;
}
export interface TransactionCar... |
import React, {
useCallback,
useContext,
createContext,
useReducer,
useMemo,
} from 'react';
import auth, { FirebaseAuthTypes } from '@react-native-firebase/auth';
import firestore from '@react-native-firebase/firestore';
import {
GoogleSignin,
statusCodes,
User as GoogleUserInfo,
} from '@react-native-... |
#ifndef ACTOR_H_
#define ACTOR_H_
#include "GraphObject.h"
#include "StudentWorld.h"
// Abstract Actor class
class Actor: public GraphObject {
public:
// Constructor
Actor(StudentWorld* game, int imageID, int startX, int startY, Direction dir, int depth = 0)
: GraphObject(imageID, startX, startY, dir, dept... |
//
// ElementsSizeFilter.swift
// Mindbox
//
// Created by vailence on 07.09.2023.
// Copyright © 2023 Mindbox. All rights reserved.
//
import Foundation
import MindboxLogger
protocol ElementsSizeFilterProtocol {
func filter(_ size: ContentElementSizeDTO?) throws -> ContentElementSize
}
final class ElementSi... |
const uuid = require('uuid')
const fs = require('fs')
const path = require('path')
class Course {
constructor(title, price, image) {
this.title = title
this.price = price
this.image = image
this.id = uuid.v4()
}
toJSON() {
return {
title: this.title,
price: this.price,
image: this.image,
id:... |
package com.example.demo.utils.aspect.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Base annotation for logging with AOP
* This annotation should be used only when ALL the informatio... |
## ChromeDriverBase Class
ChromeDriverBase is a base class that provides a convenient way to create a Chrome web driver instance using the Selenium library. This class can be used as a parent class for implementing custom web driver classes that perform specific tasks on web pages. The class uses the Chrome browser to... |
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="... |
From 05960109c00f8f7e62ef9120d0abf97083a63595 Mon Sep 17 00:00:00 2001
From: Jianing Ren <jianing.ren@rock-chips.com>
Date: Fri, 5 Jun 2020 15:08:28 +0800
Subject: [PATCH] phy: phy-rockchip-naneng-usb2: add vup_gpio for swing
calibration
The USB2.0 OTG PHY of RV1126/1109 which is designed for lower power
consumption ... |
/* eslint-disable no-console */
'use strict'
const https = require('https')
const fs = require('fs')
const crypto_ = require('crypto')
const jsdom = require('jsdom')
const sharp = require('sharp')
const request = require('request')
const { JSDOM } = jsdom
const shasum = crypto_.createHash('sha1')
const url = process.a... |
import { useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Formik, Form, ErrorMessage } from 'formik';
import { useTranslation } from 'react-i18next';
import { toast } from 'react-toastify';
import { apiUpdateUserSettings } from '../../redux/authorization/authReducer';
impor... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strmapi.c :+: :+: :+: ... |
package org.colos.roboticsLabs.robots.utils.trajectories;
/**
* @author Almudena Ruiz
*/
public class Spline2Trajectory extends Trajectory {
protected double[] mQInt1, mQInt2;
protected double mtInt1, mtInt2;
private double[][] mVqi, mCoef1, mCoef2, mCoef3;
public Spline2Trajectory(double[] qi, double[] qInt1... |
import { Hero } from '../hero';
import { FormsModule } from '@angular/forms';
import { HeroService } from '../hero.service';
import { ActivatedRoute } from '@angular/router';
import { CommonModule, Location } from '@angular/common';
import { Component, Input, inject } from '@angular/core';
@Component({
selector: 'ap... |
package com.rustedbrain.diploma.travelvisualizer.task.place;
import android.os.AsyncTask;
import android.util.Log;
import com.rustedbrain.diploma.travelvisualizer.LoginActivity;
import com.rustedbrain.diploma.travelvisualizer.MainActivity;
import com.rustedbrain.diploma.travelvisualizer.TravelAppUtils;
import com.rus... |
import type TelegramBot from "node-telegram-bot-api";
import type { ChatId } from "node-telegram-bot-api";
import type { Products } from "../Products";
import type { IUserState } from "../interfaces/IUserState";
import { States } from "../States";
import { setUserState } from "../features/setUserState";
import { Texts,... |
/**
* Object Node Class
*
* This Class implements a JSON Object node which contains named Json nodes
* in a non-order-dependent manner. This is equivalent to a map-type
* representation.
*
* Author: Jeffrey R. Naujok
* Created: 4/15/2019
* Log:
* $LOG$
*
* Copyright (C) 2019, The Irene Adler Software Gro... |
/* C++ program to compare swap function of two numbers by comparing
pass by pointer vs pass by reference vs pass by value */
#include <iostream>
using namespace std;
// Function to swap two numbers using
// pass by pointer.
void swapp(int* x, int* y)
{
int z = *x;
*x = *y;
*y = z;
}
// Function to swap two... |
/*
* astyle --force-indent=tab=4 --brackets=linux --indent-switches
* --pad=oper --one-line=keep-blocks --unpad=paren
*
* Miranda NG: the free IM client for Microsoft* Windows*
*
* Copyright (c) 2000-09 Miranda ICQ/IM project,
* all portions of this codebase are copyrighted to the people
* listed in contrib... |
const { ActivityType, Events } = require('discord.js');
const CLIENT_ACTIVITY = ActivityType.Playing;
module.exports = {
name: Events.ClientReady,
once: true,
nickname: 'Client Presence',
/**
* @param {Client} client
*/
async execute(client) {
// Start function
const repeatingFunction = async () => {
... |
#include <coretypes/json_deserializer_impl.h>
#include <coretypes/coretypes.h>
#include <coretypes/json_serialized_object.h>
#include <coretypes/json_serialized_list.h>
#include <coretypes/updatable.h>
#include <coretypes/ctutils.h>
#include <rapidjson/document.h>
#include <memory>
BEGIN_NAMESPACE_OPENDAQ
// static
E... |
---
title: "Introduction to R"
author: "Julien Brun"
date: "June, 2016"
output:
html_document
---
*Attribution*: this tutorial is an adaptation of the material prepared by Karthik Ram for NCEAS [summer school 2013]
# Condition
## if .. else statement
```{r if else, eval = FALSE}
# Structure
if (cond1=true) {
... |
#ifndef SENSOR_MODULE_H_
#define SENSOR_MODULE_H_
#include <Arduino.h>
#include <Wire.h>
#define BOARD_MODULE_DEBUG
class SensorModule; // forward declaration for the update function
/**
* Update function that is triggered when a sensor state has changed.
*/
typedef void (*SensorUpdatedFunction)();
/**
* Repres... |
package com.podProject.model;
import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
@Entity
@Data
@Component
@NoArgsConstructor
public class ComputerCase {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long caseId... |
<%@page import="java.util.ArrayList"%>
<%@page import="entity.Item"%>
<%@page import="entity.Cart"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-wi... |
import { ServerError } from '@/application/errors'
import { adaptMulter } from '@/main/adapters'
import { NextFunction, Request, RequestHandler, Response } from 'express'
import { getMockReq, getMockRes } from '@jest-mock/express'
import multer from 'multer'
jest.mock('multer')
describe('adaptMulter', () => {
let ... |
package com.IvanChikanov.BloxCons.Controllers;
import com.IvanChikanov.BloxCons.Other.JsType;
import com.IvanChikanov.BloxCons.Services.ModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.spring... |
//
// DoorClass.swift
// StealthProject
//
// Created by Antonio Romano on 13/05/22.
//
import Foundation
import SpriteKit
class Door: SKSpriteNode{
private var isOpen: Bool = false
private var closedTexture: SKTexture = SKTexture()
private var openTexture: SKTexture = SKTexture()
private... |
use reqwest::Url;
use serde::Deserialize;
use crate::engines::{EngineResponse, EngineSearchResult, RequestResponse, CLIENT};
pub fn request(query: &str) -> RequestResponse {
CLIENT
.get(
Url::parse_with_params(
"https://api.yep.com/fs/2/search",
&[
... |
<style lang="scss">
.tree-select {
position: relative;
display: inline-block;
.el-input {
cursor: pointer;
}
.el-autocomplete-suggestion {
position: absolute;
z-index: 2003;
background-color: #fff;
}
&__wrap {
max-height: 260px;
overflow: au... |
package uvg.edu.gt;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Represents a graph using an adjacency matrix.
*/
public class Graph {
private static final int NO_EDGE = 0;
private final int[][] adjacencyMatrix;
private final int numVertices... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="description" content="README for cllib"/>
<meta... |
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Restaurant website</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5W... |
package app.beautyminder.controller.cosmetic;
import app.beautyminder.domain.Cosmetic;
import app.beautyminder.service.ReviewService;
import app.beautyminder.service.cosmetic.CosmeticRankService;
import app.beautyminder.service.cosmetic.CosmeticService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger... |
---
title: "\"Mastering FB Sharing YouTube Videos Directly for 2024\""
date: 2024-05-31T12:40:34.694Z
updated: 2024-06-01T12:40:34.694Z
tags:
- ai video
- ai youtube
categories:
- ai
- youtube
description: "\"This Article Describes Mastering FB: Sharing YouTube Videos Directly for 2024\""
excerpt: "\"This Arti... |
import React, { useState, useEffect } from "react";
import Input from "../../components/input/Input";
import Button from "../../components/button/Button";
import "./login.css";
import { Link } from "react-router-dom";
import { getAuth, signInWithEmailAndPassword } from "firebase/auth";
import { logIn } from "../../redu... |
import { useContext, createContext, useState, useEffect} from "react";
const ThemeContext = createContext();
export default function ThemeContextProvider({ children }) {
const [theme, setTheme] = useState(
localStorage.getItem("theme") !=="dark" ? "light" :
"dark");
useEffect(() => {
const r... |
package com.ea.ai.rag.dms.presentation.api;
import com.ea.ai.rag.dms.application.service.AiServiceClient;
import com.ea.ai.rag.dms.domain.dto.Document;
import com.ea.ai.rag.dms.domain.vo.ai.Answer;
import com.ea.ai.rag.dms.domain.vo.ai.Question;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas... |
# Required library
library(sparklyr)
library(mongolite)
library(tm)
library(ggplot2)
library(dplyr)
# call the spark
Sys.setenv(SPARK_HOME ='/home/hduser/Desktop/spark-2.4.5')
sc <- spark_connect(master = "local")
# retrive the collection from the mongo
ukdb <- mongo(collection = "uktweets",
db = "ukda... |
<refentry id="dump">
<refnamediv>
<refname>DUMP</refname>
<refpurpose>Formatted File Data Dump in Hexadecimal and ASCII</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>dump</command>
<arg choice="opt">
<replaceable>-h -m -x</replaceable>
</arg>
<arg choice="opt">
<replaceable>path</replaceable>
... |
import os
import pytest
from flask_jwt_extended import create_access_token
from app import create_app
from app.models.patient import db
@pytest.fixture(autouse=True)
def env_setup():
os.environ['FLASK_ENV'] = 'testing'
yield
os.environ['FLASK_ENV'] = 'development'
@pytest.fixture
def app():
app = c... |
// ignore_for_file: file_names
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../model/series.dart';
import 'api.dart';
class CountriesSeriesController extends GetxController {
final Dio _dio = Dio(BaseOptions(baseUrl: ApiConstants.baseUrl));
final S... |
import { Component } from "@angular/core";
interface Game {
title: string;
price: number;
img: string;
}
@Component({
selector: 'su-game',
// template: '<h2>This is game component</h2>',
templateUrl: './game.component.html',
styleUrls: ['./game.component.css']
})
export class GameComponen... |
# 弹出选择 Popselect
如果你想选择一些数据,还不想看到那个框子,可以使用 Popselect。
## 演示
```demo
basic.vue
size.vue
scrollable.vue
multiple.vue
slot.vue
```
## API
### Popselect Props
| 名称 | 类型 | 默认值 | 说明 | 版本 |
| --- | --- | --- | --- | --- |
| multiple | `boolean` | `false` | 是否为多选 | |
| node-props | `(option: SelectOption \| SelectGroupO... |
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using webapi.event_.tarde.Domains;
using webapi.event_.tarde.Interfaces;
using webapi.event_.tarde.Repositories;
namespace webapi.event_.tarde.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Produces("application/json")]
publi... |
// ------------------------- PEDRA PAPEL TESOURA ---------------------------------------------------
const elementsPlayer = document.querySelectorAll('.player-options div > img') //Pegando todos os elementos de dentro da div
let playerOpt = '' // Instanciando primeiramente a opção do player como vazio
const elementsE... |
#ifndef SLIST_H
#define SLIST_H
#include "listex2.gh"
// sorted lists without duplicates
// TODO: remove other lemma's
fixpoint bool sorted(list<int> vs) {
switch(vs) {
case nil: return true;
case cons(h1, t1): return
switch(t1) {
case nil: return true;
... |
// 209625946 Tomer Berenstein
package animation.screenanimation;
import listeners.lhelpers.Counter;
/**
* The WinScreen class is a win screen animation that extends ScreenAnimation
* and displays a message when the player wins the game.
*
* @author Tomer Berenstein tomerbrotem@gmail.com
* @version 19.0.2
* @si... |
import 'package:flutter/material.dart';
import 'package:psxmpc/config/ps_colors.dart';
import '../../../../../core/vendor/constant/ps_dimens.dart';
import '../../../../../core/vendor/utils/utils.dart';
import '../../../../../core/vendor/viewobject/item_currency.dart';
class ItemCurrencyListViewItem extends StatelessW... |
// Get the calculate button
const calculateButton = document.getElementById('calculate');
// Add click event listener to the calculate button
calculateButton.addEventListener('click', function() {
// Get the input values
const investmentAmount = parseFloat(document.getElementById('investment-amount').value.replace... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.