text stringlengths 184 4.48M |
|---|
import React, { Suspense, useEffect } from 'react';
import { useSearchRestaurantByUserInfinite } from '@apis/hooks/restaurant/useSearchRestaurantByUserInfinite';
import useGetUserInfo from '@apis/hooks/user/useGetUserInfo';
import DownArrow from '@assets/icons/DownArrow';
import LeftArrowIcon from '@assets/icons/LeftA... |
'
' * Copyright (C) 2012-2013 Arctium <http://arctium.org>
' *
' * This program is free software: you can redistribute it and/or modify
' * it under the terms of the GNU General Public License as published by
' * the Free Software Foundation, either version 3 of the License, or
' * (at your option) any later version.
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The 4 L's of Methamphetamine</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap" rel="stylesheet">
<style>
body ... |
import React, { Component } from 'react';
import CKEditor from '@ckeditor/ckeditor5-react';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
class Editor extends Component {
render() {
return (
<div className="editingApp">
<h2>Using CKEditor 5 build in React</h2>
... |
import 'package:chat/pages/login_page.dart';
import 'package:chat/pages/usuarios_page.dart';
import 'package:chat/services/auth_service.dart';
import 'package:chat/services/socket_service.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LoadingPage extends StatelessWidget {... |
package main
import (
"context"
"fmt"
)
type ReservationRepository interface {
CommitPrepared(ctx context.Context, txID string)
RollbackPrepared(ctx context.Context, txID string)
CreatePrepared(ctx context.Context, r *Reservation, txID string) error
}
type defaultReservationRepository struct {
db *DB
}
func N... |
package problem1;
import java.io.PrintWriter;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apa... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Number guessing game" />
<meta name="keywords" content="mths, ics2o" />
<meta name="author" content="Brayden Blank" />
<me... |
import { Routes, Route } from "react-router-dom";
import Navbar from "./routes/navbar/navbar.component";
import Home from "./routes/home/home.component";
import { Checkout } from "./routes/checkout/checkout.component";
import { useDispatch } from "react-redux";
import {GlobalStyle} from "./global.styles";
import Shop f... |
// This file is part of the materials accompanying the book
// "The Elements of Computing Systems" by Nisan and Schocken,
// MIT Press. Book site: www.idc.ac.il/tecs
// File name: projects/03/b/RAM512.hdl
/**
* Memory of 512 registers, each 16 bit-wide. Out holds the value
* stored at the memory location specified... |
import React from "react";
import Slider from "react-slick";
import NewsCard from "./NewsCard";
import { useDispatch, useSelector } from "react-redux";
import { fetchBlog, getAllBlogs, getStatus } from "../features/blogSlice";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";
import Loa... |
' very simple TEXTWINDOW Calculator
' program by YLed
' February 11th 2017
' Small Basic February Challenge of the Month proposed by LitDev
' program no:
start:
TextWindow.Clear()
TextWindow.ForegroundColor="cyan"
TextWindow.WriteLine("Addition Type (+) " + "Substraction (-) "+"Multiplication (*) "+"Division (... |
<!DOCTYPE html>
<html>
<head>
<Style>
.bottom-right{
position: fixed;
bottom: 20px;
right: 20px;
background-color: black;
color: white;
}
.right-sidebar{
position: fixed;
top: 0;
bottom: 0;
right: 0;
width: 100px;
background-color: green... |
import { useState } from 'react';
import { useMedia } from 'react-use';
import { useTranslation } from 'react-i18next';
import { Logo } from 'components/Logo';
import { Social } from 'components/Social';
import { Phone } from 'components/Phone';
import {
Footer,
Container,
Wrapper,
WrapLeft,
WrapRight,
Menu... |
package CollectionsClassMethod;
import java.util.*;
public class CollectionsExample {
public static void main(String[] args) {
/*addAll()*/
List<String> list = new ArrayList<String>();
list.add("Rahul");
list.add("Karthik");
Collections.addAll(list, "Rahul", "OM", "Prem");
System.out.println("... |
import React, { useRef, useState, useEffect } from "react";
import { useInView } from "framer-motion";
import { TestimonialsCard } from "../Components";
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";
import Image from "next/image";
import testimonialsImage1 from "../assets/images/Testimonials/... |
import { CircularProgress, Container, Typography } from '@mui/material';
import { ApolloError } from 'apollo-client';
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import AuthForm from '@/components/AuthForm';
import FormField from '@/components/AuthFormField';
import { ErrorHandler... |
from reporting import construct_forecasts, convert_dict_to_json_ready
import pandas as pd
import numpy as np
import pytest
def generate_dummy_forecasts(dataset, h, multiplication_factor, as_frame=False, add_nan=False):
last_index = dataset.index[-1]
last_value = dataset.iloc[-1]
# Generate the date range ... |
# (c) 2015-2022 Acellera Ltd http://www.acellera.com
# All Rights Reserved
# Distributed under HTMD Software License Agreement
# No redistribution in whole or part
#
from glob import glob
from os import path, makedirs
import numpy as np
from htmd.adaptive.adaptive import AdaptiveBase
from htmd.simlist import simlist, s... |
/**
1- A- Definir una clase para representar triángulos. Un triángulo se caracteriza por el tamaño de sus 3 lados (double),
el color de relleno (String) y el color de línea (String).
El triángulo debe saber:
• Devolver/modificar el valor de cada uno de sus atributos (métodos get# y set#)
• Calcular el área ... |
package main
import(
"log"
"net/http"
"github.com/gorilla/websocket"
)
var clients = make(map[*websocket.Conn]bool) //connected clients
var broadcast = make(chan Message) //broadcast channel
//configure the upgrader
var upgrader = websocket.Upgrader{}
//Define our message object
type Message struct{
E... |
"""
Tests the unit functions in ch10_snippets.py for calculating bet size.
"""
import unittest
import datetime as dt
import numpy as np
import pandas as pd
from scipy.stats import norm
from mlfinlab.bet_sizing.ch10_snippets import get_signal, avg_active_signals, mp_avg_active_signals, discrete_signal
from mlfinlab.b... |
import React, { useEffect, useState } from 'react';
import ButtonText from '../../../../components/button/ButtonText';
import InputSelect from '../../../../components/form/InputSelect';
import Panel from '../../../../components/panel/Panel';
import PanelBody from '../../../../components/panel/PanelBody';
import Cooper... |
//jshint esversion:6
require('dotenv').config();
const express = require("express");
const bodyParser = require("body-parser");
const ejs = require ("ejs");
const app = express();
const mongoose = require("mongoose");
const encrypt = require("mongoose-encryption");
console.log(process.env.API_KEY);
app.use(express.s... |
import React, { FC, useState } from "react";
import background from "../../../assets/stormgatebackground.png";
import BuildOrdersSearchFilters from "../../Collection/BuildOrdersSearchFilters";
import { Games, Roles, stormgateFactionsDisplay, stormgateGameModesDisplay } from "../../../Types&Globals/enums";
import { useD... |
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:seecooker/utils/file_converter.dart';
class NewRecipe {
/// 封面
late File cover;
/// 标题
late String name = "";
/// 简介
late String introduction = "";
/// 每一步的图片
List<File> stepImages = [];
/// 每一步的内容
List<String> stepContents = [];... |
var budgetController = (function() {
var Expense = function(id, description, value){
this.id = id;
this.description = description;
this.value = value;
this.percentage = -1;
};
Expense.prototype.calcPercentage = function(totalIncome) {
if (totalIncome > 0) {
this.percen... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFkJobOffer extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('job_offer', function ... |
scalar Decimal
scalar EmailAddress
scalar DateTime
scalar Date
scalar Currency
#Common directives
"The @internal directive annotates GraphQL objects that should be available internally"
directive @internal repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | ... |
import React, { useState } from "react";
export default function Accordion({ items }) {
const [activeState, setActiveState] = useState(null);
const onTitleClick = (index) => {
setActiveState(index);
};
const renderedItems = items.map((item, index) => {
const active = index === activeState ? 'act... |
import {View, Text, Image, StyleSheet, TouchableOpacity} from 'react-native';
import React from 'react';
import {COLORS, images, SIZES} from '../../constants/index';
import {useNavigation} from '@react-navigation/native';
import {FontIos} from '../../constants/theme';
interface Card {
image_path: any;
imageTitle: ... |
import * as React from 'react';
import Button from '@mui/material/Button';
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from... |
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { buildForbiddenRouteslist } from '../../functions/utils';
import { StatoEnum, TipoProcedimento } from './../../../../shared/models/models';
import { UserSe... |
import { Router } from 'express';
import { cartsService } from '../dao/index.js';
const router = Router();
// Ruta para obtener todos los carritos
router.get("/", async(req,res)=>{
try {
const carts = await cartsService.getCarts();
res.json({data:carts});
} catch (error) {
res.json({er... |
== Object expressions
link:https://kotlinlang.org/docs/object-declarations.html[kotlinlang.org], link:https://developer.alexanderklimov.ru/android/kotlin/object.php[alexanderklimov]
*_See:_* link:../../kotlin-basics/src/main/kotlin/common/cs026_object_expressions/ObjectExpressions.kt[ObjectExpressions.kt]
=== 1. Вве... |
import styles from "./ProductList.module.scss";
import { useAppSelector } from "../hooks/redux-hooks";
import Product from "./Product";
interface ProductListProps {
description: string;
slogan: string;
}
const ProductList = ({ description, slogan }: ProductListProps) => {
const products = useAppSelector((state)... |
import express from "express";
import axios from "axios";
import ytdl from "ytdl-core";
import {YoutubeVideosScraper} from "./Utils/YoutubeVideosScraper"
import { Params } from "./Interfaces/YoutubeHomeResponse";
const app = express();
const PORT = process.env.PORT || 1025;
require('dotenv').config();
app.use(express.s... |
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
div#canvas-frame {
border: none;
cursor: pointer;
width: 100%;
height: 600px;
background-color: #EEEEEE;
}
</style>
<!--引入three.js三维引擎-->
<script src="http://www.yanhuangxueyuan.com/versions/threejsR92/build/three.js"... |
//Calibration = 22.50 BoardName = ACM1 Scale 0 Baud = 19200
#include <HX711_ADC.h>
#if defined(ESP8266)|| defined(ESP32) || defined(AVR)
#include <EEPROM.h>
#endif
//pins:
const int HX711_dout = 4; //mcu > HX711 dout pin
const int HX711_sck = 5; //mcu > HX711 sck pin
//HX711 constructor:
HX711_ADC LoadCell(HX711_dou... |
package com.example.playfaircipher;
import java.util.HashSet;
public class PlayfairCipher {
private static final char FILLER_CHAR = 'X';
private char[][] matrix;
public PlayfairCipher(String keyword) {
matrix = fillMatrix(keyword);
}
private char[][] fillMatrix(String keyword) {
... |
import { Component, OnInit } from '@angular/core';
import { Message } from './support.model';
import { SupportService } from './support.service';
import { UiService } from '../ui/ui.service';
import { AuthService } from '../auth/auth.service';
@Component({
selector: 'app-support',
templateUrl: './support.component... |
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: The... |
import React, { useState } from 'react';
import headerLogo from '../../../../public/header-logo.png'
import Image from "next/dist/client/legacy/image";
import SearchIcon from "../../../assets/icons/SearchIcon";
import FavoriteIcon, { FavoriteFillIcon } from "../../../assets/icons/FavoriteIcon";
import BucketIcon, { Buc... |
import React from "react";
import { Query, ApolloConsumer } from "react-apollo";
import { Link } from "react-router-dom";
import Queries from "../../graphql/queries";
import CourseHeader from './CourseHeader';
import Ruby from '../../assets/ruby-logo.png';
import JavaScript from '../../assets/javascript-logo.png';
impo... |
<template>
<div
class="bg-secondary-light dark:bg-primary-dark min-h-screen flex flex-col"
>
<!-- App header -->
<TheHeader />
<!-- Render contents with transition -->
<transition name="fade" mode="out-in">
<slot />
</transition>
<!-- App footer -->
<TheFooter />
<!-- Go... |
import { Articulo } from "./articulo";
import { ArticuloVendido } from "./articuloVendido";
export class Kiosko {
private articulosDisponibles: Articulo[] = [];
private articulosVendidos: ArticuloVendido[] = [];
constructor(articulosDisponibles: Articulo[], articulosVendidos: ArticuloVendido[]) {
this.artic... |
import React, { useState } from "react";
import { FaUser } from "react-icons/fa";
import { toast } from "react-toastify";
import { useAppDispatch } from "../app/hooks";
import { createClient } from "../features/clients/clientsSlice";
export default function AddClientModal() {
const [name, setName] = useState("");
... |
package com.example.forage.data
import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.example.forage.model.Forageable
// TODO: create the database with all necessary annotations, methods, variables, etc.
@Database(entities = [Forageable::cl... |
#pragma once
#include "Object.h"
namespace hm
{
class GameObject;
class MonoBehavior;
class Transform;
class Camera;
class MeshRenderer;
class Light;
class ParticleSystem;
class Collider;
class RigidBody;
class Animator;
class AI;
class UIText;
class Mirror;
class AudioSound;
enum class ComponentType
... |
<?php
namespace App\Http\Controllers;
use App\Models\Klasifikasi;
use App\Models\KlasifikasiObat;
use App\Models\Obat;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
class KlasifikasiObatController extends Controller
{
/**
* Display a listing of t... |
const db = require("../config/dbConfig")
const bcrypt = require("bcrypt")
const { HttpException } = require("../exceptions/HttpException")
const { schema, emailValidator } = require("../middleware/validation.middleware")
const getUserService = async (userId) => {
const user = await db.user.findOne({ where: { userI... |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
/*Задача
На входе функция получает параметр n - натуральное число.
Необходимо сгенерировать n-массивов, заполнить их случайными числами,
каждый массив имеет случайный размер. Размеры массивов не должны совпадать.
... |
class LocalStorageMock implements Storage {
readonly length: number
store: { [key: string]: string }
constructor() {
this.length = 0
this.store = {}
}
clear() {
this.store = {}
}
getItem(key: string) {
return this.store[key] || null
}
key(index: number) {
return null
}
se... |
import {Schema, model} from "mongoose";
export interface Product {
id: number,
title: string,
description: string,
price: number,
images: string[],
category: string,
rating: number,
discountPercentage: number,
brand: string,
stock: number
}
const productSchema = new Schema<Prod... |
//THIS FILE WAS COPIED OVER FROM GAMEMINIMAL ON 4/1/2023
public abstract class SpritePhysics extends Sprite
{
//This is true if this sprite flips its own orientation when an
//object collides with it
private boolean flip_direction = false;
//The percentage of momentum kept by an object
//bouncing off of this spri... |
import {C, DefaultKernel, k, X} from "../src/Kernel/DefaultKernel";
import {Mr, specr1, specr2, structure} from "../src/Repeater/Machine";
import Kernel from "../src/Kernel/Kernel";
import Entity from "../src/Entity/Entity";
import Proxy from "../src/Proxy/Proxy";
import {c, c1, H0, iH0, not0, num} from "../src/Numeric... |
#include "CppUnitTest.h"
#include "../../../Light-Server/src/Commands/CheckPowerCommand.h"
#include "../../../Light-Server/src/ValueDomainTypes.h"
#include "../../mocks/Mock_WebServer.h"
#include "../../../Light-Server/src/LightWebServer.h"
#include "../../../Light-Server/src/Orchastrator/IOrchastor.h"
#include "../..... |
import React, { useState, useEffect} from 'react';
import { PageHeader } from 'antd';
import PostPreview from '../../components/post-preview/post-preview.component';
import _ from 'lodash';
import db from '../../firebase';
import './blog.style.css'
/* This is Blog page, it shows all the posts from firebase and displa... |
@inject IAdviserService AdviserService
@inject IActivityLog ActivityLog
@inject ISnackbar Snack
@inject AuthenticationStateProvider AuthenticationStateProvider
<MudForm Model="@_adviser">
<MudCardContent>
<MudTextField @bind-Value="@_adviser.Name"
T="string"
Cla... |
import axios from "../../../api/axios";
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import formbg from "../../../assets/events/formbgfinal.jpg";
import { useAuth } from "../../../context/AuthProvider";
const LoginForm = () => {
const navigate = useNavigate();
const { auth, set... |
import * as core from "@actions/core";
import * as github from "@actions/github";
import { RequestError } from "@octokit/request-error";
import { Context } from "@actions/github/lib/context";
export async function requestChanges(
token: string,
context: Context,
commentBody: string,
prNumber?: number
) {
if ... |
import React, { useEffect, useState } from "react";
import AdminNav from "../../../components/nav/AdminNav";
import { toast } from "react-toastify";
import { useSelector } from "react-redux";
import { LoadingOutlined } from "@ant-design/icons";
import { createProduct } from "../../../functions/product";
import Produc... |
import SonComponent from "./SonComponent"
import PokemonContext from "./PokemonContext"
import { useContext, useState } from "react"
import PokeImage from "./PokeImage"
import Button from "./Button"
function GrandfatherComponent() {
const [index, setIndex] = useState(1)
const context = {
index: index,
baseUrl: "... |
package models
import (
"fmt"
"time"
"github.com/go-playground/validator/v10"
"gorm.io/gorm"
)
type User struct {
gorm.Model
Username string `json:"username" validate:"required,min=3,max=50" gorm:"uniqueIndex"`
Email string `json:"email" gorm:"uniqueIndex" validate:"required,email"... |
const express = require("express");
const morgan = require('morgan')
const app = express();
app.use(morgan('dev'))
//Este código utiliza el middleware morgan con el formato 'dev', que proporciona un formato de registro de solicitudes conciso y fácil de leer. Registra información como el método HTTP, la ruta, el códi... |
---
title: How to mask sensitive data on Azure Web Application Firewall on Azure Front Door (preview)
description: Learn how to mask sensitive data on Azure Web Application Firewall on Azure Front Door.
author: vhorne
ms.author: victorh
ms.service: web-application-firewall
ms.topic: how-to
ms.date: 04/09/2024
---
# Ho... |
@extends('index')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-header">
<div style="display: flex; justify-content: space-between; align-items: center;"... |
import React, { useState, useEffect } from 'react';
import {
Text,
View,
StyleSheet,
Pressable,
Image,
Dimensions,
ScrollView,
ActivityIndicator,
Platform,
} from 'react-native';
import capelliLogo from '../staticImages/CapelliLogo.png'; // Capelli logo png
import cart from '../staticImages/CartImage... |
The factory design pattern is a creational design pattern that provides a way to create objects without explicitly specifying the class to be instantiated. It acts like a factory that manufactures different products (objects) based on the request.
Here's a breakdown of the concept:
## Components:
- Factory Class: Th... |
Given the availability time slots arrays slots1 and slots2 of two people and a meeting duration duration, return the earliest time slot that works for both of them and is of duration duration.
If there is no common time slot that satisfies the requirements, return an empty array.
The format of a time slot is an array... |
# GPU 基础
GPU是Graphics Processing Unit(图形处理器)的简称,它是计算机系统中负责处理图形和图像相关任务的核心组件。GPU的发展历史可以追溯到对计算机图形处理需求的不断增长,以及对图像渲染速度和质量的不断追求。从最初的简单图形处理功能到如今的高性能计算和深度学习加速器,GPU经历了一系列重要的技术突破和发展转折。
在接下来的内容中,我们还将探讨GPU与CPU的区别,了解它们在设计、架构和用途上存在显著差异。此外,我们还将简短介绍一下AI发展和GPU的联系,并探讨GPU在各种领域的应用场景。
除了图形处理和人工智能,GPU在科学计算、数据分析、加密货币挖矿等领域也有着广泛的应用。深入了解这些应用... |
<div class="card">
<div class="card-body">
<ng-container *ngIf="btnfiltro">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-12 text-end mb-1">
<ng-container *ngIf="modelo_temp; else elseTemplate">
<button class="btn btn-sm btn-outline-primary" (click... |
package ru.yandex.practicum.filmorate.model.film;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.FieldDefaults;
import ru.yandex.practicum.filmorate.model.Marker;
import ru.yandex.practicum.filmorate.validation.film.FilmReleaseDateConstraint;
import javax.validation.c... |
# Frontend Mentor - Expenses chart component solution
This is a solution to the [Expenses chart component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/expenses-chart-component-e7yJBUdjwt). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
## Table... |
# FOR LOOPS
print("FOR LOOP USING RANGE :")
for i in range(1, 5):
print(i)
#FOR LOOP - LIST
print("\nFOR LOOP USING LIST")
fruits = ["apple", "banana", "cherry"]
for fruit in fruits:
print(fruit)
# WHILE LOOP
print("\nWHILE LOOP:")
count = 0
while count < 5:
print(count)
count += 1
#NESTED LOOPS
prin... |
/**@autor Gustavo Muniz - Controle e Automação - mat. 818
* @since 17/11/2022
* @version 1.0
* Classe responsável pela criação dos candidatos à eleição bem como,
* as devidas implementações responsáveis tanto pelo armazenamento dos CPFs dos
* usuários quanto pela apuração dos votos de cada candidato.
*/
package ... |
<template>
<div>
<h1>Pengelola Tugas Sederhana</h1>
<!-- Form untuk menambahkan tugas baru -->
<form-task :tasks="tasks" @add-task="addTask"></form-task>
<!-- Daftar tugas -->
<task-list :tasks="tasks" @delete-task="deleteTask"></task-list>
</div>
</template>
<script>
import FormTask from "./co... |
package webdav.server.virtual.entity.local;
import http.FileSystemPath;
import http.server.exceptions.AlreadyExistingException;
import http.server.exceptions.NotFoundException;
import http.server.exceptions.UserRequiredException;
import http.server.exceptions.WrongResourceTypeException;
import http.server.message.HTTP... |
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class BookResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
... |
/*
* IMC2 - an inter-mud communications protocol
*
* imc-util.c: misc utility functions for IMC
*
* Copyright (C) 1996,1997 Oliver Jowett <oliver@jowett.manawatu.planet.co.nz>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as publi... |
import Foundation
import UIKit
class PetBreedsViewController: UIViewController, LoadingIndicatorViewType {
var loadingIndicatorViewController: UIViewController?
var petType: PetType
private let presenter: PetBreedsPresenterProtocol
lazy var paginationView: PaginationView = {
... |
#include <array>
#include <vector>
#include <cmath>
#include <gtest/gtest.h>
#include "body.hpp"
#include "n_body_system.hpp"
TEST(NBodySystemTests, TestConstructor)
{
std::vector<Body> bodies = { Body{}, Body{}, Body{} };
NBodySystem test_system = NBodySystem(bodies);
const std::vector<Body>& bodies_out = tes... |
contract c10769{
/**
* @notice Terminate contract and refund to owner
* @param tokens List of addresses of ERC20 or ERC20Basic token contracts to
refund.
* @notice The called token contracts could try to re-enter this contract. Only
supply token contracts you trust.
*/
function destroy(address[] t... |
import { selectIsLoggedIn } from 'Redux/Auth/selectors';
import {
addContactThunk,
deleteContactThunk,
fetchContactsThunk,
} from 'Redux/Contacts/operations';
import { addFilter } from 'Redux/Contacts/phonebookSlise';
import {
selectContactsItems,
selectError,
selectFilter,
selectIsLoading,
} from 'Redux/... |
// TIPOGRAFIA "Kanit"
// @import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
/* RESET DE MARGENES */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
// GENERAL
body {
background-color: rgb(22, 20, 20);
font-family:... |
package firebase.web.firestore;
/**
* A DocumentSnapshot contains data read from a document in your Firestore database. The data can be extracted with .data() or .get(<field>) to get a specific field.
*
* For a DocumentSnapshot that points to a non-existing document, any data access will return 'undefined'. You c... |
# Starting your journey
## Prerequisites
Ensure you have followed the steps listed on the [installation documentation](https://sitecore.github.io/Helix.Examples/install.html).
The Helix examples assume you have some experience with (or at least an understanding of) Docker container-based Sitecore development. For m... |
import React from 'react';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
import Checkbox from '@material-ui/core/Checkbox';
import IconButton from '@material-ui/core/IconButto... |
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/03/b/RAM16K.hdl
/**
* Memory of 16K registers, each 16 bit-wide. Out holds the value
* stored at the memory location specified by address. If load==1, then
* t... |
import heapq
from heapq import heappop, heappush
def isLeaf(root):
return root.left is None and root.right is None
class Node:
def __init__(self, ch, freq, left=None, right=None):
self.ch = ch
self.freq = freq
self.left = left
self.right = right
def __lt__(se... |
import { Single } from "../SingleTask/SingleTask"
import { useEffect } from "react"
import { NewModal } from "../Modals/NewModal/NewModal"
import { useDispatch, useSelector } from "react-redux"
import { RootState } from "../../app/store"
import { getAllTasks } from "../../app/API"
import { addAllTasks } from "../../app... |
//
// UserDefaultsManager.swift
// SeSacSlack
//
// Created by 이상남 on 1/8/24.
//
import Foundation
struct UserDefaultsManager {
@UserDefaultsWrapper(key: "isLogin", defaultValue: false)
static var isLogin
@UserDefaultsWrapper(key: "token", defaultValue: "")
static var token
@UserDefaul... |
#include <cassert>
#include <iostream>
#include "ortho.h"
#include "lobpcg.h" // check_init_guess
// test for ortho and qr
void test_ortho(){
std::cout << "\n----- Testing ortho -----" << std::endl;
int n = 5; // number of rows
int m = 3;//4; // number of columns
Eigen::MatrixXd evec(n, m); // initiali... |
document.addEventListener("DOMContentLoaded", () => {
const { item, group } = getProductParamsFromURL();
if (group) {
fetchProductDetails(group, item);
} else {
console.error("Grupo no especificado en la URL.");
}
function getProductParamsFromURL() {
const urlParams = new URLSearchParams(window.l... |
//NPM Imports
import React, { useEffect } from "react";
import { useNavigate } from "react-router-dom";
//Local Imports
import Header from "./Header/Header";
import JobInfo from "./JobInfo/JobInfo";
import JobSupplyInfo from "./JobSupplyInfo/JobSupplyInfo";
import JobNotes from "./JobNotes/JobNotes";
import MaterialLi... |
package exercise6;
import aut.isp.lab4.exercise6.*;
import org.junit.Test;
import static org.junit.Assert.assertArrayEquals;
public class ToStringTests {
@Test
public void toStringSensorTest() {
LevelSensor levelSensor = new LevelSensor("ABC", "Mini", 25F);
String expected = "Sensor - manufac... |
/*
* CopperCore, an IMS-LD level C engine
* Copyright (C) 2003 Harrie Martens and Hubert Vogten
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at... |
package qichen.code.controller;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import qichen.code.entity.AfterSaleOrder;
import qichen.code.entity.DeviseOrder;
import qichen.code.enti... |
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import { ImageContainer, ResponsiveImage, ContactFields } from '../atoms';
import { LabelLabel } from '../molecules';
const Wrapper = styled.div`
display: flex;
flex-flow: wrap;
`;
class ContactDetails extends... |
## 자바 중급 1편
### String 클래스 학습
> 1. String 최적화
> 2. 메서드 체인닝 - Method Chaining
---
### 1. String 최적화
> Java 컴파일러는 아래와 같이 문자열 리터럴을 더하는 부분을 자동으로 합쳐준다.
#### 문자열 리터럴 최적화
- 자바는 컨타임에 별도의 문자열 결합 연산을 수행하지 않고 **컴파일러가 직접 결합 연산을 해주기 때문에 성능이 향상**된다.
```java
String helloWorld = "Hello, " + "World!"; // 컴파일 전
String hell... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.