text stringlengths 184 4.48M |
|---|
import { CheckoutWrapper, BasketWrapper, ItemWrapper, ColumnWrapper, CheckoutPrice, CheckoutButton, ButtonWrapper } from "./Checkout.style";
import { useEffect } from "react";
import { Link } from "react-router-dom";
export const Checkout = ({basket, setBasketPrice, basketPrice, setBasket, setFullCatList, fullCatList})... |
#ifndef TABLA_H
#define TABLA_H
#include "Constantes.h"
#include "Cadena.h"
#include "CalifCol.h"
#include "Columna.h"
#include "Tupla.h"
#include "ListaPos.h"
#include "ListaPosImp.h"
class Tabla;
// Operador de salida de flujo
ostream &operator<<(ostream& out, const Tabla &t);
class Tabla
{
public:
// Construct... |
import {Body, Controller, Delete, Get, Param, Patch, Put} from '@nestjs/common';
import {PriorityService} from "./priority.service";
import {Priority} from "./priority.entity";
@Controller('priority')
export class PriorityController {
constructor(
private priorityService: PriorityService
) {}
@Get... |
import React, { Component } from "react";
import { connect } from "react-redux";
import { layDanhSachKhoaHoc } from "../../redux/actions/QuanLyKhoaHocAction";
import CoursePopular from "../CoursePopular/CoursePopular";
export class ListCoursePopular extends Component {
componentDidMount() {
this.props.layDanhSach... |
<template>
<div>
<div class="filters">
<p>Filter:</p>
<button class="filters__button" @click="toggleFilter('stock')">In Stock</button>
<button class="filters__button" @click="toggleFilter('price')">< $ 20</button>
</div>
<div class="wrapper">
<div v-for="... |
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:loading_animation_widget/loading_animation_widget.dart';
import 'search.dart';
class SelectCategory extends StatefulWidget {
final List<dynamic> services;
const SelectCategory({Key? key, require... |
import { useNavigate, useParams } from "react-router-dom";
import { Single_solution_data } from "./index";
import "./Single.css";
import { cards1_AllSolutions, cards1_Sectors } from "../index"; // Import cards1_Sectors
import { useState } from "react";
export default function Single() {
const [isHovered, setIsHov... |
package brady;
import ai.core.AIWithComputationBudget;
import ai.core.ParameterSpecification;
import ai.abstraction.pathfinding.AStarPathFinding;
import rts.GameState;
import rts.units.Unit;
import rts.units.UnitTypeTable;
import rts.PlayerAction;
import rts.PlayerActionGenerator;
import rts.UnitAction;
import java.u... |
package com.example.demo.domain.models;
import com.example.demo.TestConfig;
import com.example.demo.adapters.mongodb.entities.LibraryEntity;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
@TestConfig
publ... |
import { useContext, useState } from "react";
import FormData from "form-data";
import axios from "axios";
import { useNavigate } from "react-router-dom";
import { UserContext } from "../context/UserContext";
import { toast } from "react-hot-toast";
const LoginForm = () => {
const { setUser, setIsLoggedIn } = useCon... |
package jz_offer.all.JZ38;
import java.util.LinkedList;
import java.util.Queue;
public class Solution {
public class TreeNode {
int val = 0;
TreeNode left = null;
TreeNode right = null;
public TreeNode(int val) {
this.val = val;
}
}
//递归解法
public... |
import random
import pygame.time
from player import Player
from ennemis import *
from text import Text
from wall import Wall
from random import randint
from constantes import *
import csv
import sys
class Game:
def __init__(self, window, clock):
self.window = window
self.screen_surface = pygame.su... |
import { useState, useEffect, useRef } from 'react'
export type Option = {
value: string
label: string
}
interface DropdownProps {
options: Option[]
onSelect: (selectedOption: Option) => void
hover?: string
}
export const Dropdown: React.FC<DropdownProps> = ({
options,
onSelect,
hover
}) => {
const... |
#ifndef PHILO_H
#define PHILO_H
#include <stdbool.h>
#include <pthread.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct s_philosopher t_philosopher;
typedef struct s_simulation t_simulation;
struct s_philosopher
{
int id;
pthread_t thread;... |
import axiosInstance from "../../Connections/axiosConfig";
import { useEffect, useState } from "react";
import { useNavigate } from 'react-router-dom';
export const AdministrarUsuarios = () => {
const rol = window.localStorage.getItem('Rol')
if(rol !== 'ADMINISTRADOR'){
window.location.href = "/"
... |
package Week5_PL_ContadoresDomesticos;
public class EletricidadeTarifaBiHorario extends Contadores{
/**
* Preço do KWH nas horas de vazio
*/
protected final double tarifarioHorasDeVazio = 0.066;
/**
* Preço do KWH nas horas fora de Vazio
*/
protected final double tarifarioHorasFora... |
#pragma once
class CStringStack
{
public:
CStringStack() = default;
CStringStack(CStringStack const &other);
CStringStack(CStringStack &&other) noexcept;
~CStringStack() noexcept;
CStringStack &operator=(CStringStack const &other);
CStringStack &operator=(CStringStack &&other) noexcept;
... |
<template>
<div slot="header" class="clearfix card">
<el-button class="close-button" icon="el-icon-close" round size="mini"
style="float: left;background: #fff"
@click="closeCard"></el-button>
<div v-show="isQRlogin" class="QRlogin">
<p class="QRhead"> 扫码登录</p>
<el-im... |
1. Explain the different behaviors of ls -l /usr and ls -l /root.
=> ls -l /usr will show the long listing of files present in usr directory while ls -l /root will show the long listing of files in root directory
2. How can you enter multiple commands in a single line?
=> we can use (;) between two command or can use ... |
<?php
namespace Controller;
use App\Session;
use App\AbstractController;
use App\ControllerInterface;
use Model\Entities\Category;
use Model\Managers\CategoryManager;
use Model\Managers\TopicManager;
use Model\Managers\MessageManager;
use Model\Managers\UserManager;
class Cate... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SharpPluginLoader.Core.Memory;
namespace SharpPluginLoader.Core.Networking
{
/// <summary>
/// Provides access to the game's networking system.
/// </summary>
public static class N... |
import React from 'react'
import TextField from '@mui/material/TextField';
import MenuItem from '@mui/material/MenuItem';
const SavingsFilter = ({ filterCriteria, setFilterCriteria }) => {
const handleDateFromChange = (event) => {
setFilterCriteria({ ...filterCriteria, dateFrom: event.target.value });
... |
# Common Mistakes
## Not Considering Imbalance in Even and Odd Cases During Dynamic Programming (DP)
When working with Dynamic Programming (DP), it's crucial to take into account the differences between even and odd cases. In some situations, it is more efficient to handle evenly divided even cases and single odd cas... |
package visualization;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data... |
<?php
class PartFutbol extends Partido
{
private $cofMenores;
private $cofJuveniles;
private $cofMayores;
public function __construct($idPartido, $fecha, $objEquipo1, $cantGolesE1, $objEquipo2, $cantGolesEquipo2)
{
parent::__construct($idPartido, $fecha, $objEquipo1, $cantGolesE1, $objEqui... |
package study.webboard.board.Dto;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import study.webboard.board.entity.Company;
@Getter
@NoArgsConstructor
@Data
public class CompanyDetailDto {
private Long comId;
private String comName;
private String comCo... |
###1.Show the total number of prizes awarded.###
SELECT COUNT(winner) FROM nobel;
###2.List each subject - just once###
SELECT DISTINCT subject
FROM nobel;
###3.Show the total number of prizes awarded for Physics.###
SELECT COUNT(*)
FROM nobel
WHERE subject = 'Physics';
###4.For each subject show the subject and the... |
package com.github.GuilhermeBauer.Ecommerce.services;
import com.github.GuilhermeBauer.Ecommerce.controller.CartItemController;
import com.github.GuilhermeBauer.Ecommerce.data.vo.v1.CartItemVO;
import com.github.GuilhermeBauer.Ecommerce.exceptions.CartItemNotFound;
import com.github.GuilhermeBauer.Ecommerce.exceptions... |
package ua.klesaak.mineperms.manager.storage.sql;
import com.zaxxer.hikari.HikariDataSource;
import lombok.Getter;
import ua.klesaak.mineperms.manager.storage.StorageType;
import ua.klesaak.mineperms.manager.storage.sql.driver.AbstractConnectionFactory;
import ua.klesaak.mineperms.manager.storage.sql.driver.MariaDbCon... |
"use strict";
const quoteContainer = document.getElementById("quote-container");
const quoteText = document.getElementById("quote");
const authorText = document.getElementById("author");
const twitterBtn = document.getElementById("twitter");
const newQuoteBtn = document.getElementById("new-quote");
const loader = docu... |
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ProfileModule } from './modules/profile/profile.module';
import { ArticlesModule } from './modules/articles/articles.module';
import { AuthModule } from './modules/auth/auth.module';
import { FavoritedArticlesComp... |
// import 'package:acyuta/pages/manualinput.dart';
import 'dart:typed_data';
import 'package:acyuta/getimage/getimage.dart';
import 'package:acyuta/pages/manualinput.dart';
import 'package:acyuta/pages/shcdetail.dart';
// import 'package:acyuta/textrecog/textrecog.dart';
import 'package:flutter/material.dart';
import ... |
# -*- coding: utf-8 -*-
import json
import mock
from nose.tools import eq_
from passport.backend.api.test.mock_objects import mock_headers
from passport.backend.api.test.views import (
BaseTestViews,
ViewsTestEnvironment,
)
import passport.backend.core.authtypes as authtypes
from passport.backend.core.builders... |
import AddToBag from "@/app/components/AddToBag";
import CheckoutNow from "@/app/components/CheckoutNow";
import ImageGallery from "@/app/components/ImageGallery";
import { fullProduct } from "@/app/interface";
import { client } from "@/app/lib/sanity";
import { Button } from "@/components/ui/button";
import { Star, Tr... |
# importing the libraries
import pandas as pd
from datetime import datetime
# Load the data
df = pd.read_excel('Final_Lead_Data.xlsx')
# Remove duplicates based on 'Email'
df = df.drop_duplicates('Email')
# Select necessary columns
selected_columns = ["ID", "First Name", "Email", "Created", "Academic Year", "What is... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BoundedNPC : Sign
{
private Vector3 directionVector;
private Transform myTransform;
public float speed;
private Rigidbody2D myRigidbody;
private Animator anim;
public Collider2D bounds;
private bool ... |
package com.br.ciapoficial.adapters;
import android.content.Context;
import android.os.Build;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import androidx.recycle... |
:: choices modifier
fire: 7
_example: "[[label -> passage name [ variable: value, otherVariable : existingVar + 5 ]]"
--
The choices modifier does the same as forks in chapbook but with a few additional features.
The modifier is called with `[choices]` which, if you want the links to reveal the rest, can take the argu... |
// Definir un módulo para el dropdown de nacionalidades
const NacionalidadesDropdown = (function() {
// Función para cargar las nacionalidades desde el archivo JSON
function cargarNacionalidades() {
fetch('/FrontEnd/Json/Nacionalidades.json')
.then(response => response.json())
.then(data... |
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
contract AccountStrut {
modifier _moreMoney(uint amount, uint givenMoney) {
require(amount >= givenMoney);
_;
}
struct Account {
address _address;
uint _amount;
}
Account public _acc1 = Accoun... |
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="ISO-8859-1">
<link th:href="@{/webjars/bootstrap/3.4.1/css/bootstrap.min.css}" rel="stylesheet" media="screen">
<script type="text/javascript" th:src="@{/webjars/jquery/3.5.1/css/jquery.min.css}"></script>
<title></title>
... |
# HTML+CSS+JS
- 코딩자율학습 HTML+CSS+JS 연습 코드 업로드
- This repository is for practice HTML+CSS+JS
## JAN 30th: 기초 문법(Basic Grammar) 1p~66p
- HTML 기초 및 실행 방법, 라이브러리 다운로드
- Basic Setting for HTML. Download Live Server, Css Support, Code Runner
- index.html upload
- Basic Grammar: tag,content, paragraph etc... the elements of ... |
import CrisisCleanup
import Firebase
class TagLogger: AppLogger {
let appEnv: AppEnv
let tag: String
init(appEnv: AppEnv, tag: String) {
self.appEnv = appEnv
self.tag = tag
}
func logDebug(_ items: Any...) {
if appEnv.isDebuggable {
print(self.tag, items)
... |
<template>
<div class="container col-xl-12">
<!-- Check whether the person is authenticated or Not with v-if $gate is imported globAly from app.js and the
file Gate.js is Created for Authentication -->
<div class="row" v-if="$gate.isAdmin()">
<div class="col-xl-12">
... |
// Module dependencies
import { useEffect, useReducer } from 'react';
import type { AppProps } from 'next/app';
import { AppContext, initialState, reducer } from '../state/reducers';
import actionDispatcher from '../state/action-dipatchers';
// Styles
import '../styles/index.scss'
// UI Components
import { Layout, Al... |
/*
Freeware License, some rights reserved
Copyright (c) 2023 Iuliana Cosmina
Permission is hereby granted, free of charge, to anyone obtaining a copy
of this software and associated documentation files (the "Software"),
to work with the Software within the limits of freeware distribution and fair use.
This includes t... |
package org.egorkazantsev.library.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(HttpStatus.NOT_FOUND)
public class EntityNotFoundException extends LibraryException {
public EntityNotFoundException(String message) {
su... |
<template>
<header>
<div class="wrapper">
<div class="logo">
<img src="@/assets/img/OIG2.png" alt="Logo">
</div>
<nav v-if="route.name != 'about'">
<div v-if="showNav" class="nav-links">
<div class="close" @click="showNav = !showNav"><i>Menu</i></div>
... |
/* Esto siempre va a ser igual */
//1. exportacion de la clase Error
export class AppError extends Error {
//2. constructor con mesaje y codigo de estado, este constructor es un metodo y se va a ejecutar cuando la clase sea instanciada
constructor(message, statusCode) {
//3. obtencion de todas las funcionalid... |
use crate::{
error::{RuntimeError, RuntimeFailure},
eval::Context,
value::Value,
};
use actyx_sdk::{
language::{AggrOp, Galactus, Num, SimpleExpr, Tactic, Var},
service::{EventMeta, Order},
};
use anyhow::anyhow;
use cbor_data::Encoder;
use futures::{future::BoxFuture, FutureExt};
use std::{cmp::Ord... |
Barlesque
=========
DESCRIPTION
Barlesque is an extension for Mozilla Firefox 4.x that reclaims useful window
space by collapsing the wide grey add-on bar into a neat set of add-on buttons.
This extension is Firefox 4.x-only, as add-on bar is a new feature (introduced
in Firefox 4.0b7).
Extension implements this ... |
<?php
declare(strict_types=1);
namespace ArrayAccess\TrayDigita\App\Modules\Users\Entities;
use ArrayAccess\TrayDigita\Database\Entities\Abstracts\AbstractEntity;
use ArrayAccess\TrayDigita\Database\TypeList;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine... |
import React, {ComponentType} from 'react';
import {connect} from 'react-redux';
import {AppStateType} from '../../redux/redux-store';
import Header from './Header';
import {logout} from '../../redux/auth-reducer';
import {compose} from 'redux';
type MapStatePropsType = {
userId: number | null
email: string |... |
#include "main.h"
/**
* _strlen_recursion - is a function which returns the length of a string
* @s: contains the string to measure
*
* Return: the string length
*/
int _strlen_recursion(char *s)
{
int x = 0;
if (*s)
{
x++;
x += _strlen_recursion(s + 1);
}
return (x);
} |
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
struct Node;
struct ride
{
int ride_number;
int ride_cost;
int trip_duration;
int idx;
};
struct Node
{
ride data;
// int data; // holds the key
Node *parent; // pointer to the parent
Node *left; // pointer to left ... |
{% extends 'base.html' %}
{% block title %}Register ny ingrediens{% endblock %}
{% block heading %}Ingredienser{% endblock %}
{% block description %}Registrere ny ingrediens{% endblock %}
<style>
* {
box-sizing: border-box;
}
#myInput {
background-image: url('/css/searchicon.png');
background-position: 10px 10px... |
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\ValidationException;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Http\JsonResponse;
use Illuminate\Contracts\Validation\Validator;
class CustomValidationRegister extends FormRequest
{
... |
import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { RootState, AppDispatch } from '@/store/store';
import { fetchVinhos, fetchFornecedores } from '@/store/slices/vinhoThunks';
import styles from './cadastrar-vinhos.module.css';
import Modal from '@/app/co... |
<script lang="ts">
const information = {
name: 'Nintendo Game Boy Advance',
released: '2001',
generation: 'Sixth',
initialPrice: 99.99,
unitsSold: 81.51,
description:
"The Game Boy Advance is a 32-bit sixth generation handheld game console \
developed by Nintendo. The Game Boy Advance was praised for ... |
/// <reference types="cypress" />
describe('Navigation Test', () => {
it('should navigate to different tabs', () => {
cy.visit('/')
// make sure we are on navigate page initially
cy.location('pathname').should('eq', '/tabs/tab-navigate')
cy.get('[routerlink="/tabs/tab-saved"... |
import { message } from "@/utils/message";
import dayjs from "dayjs";
import { addDialog } from "@/components/ReDialog";
import editForm from "../update.vue";
import { ElMessageBox, Sort } from "element-plus";
import { type PaginationProps } from "@pureadmin/table";
import { CommonUtils } from "@/utils/common";
import ... |
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\SeriesController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your applicati... |
"use client";
import { useState } from "react";
import AccountHeader from "./AccountHeader";
import SectionWrapper from "./SectionWrapper";
import DashboardSidebar from "./DashboardSidebar";
import Login from "./Auth/Login";
import { useSession } from "next-auth/react";
const Dashboard = ({ pastOrders }) => {
con... |
import {
StyleSheet,
TouchableNativeFeedback,
View,
ActivityIndicator,
} from "react-native";
import React from "react";
import themes from "../constants/themes";
import useMode from "../hooks/useMode";
import { useRouter } from "expo-router";
import Avatar from "./Avatar";
import Typography from "./Typography"... |
/*
* Copyright (c) 2015-2022, Episode Six and/or its affiliates. All rights reserved.
* EPISODE SIX PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
* THIS IS CONFIDENTIAL AND PROPRIETARY TO EPISODE SIX, and any
* copying, reproduction, redistribution, dissemination, modification, or
* other use, in w... |
import 'package:dartz/dartz.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:numbers/features/numbers_trivia/domain/entities/number_trivia.dart';
import 'package:numbers/features/numbers_trivia/domain/repositories/n... |
import 'package:flutter/material.dart';
import 'package:flutter_crud/models/user.dart';
import 'package:provider/provider.dart';
import 'package:provider/single_child_widget.dart';
import '../providers/users.dart';
class UserForm extends StatelessWidget{
final _form = GlobalKey<FormState>();
final Map<String?, Str... |
{% extends "base.html" %} {% load staticfiles %} {% block content %}
<!--/#header-->
<section id="page-breadcrumb">
<div class="vertical-center sun">
<div class="container">
<div class="row">
<div class="action">
<div class="col-sm-12">
<strong><h1 class="title wow fadeInLeft">... |
import {
Android,
Email,
GitHub,
LinkedIn,
ViewQuilt,
Web,
} from "@mui/icons-material";
import { motion } from "framer-motion";
import React from "react";
import { Link } from "react-router-dom";
const myServices = [
{
image: <Web sx={{ color: "#3cefab" }} />,
title: "Web Development",
descr... |
body {
font-family: "Lato", sans-serif;
/* font is inherit by child tags. More efficient then use the universal selector */
font-weight: 400;
/*font-size: 16px;*/
/* Remove . Now we are using 10px root font-size*/
line-height: 1.7;
color: $color-grey-dark;
}
.heading-primary {
color: $c... |
<?php
$args = array(
'posts_per_page' => 3,
'orderby' => 'date',
'order' => 'DESC',
'post_status' => 'publish'
);
$posts = new WP_Query($args);
if ($posts->have_posts()) : ?>
<section class="grid-posts latest-posts">
<div class="container">
<h2 class="section-title">
... |
import { prismaPG } from '@/config';
import faker from '@faker-js/faker';
async function createFoodType() {
const foodType = await prismaPG.productTypes.create({
data: {
name: 'foods',
},
});
return foodType;
}
async function createCategories(typeId: number) {
await prismaPG.productCategories.c... |
import { acceptHMRUpdate, defineStore } from 'pinia'
import { shallowRef, ShallowRef } from 'vue'
import useMvtStyles from '@/composables/mvt-styles/mvt-styles.composable'
import type { LayerId } from '@/stores/map.store.model'
import {
IMvtConfig,
SimpleStyle,
StyleItem,
VectorSourceDict,
VectorStyleDict,
... |
// ** Next Imports
import Head from 'next/head'
import { Router } from 'next/router'
// ** Loader Import
import NProgress from 'nprogress'
// ** Emotion Imports
import { CacheProvider } from '@emotion/react'
// ** Config Imports
import themeConfig from 'src/configs/themeConfig'
// ** Component Imports
import UserLa... |
# Functions for sourcing
# Calculate parameters
# takes input from GUI
# returns vector with calculated parameters
CalculateParameters <- function (d, S.plus, q) {
p <- 2*d # resilience parameter
k <- (p * S.plus)/q
h <- p*S.plus
b <- (2*d)/q
return(c(p, k, h, b))
}
... |
### How community forest management performs when REDD+ payments fail [supplemental]
### Data management of Pemba forest cover observations,
### followed by sign test of the matching estimator for ATET,
### as described in Ferman (2021) J. of Econometrics.
### SECTION 0: DATA MANAGEMENT
### SECTION 1: SPATIAL PREDI... |
// Definimos las carreras disponibles para inscribirse
const carreras = [
new Carrera(1, "Analista en Sistemas de Computación"),
new Carrera(2, "Tec. Universitaria en celulosa y Papel"),
new Carrera(3, "Tec. Universitaria en Tecnologías de la Información"),
new Carrera(4, "Bioquímica"),
new Carrera(5, "Farmac... |
using Microsoft.EntityFrameworkCore;
using Practice.Domain;
using System;
namespace Practice.Persistence
{
public class PracticeDbContext : DbContext
{
public PracticeDbContext(DbContextOptions<PracticeDbContext> options) : base(options)
{
}
public DbSet<Course> Courses { get;... |
<script>
import $ from 'jquery'
import About from './components/About.vue';
import NewIncident from './components/NewIncident.vue';
//npm run dev -- --port 8000 <-to run the server
//npm run build <-to make the actual files we will turn in
//------------------------TODO------------------------------... |
var http = require('http');
var fs = require('fs');
var url = require('url'); //url이라는 모듈을 사용할 것이다.
var qs = require('querystring');
var template = require('./lib/template.js');
var path = require('path');
var sanitizeHTML = require('sanitize-html');
//아래 template을 모듈로 빼고 (lib/template.js) 받아서 활용~
/* var template = {... |
import os
import cv2
import numpy as np
from itertools import product
import matplotlib.pyplot as plt
def load_images(directory, before):
images = {}
for filename in os.listdir(directory):
if filename.endswith(('.jpg', '.jpeg', '.png', '.tiff', '.tif')):
img_path = os.path.join(directory, f... |
## Two Sum
### Description
```Python
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[... |
import { AppThunk } from './../index'
import axios from 'axios'
import { Invoice, invoiceTypes } from '../../Types/Invoice'
export interface IAddItem {
type: 'ADD_ITEM'
payload: Invoice
}
export interface IRemoveItem {
type: 'REMOVE_ITEM'
payload: string
}
export interface IRemoveCompleted {
type: ... |
#include "pch.hpp"
#include "Date.h"
#include <chrono>
#include <algorithm>
#include <sstream>
#include <iomanip>
std::string monthToString(Month m)
{
switch (m)
{
case Month::JAN: return "01";
case Month::FEB: return "02";
case Month::MAR: return "03";
case Month::APR: ... |
<template>
<v-container>
<Chart
v-if="loaded"
:chartdata="objeto"
:options="opciones"/>
</v-container>
</template>
<script>
import Chart from './Chart.vue'
import { mapState } from 'vuex'
export default {
name: "Grafico",
components: { Chart },
data (){
return {
loaded: false,
ob... |
import React, { useEffect } from 'react';
import { LinkContainer } from 'react-router-bootstrap';
import { Table, Button, Row, Col } from 'react-bootstrap';
import { useDispatch, useSelector } from 'react-redux';
import Loader from '../components/Spinner';
import Message from '../components/Message';
import Paginate fr... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Rules Related To 'aide'</title>
<style>
</style>
</head>
<body>
<h1>Rules Related To 'aide'</h1>
<h2>Component overview</h2>
<h3>Relevant packages:</h3>
<ul>
<li>aide</li>
</ul>
<h3>Relevant groups:</h3>
<ul>
<li>aide</li>
... |
{% extends "layout/base.html" %}
{% block title %}Tough Glove | Members {% endblock %}
{% block extra_head %}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icon... |
import React from "react";
import { Button } from "react-bootstrap";
import Classes from "../../styles/Components.module.css";
import { useState } from "react";
import { useEffect } from "react";
import { getRam } from "../../services/ram";
import ramlogo from "../../assests/icons/ram.png"
import { useNavigate } from "... |
//
// ViewController.swift
// UITableView-load-images-Swift-Json
//
// Created by Luccas Santana Marinho on 04/04/22.
//
import UIKit
struct listData {
var name: String
var description: String
var image: UIImage
}
class ViewController: UIViewController {
private lazy var tableView: UITableView = {... |
/*
TaxPayers: Employees, BusinessOwners
Number of child classes will be fixed if we want to use variants
Algebraic Data type(ADT)
Variant is also an ADT.
using variants for runtime polymorphism is called functional polymorphism
*/
#include <iostream>
#include <iomanip>
#include <array>
#includ... |
import modal
app = modal.App('llama')
volume = modal.Volume.from_name("model-store")
model_store_path = "/vol/models"
image = modal.Image.debian_slim().pip_install('transformers', 'torch', 'huggingface-cli', 'accelerate')
@app.function(image=image, volumes={model_store_path: volume}, gpu="l4")
def load_model():
... |
# -*- coding: utf-8 -*-
#!/usr/bin/python
from mininet.net import Mininet
from mininet.node import Controller, OVSSwitch
from mininet.cli import CLI
from mininet.link import TCLink
from mininet.log import setLogLevel
from os import environ
POXDIR = environ[ 'HOME' ] + '/pox'
#Definindo a classe POX para ser utilizada... |
package day07
import (
"fmt"
"testing"
"github.com/google/go-cmp/cmp"
)
func TestDetermineHandType(t *testing.T) {
tests := []struct {
label string
input []int
want handType
}{
{
label: "QQQQQ",
input: []int{11, 11, 11, 11, 11},
want: FiveOfAKind,
},
{
label: "99992",
input: []int{8... |
import React from 'react'
import './services.css'
import OrangeJuice from '../../assets/orange-juice.svg'
import Chef from '../../assets/chef.svg'
import Restaurant from '../../assets/restaurant.svg'
import ServiceCard from '../../components/ServiceCard'
const data = [
{
id : 1,
icon : OrangeJuice... |
package ch.epfl.bluebrain.nexus.delta.sdk.schemas
import cats.effect.{Clock, IO}
import cats.syntax.all._
import ch.epfl.bluebrain.nexus.delta.kernel.kamon.KamonMetricComponent
import ch.epfl.bluebrain.nexus.delta.kernel.utils.UUIDF
import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri
import ch.epfl.bluebrain.nexus... |
/* eslint-disable @typescript-eslint/no-explicit-any */
import {
FullClassDefinition, Scope, MethodDefinition, PropertyDefinition, ReadOnlyPropertyDefinition,
ClassDefinition, GetScopedMembersFrom, VariableDefinition, FullMemberDefinition, MemberDefinition
} from './models';
import { AnyObject } from 'anux-common';... |
from collections.abc import Iterable
from django.db import models
from django.core.validators import MinLengthValidator
from django.utils.text import slugify
# Create your models here.
class Band(models.Model):
name = models.CharField(max_length=255)
slug = models.SlugField(max_length=255, blank=True, unique=... |
class Settings():
"""Класс хранения настроек игры."""
def __init__(self):
"""Инициализация настроек игры."""
self.screen_width = 1200
self.screen_heigh = 800
self.bg_color = (230, 230, 230)
self.ship_speed = 2
self.ship_limit = 3
self.alien_speed = 1.0
... |
import React, { useState } from "react";
const TicTacToe = () => {
const [board, setBoard] = useState(Array(9).fill(null));
const [player, setPlayer] = useState("X");
const [winner, setWinner] = useState(null);
const handleClick = (index) => {
if (winner) return;
if (board[index]) return;
const n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.