text stringlengths 184 4.48M |
|---|
<?php
namespace littlemissrobot\craftsearchable;
use Craft;
use craft\base\Plugin as BasePlugin;
use craft\events\RegisterUserPermissionsEvent;
use craft\events\TemplateEvent;
use craft\services\UserPermissions;
use craft\web\View;
use yii\base\Event;
/**
* Searchable plugin
*
* @method static Plugin getInstance... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--Website title and icon image-->
<title>Twitter Clone</title>
<link rel="icon" href="logo.png" type="ima... |
import axios from 'axios'
import { Prettify } from '../types'
import createHooks from './createHooks'
import { HTTPOptions } from './types.t'
import { httpDefaultConfig } from '../config'
import createBaseMethods from './createMethods'
/**
*
* @param options - This is the config of axios and 'formatError' and 'forma... |
@RestResource(urlMapping ='/MyRestClassEP/*')
Global class MyRestClass
{
@httpGet
global static void getData(){
RestRequest req = Restcontext.request; // to handle the request we created this restrequest instance from extenal site
// Restcontext.request; we are storing the request from third p... |
from magpie import MagpieModel
from sklearn import metrics
from sklearn.preprocessing import LabelEncoder
from glob import glob
import logging
import os
log = logging.getLogger(__name__)
class Predict:
def __init__(self, config):
self.config = config
embeddings_path = os.path.join(self.config["sa... |
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of ... |
package com.dx.facade.merchant.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.dx.facade.common.PageRequest;
@Data
@ApiModel(value="查询德州操作记录入参", description="查询德州操作记录入参")
public class DzCardLogParamReqDTO extends PageRequest {
@ApiModelP... |
<!DOCTYPE HTML>
<html lang="">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pattern editor</title>
<style>
body {
margin: 0px;
padding: 0px;
}
canvas {
background-color: #fff;
width: 640px;... |
## 题目描述
最近 n+e 发现了一个好玩的游戏,他打算和萌妹子们一起来玩,以便在玩的过程中他们可以谈笑风生。这个游戏的规则十分简单,因此妹子萌也很愿意玩:最开始 n+e 有 $m$ 张牌,妹子萌有 $n$ 张牌,并且还有一张牌盖在桌子上。因此,在最开始有 $n+m+1$ 张牌。除此之外,游戏的玩家知道所有牌的组成,也就是他们知道这些牌都是什么,玩家们也能看见自己的牌,当然玩家们是看不见对方的牌和桌子上的牌的。现在 n+e 和妹子萌轮流玩游戏,从 n+e 先开始。在每一个回合,他们可以干这两件事中的一件:
1. 猜测桌子上的牌是什么。如果猜对,那么这个玩家获胜,游戏结束。如果猜错,游戏同样结束,不过对方获胜;
2. 指定一张牌... |
'use client';
import React, { useEffect } from 'react';
import styles from './orders.module.css';
import { useGetVentasQuery } from '../../../redux/services/ventasApi';
import Link from 'next/link';
function Page() {
const { data, refetch } = useGetVentasQuery(null);
const ventas = data?.result;
useEffect(() => ... |
<!DOCTYPE html>
<html>
<div class="container">
<app-header></app-header>
<div class="signup-container">
<div class="title-container">
<h2>Konto Erstellen</h2>
<img src="assets\img\studylink_II_logo.svg" alt="Logo">
</div>
<form [formGroup]="loginForm" (keydown.enter)="dir... |
import { HttpErrorResponse } from '@angular/common/http';
import { Component, Input } from '@angular/core';
import { FormControl } from '@angular/forms';
import { MatDatepicker } from '@angular/material/datepicker';
import { MatDialog } from '@angular/material/dialog';
import {
ChartConfiguration,
ChartData,
Char... |
/*
Section 2
Roll No. - 22CS30016
Name - Omkar Vijay Bhandare
Assignment No. - 08
Description - Matrices and Structure
*/
#include<stdio.h>
#include<stdlib.h>
struct matrix
{
int **ptr
}a,b,c;
void readMatrix(int a[][10], int m, int n)
{
for(int i=0; i<m; i++)
{
for(int j=0; j<n; j++)
{
... |
<div class="container" id="factura" #factura>
<div class="card">
<div class="card-body">
<div id="invoice">
<div class="invoice overflow-auto">
<div style="min-width: 600px">
<header>
<div cl... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FireGun : MonoBehaviour, IItem
{
public ParticleSystem fireParticleSystem;
private Color fireColor = Color.red;
private bool isShooting = false;
private bool isHeld = false;
private Rigidbody rb;
privat... |
import axios from "axios";
import { useState, useEffect } from "react";
import { BsArchive, BsFile } from "react-icons/bs";
import { toast } from "react-toastify";
import AdminLayout from "../../../src/components/admin/AdminLayout";
import styles from "../../../styles/admin/Facility.module.css";
import { Input, Loader ... |
package vn.edu.iuh.fit.Back_End.entities;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import jakarta.persistence.*;
import vn.edu.iuh.fit.Back_End.enums.EmployeeStatus;
import java.io.S... |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package astutil contains common utilities for working with the Go AST.
package astutil // import "llvm.org/llgo/third_party/gotools/go/ast/astutil"
import (... |
package Day02
import println
import readInput
fun main() {
fun List<String>.findMaxValueOfColor(color: String): Int {
return this.filter { it.contains(color) }.maxOf { it.replace(color, "").toInt() }
}
fun part1(input: List<String>): Int {
return input.map {
it.replace(" ", "... |
<template>
<div class="container">
<div class="card">
<div class="card-header">
<h3>Editar Funcionário</h3>
</div>
<div class="card-body">
<form v-on:submit.prevent="updateFormEmployee()">
<div class="form-group">
... |
use std::f32::consts::FRAC_PI_2;
use ambient_api::{
core::{
ecs::components::{children, parent},
physics::concepts::make_character_controller,
player::components::is_player,
prefab::components::prefab_from_url,
transform::{
components::{local_to_parent, local_to_... |
package com.ecureuill.rpgbattle.application.services;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import org.springframework.stereotype.Service;
import org.springframework.util.MultiValueMap;
import com.ecureuill.rpgbattle.appli... |
# Shop Keeper example
This project is a short simple example of test driven example in the context of games development.
It was designed to be used as part of an example for presentations/talks for educational purposes to encourage people to learn the practice.
**This project is coded in C# using the Rider platform an... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Grafo de Red Dinámico</title>
<script src="https://d3js.org/d3.v6.min.js"></script>
</head>
<body>
<svg id="grafico"></svg>
<script>
const nodos = [
{ id: 0, cercania: 1 },
{ id: 1, cercania: 2 },
{ id: 2, cercania: 3 },
... |
# Writer
The writer takes your token collection and writes them to the disk.
Theemo can write to multiple `targets`, like so:
```ts
import { styleDictionaryWriter } from '@theemo/style-dictionary';
import { defineConfig } from '@theemo/cli';
export default defineConfig({
sync: {
writer: {
targets: styleD... |
<!DOCTYPE html>
<html>
<!--
WARNING! Make sure that you match all Quasar related
tags to the same version! (Below it's "@2.3.2")
-->
<head>
<!-- <link
href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons"
rel="stylesheet"
type="text/css"
/>... |
require('dotenv').config();
const express = require('express');
const mongoose = require('mongoose');
const helmet = require('helmet');
const cors = require('cors');
const { errors } = require('celebrate');
const { router } = require('./routes/index');
const errorHandler = require('./middlewares/error-handler');
const ... |
/* Copyright 2023 The MediaPipe Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, s... |
/**
* VALUES AND PROMISES
* Please, make sure to read the "05-Values-and-promises.md" file form exercise-info folder
* @task
* Create a function `attachTitle` which follows the requirements:
* * prepends `'DR. '` to its first argument and returns the result.
* Example: export const attachTitle = (arg) => {<Your_c... |
export interface TimeEntryBase {
client: string;
project: string;
title: string;
}
export type TimerStatus = { isRunning: false } | { isRunning: true; entry: TimeEntryBase; runningForMs: number };
export abstract class TimeTracker {
protected _status: TimerStatus = { isRunning: false };
public abstract syncStatu... |
import React from 'react';
import renderer, {act} from 'react-test-renderer';
import StartScreen from '../../src/screens/StartScreen';
import settingsImage from '../../src/assets/settings-cog.png';
let component, settingsButton, settingsDisabled, startButton, text;
describe('Given StartScreen component', () => {
de... |
package com.hrtools.www.service;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hrtools.www.controller.request.DepartmentRequest;
import com.hrtools.www.controller.response.DepartmentResponse;
im... |
/*
* Copyright 2012-2016 Dmitri Pisarenko
*
* WWW: http://altruix.cc
* E-Mail: dp@altruix.co
* Skype: dp118m (voice calls must be scheduled in advance)
*
* Physical address:
*
* 4-i Rostovskii pereulok 2/1/20
* 119121 Moscow
* Russian Federation
*
* This file is part of econsim-tr01.
*
* econsim-tr01 is ... |
import { ProgrammingLanguage } from 'src/constants/programming-languages';
export abstract class RunnableCode {
constructor(
protected readonly identifier: string,
protected readonly programmingLanguage: ProgrammingLanguage,
protected readonly sourceCode: string,
) {}
abstract getFileExtension(): st... |
package com.example.cardealershipapp.web.controller;
import com.example.cardealershipapp.model.Car;
import com.example.cardealershipapp.model.User;
import com.example.cardealershipapp.service.ApplicationService;
import com.example.cardealershipapp.service.CarService;
import com.example.cardealershipapp.service.UserSe... |
import React from 'react';
import {Text, StyleSheet, View, TextInput} from 'react-native';
import { Feather } from '@expo/vector-icons';
const SearchBar = ({term, onTermChange, onTermSubmit}) =>{
return (
<View style = {styles.backgroundStyle}>
<Feather name="search" style = {styles.iconStyle} ... |
package three.stone.algorithm.leetcode;
/**
* Suppose an array of length n sorted in ascending order is rotated between 1 and n times.
* For example, the array nums = [0,1,2,4,5,6,7] might become:
*
* Given the sorted rotated array nums of unique elements, return the minimum element of this array.
*
* You must w... |
package urlProcessor;
import org.junit.Test;
import migrator.BlogType;
import urlprocessor.UrlProcessor;
import static org.junit.Assert.assertEquals;
public class UrlProcessorTest {
UrlProcessor urlProcessor = new UrlProcessor();
String naverRawUrl1 = "https://blog.naver.com/jhi990823/222848946417";
Stri... |
#!/usr/bin/env node
import { createReadStream } from "fs";
import { parse } from "fast-csv";
import { resolve as pathResolve } from "path";
import { StringCSVHeaders } from "./types/csv.types";
import { parseCSVValues } from "./helpers/csv-value-parser";
import { mutateGeojsonValues } from "./helpers/geojson-to-strin... |
/* Simulopolis
* Copyright (C) 2018 Pierre Vigier
*
* 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.
*
* This pro... |
Prácticas para desarrolladores
******************************
Instalación .[#toc-installation]
La mejor manera de instalar Latte es utilizar un Compositor:
```shell
composer require latte/latte
```
Versiones PHP soportadas (se aplica a las últimas versiones del parche Latte):
| versión | compatible con PHP
|---... |
import { getOnCaretMoveEvents } from "@/src/app/components/recipe/steps/step/description/ContentEditable/getCaretMoveEvents";
import { getCaretPosition } from "@/src/app/components/recipe/steps/step/description/ContentEditable/getCaretPosition";
import userEvent from "@testing-library/user-event";
import { test, expect... |
<!DOCTYPE html>
<html>
<head>
<title>iTWATCHER API</title>
<!-- Add your CSS and JS files here -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'styles.css' %}">
<scri... |
import 'package:e_racing_app/core/ext/access_extension.dart';
import 'package:e_racing_app/core/model/classes_model.dart';
import 'package:e_racing_app/core/model/team_model.dart';
import 'package:e_racing_app/core/tools/session.dart';
import 'package:e_racing_app/core/ui/component/state/loading_shimmer.dart';
import '... |
import { computed, defineComponent, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import type { PropType, Ref, ComputedRef } from 'vue';
import { Table as ATable, type TablePaginationConfig } from 'ant-design-vue';
import { usePaginationConfig } from './hooks/tableHooks';
import { deepClone, inDevMode ... |
<template>
<div>
<div class="d-flex justify-content-center table-wrap ">
<!-- <div class="per-page bg-dark rounded-top d-flex align-items-center px-3 justify-content-end">
<div class="wrap-select d-flex">
<p class="text-select">Per page</p>
<select v-model="todosPerPage" class... |
import db from "../db/conn.mjs";
import { ObjectId } from "mongodb";
const getUsers = async (req, res) => {
try {
const users = await db.users
.find()
.project({ password: 0 })
.sort({ username: 1 })
.toArray(); // Fetch only username and _id fields
console.log(users);
res.status(... |
package com.gs.cache.config;
import com.gs.cache.CacheProxy;
import com.gs.cache.impl.LocalCacheProxyImpl;
import com.gs.cache.impl.RedisCacheProxyImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org... |
---
title: Personnaliser l'étiquette des données du graphique
linktitle: Personnaliser l'étiquette des données du graphique
second_title: API de traitement de documents Aspose.Words
description: Découvrez comment ajouter et personnaliser des étiquettes de données dans un graphique à l'aide d'Aspose.Words for .NET pour ... |
package org.example.Others;
/**
* Represents an item type in the inventory.
*/
public class ItemType {
Integer itemTypeID;
String itemTypeName;
Integer totalItems; // Total items of this type
/**
* Constructs an ItemType object with the specified attributes.
* @param itemTypeID The ID of t... |
<!DOCTYPE html>
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns="http://www.w3.org/1999/html" xmlns:sec="http://www.w3.org/1999/xhtml">
<head th:insert="fragments/fragments :: head-content">
</head>
<body>
<nav th:insert="fragments/fragments :: nav-bar-fragment(${user})">
</nav>
<div class="user-i... |
import { Button, Icon, useColorModeValue } from "@chakra-ui/react";
import { IconType } from "react-icons";
interface ExternalLinkProps {
href: string;
title: string;
solid?: boolean;
icon?: IconType;
}
export const ExternalLink = ({
href,
title,
solid: main,
icon,
}: ExternalLinkProps) => {
let but... |
package algorithm.dfs.boj_4963_섬의_개수;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.StringTokenizer;
public class Main {
static ... |
open Globals;
open LetOps;
open StakerHelpers;
open Mocha;
let test =
(
~contracts: ref(Helpers.coreContracts),
~accounts: ref(array(Ethers.Wallet.t)),
) => {
describe("_stake", () => {
let token = Helpers.randomAddress();
let (userAmountStaked, userAmountToStake) =
Helpers.Tuple.ma... |
import React from "react";
import { Pie } from "react-chartjs-2";
import { Chart, registerables } from "chart.js";
Chart.register(...registerables);
const PieChart = () => {
const state = {
labels: [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Su... |
<script setup lang="ts">
definePageMeta({
middleware: 'shop-owner'
})
const file = ref()
const BASE_URL = 'https://localhost:7124'
const authStore = useAuthStore()
const userId = computed(() => authStore.user.id)
const marketName = ref()
const isDragging = ref(false)
const toast = useToast()
async function submi... |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:sm_bloc_cubit/Business_logic/cubit/counter_cubit.dart';
import '../../Business_logic/cubit/counter_state.dart';
class SecondScreen extends StatelessWidget {
const SecondScreen({Key? key}) : super(key: key);
@... |
from django.contrib.syndication.views import Feed
from .models import Post
class AllPostsRssFeed(Feed):
# 显示在聚合阅读器的标签
title = "黑与白的个人博客网站"
# 通过聚合阅读器跳转到网站的地址
link = "/"
# 显示在聚合阅读器上的描述信息
description = "关于黑与白的全部文章"
# 需要显示的内容条目
def items(self):
return Post.objects.all()
# 聚合器... |
package com.example.myhearing
import android.Manifest
import android.app.AlertDialog
import android.content.BroadcastReceiver
import android.content.Context
import android.content.DialogInterface
import android.content.Intent
import android.content.IntentFilter
import android.content.SharedPreferences
import android.c... |
import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:google_fonts/google_fonts.dart';
class LoginScreen extends StatefulWidget {
final VoidCallback displayRegisterScreen;
const LoginScreen({Key? key, required this.displayRegisterScreen})
: super(key: key)... |
import 'package:flutter/material.dart';
import 'package:world_time_app/style/colors.dart';
import 'package:world_time_app/services/world_time.dart';
import 'package:http/http.dart';
import 'dart:convert'; // for converting JSON
import 'package:flutter_spinkit/flutter_spinkit.dart';
class Loading extends StatefulWidget... |
import React, { useState } from "react";
import { accordionData } from "../../accordionData";
import "../../accordion.css";
const Accordion = ({ defaultActiveKey, collapsible = true }) => {
const [activeAccordionItem, setActiveAccordionItem] =
useState(defaultActiveKey);
return (
<div className="accordion... |
import { zodResolver } from '@hookform/resolvers/zod';
import { useEffect } from 'react';
import { useForm } from 'react-hook-form';
import { Form } from '@/components/ui/form';
import {
type DateFieldPropertiesSchema,
dateFieldPropertiesSchema,
} from '@/lib/validations/dateFieldPropertiesSchema';
import { useBou... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
import { Component, OnInit, OnDestroy } from '@angular/core';
import Swal from 'sweetalert2';
import { Usuario } from '../../../models/usuario.model';
import { BusquedaService } from '../../../services/busqueda.service';
import { ModalImagenService } from 'src/app/services/modal-imagen.service';
import { UsuarioServi... |
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>Challenge - Encriptador</title>
<link rel="stylesheet" type="text/css" href="reset.css">
<link rel="stylesheet" type="text/css" href="style-enc.css">
</head>
<body>
<header>
<div class="caja">
<h1> Encriptador y desencriptador ... |
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Includes() Método String</title>
</head>
<body>
<script>
/**
* * STRING JAVASCRIPT I... |
#' Estimate a survey-weighted ROC curve
#'
#' @param design survey.design object specifying the complex survey design
#' @param prediction character value specifying the name of the variable containing the predicted value
#' @param label character value specifying the name of the binary response encoded 0 (control) and... |
<template>
<div class="allContainer">
<!-- アイコン 始まり -->
<section class="icon">
<h1 class="profileTitle">アイコン</h1>
<div class="icon_Container">
<img class="icon_Container_user" :src="inputUserImage" />
</div>
</section>
<!-- アイコン 終わり -->
<!-- ユーザーネーム 始まり -->
<section ... |
<?php namespace Acioina\UserManagement\Http\Controllers;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Mime\MimeTypes;
use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Illuminate\Support\Arr;
/**
* Class Reso... |
package main
import "fmt"
//现在你总共有 numCourses 门课需要选,记为 0 到 numCourses - 1。给你一个数组 prerequisites ,其中
//prerequisites[i] = [ai, bi] ,表示在选修课程 ai 前 必须 先选修 bi 。
//
//
// 例如,想要学习课程 0 ,你需要先完成课程 1 ,我们用一个匹配来表示:[0,1] 。
//
//
// 返回你为了学完所有课程所安排的学习顺序。可能会有多个正确的顺序,你只要返回 任意一种 就可以了。如果不可能完成所有课程,返回 一个空数组 。
//
//
//
// 示例 1:
//
//
//输入:n... |
import React, { Fragment } from "react";
import useVisualMode from "../../hooks/useVisualMode";
import "./styles.scss";
import Header from "./Header";
import Show from "./Show";
import Empty from "./Empty";
import Form from "./Form";
import Status from "./Status";
import Confirm from "./Confirm";
import Error from "./E... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="format-detection" content="email=no,telephone=no,address=no">
<title>=^.^=</title>
<style>
body {margin: 0;}
</style>
</head>
<body>
<div style="position: absolute; color: #fff">
<labe... |
package org.example;
/*-------------------------------------*/
/* SID: 2267684 - TEAM: TECH ACHIEVERS */
/*-------------------------------------*/
import java.io.*;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
public class RegistrationManager {
// Define private fields to store user... |
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>jhkimblog - main index</title>
<th:block th:replace="... |
import React, { useState } from 'react';
import { useForm } from "react-hook-form";
import { yupResolver } from '@hookform/resolvers/yup';
import * as yup from "yup";
import { useNavigate } from 'react-router-dom'
import { Alert, Avatar, Box, Button, Container, CssBaseline, Grid, Link, TextField, Typography } from '@mu... |
const path = require('path');
// 운영체제 마다 표현되는 경로가 다름
console.log(__dirname);
console.log(__filename);
console.log(path.sep); // 경로 구분자
console.log(path.delimiter); // 환경변수 구분자
// basename
console.log(path.basename(__filename));
console.log(path.basename(__filename, '.js'));
// dirname
console.log(path.dirname(__fil... |
import { html, render } from 'lit';
import type { LifeCycleFn } from 'single-spa';
// Ideally these types and the getMountPoint function would be factored into some shared JavaScript
// package.
type CustomAppProps = {
appBaseUri: string;
};
type MicroFrontendLifecycleFn = LifeCycleFn<CustomAppProps>;
function ge... |
1. **You**: I want my shopping cart that when I click on it opens on the left side of the page like other online store sites such as skatedeluxe
2. **ChatGPT**: To create a shopping cart that opens on the left side of the page when clicked, you'll need to use HTML, CSS, and JavaScript. Here's a step-by-step guide on ... |
const express = require('express');
const Razorpay = require('razorpay');
const cors = require('cors');
const crypto = require('crypto')
const bodyParser = require('body-parser');
const nodemailer = require('nodemailer')
require("dotenv").config();
const app = express();
const PORT = process.env.PORT || '8000';
app... |
import logging
from fastapi import Request
from telegram import Update, Bot
from telegram.ext import Application, CallbackContext, CommandHandler
from configs import config
from handlers import all_handlers
from registries import config_registry
logger = logging.getLogger(__name__)
async def start(update: Update,... |
import React from "react";
import prdList from "./data.json";
import ProductList from "./ProductList";
import ProductDetail from "./ProductDetail";
import { useState } from "react";
import Cart from "./Cart";
const BTShoeShop = () => {
const [productDetail, setProductDetail] = useState(prdList[0]);
const [carts, se... |
---
title: Learn HTML.
permalink: learn-html/index.html
message: "I love your website but looking at the markup makes me sad. Please (re)learn HTML and make the web a better place."
num: 1
---
Wait! Hear me out! I know that you can write HTML, but there’s a difference between understanding the language and being able t... |
---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Date.prototype.setMinutes()
The **`setMinutes()`** method sets the minutes for a specified
date according to local time.
## Syntax
```js
setMinutes(minutesValue)
setMinutes(minutesValue, secondsValue)
setMinutes(min... |
from abc import ABCMeta, abstractmethod
class Appliance(metaclass=ABCMeta):
@abstractmethod
def enabled(self):
pass
@abstractmethod
def start(self):
pass
@abstractmethod
def stop(self):
pass
class AC(Appliance):
def __init__(self):
self.enabled = False
... |
const User = require("../models/User"); // can be written as
// import User from "../models/User";
const jwt = require("jsonwebtoken"); // to be used for signup
// handle errors
const handleErrors = (err) => {
console.log(err.message, err.code);
let errors = { email: '', password: '' };
// duplicate email error... |
class Cart {
constructor() {
this.items = [];
}
add(product) {
this.items.push(product);
}
remove(productId) {
this.items = this.items.filter(item => item.id !== productId);
}
clear() {
this.items = [];
}
getTotal() {
return this.items.redu... |
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import Navbar from "@/components/Navbar";
import { Provider } from "react-redux";
import ReduxProvider from "@/redux/ReduxProvider";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
... |
import "./topbar.css"
import React ,{useContext} from 'react';
import { Link } from "react-router-dom";
import {Context} from "../../context/Context";
export default function TopBar() {
const {user,dispatch}= useContext(Context);
const handleLogout= ()=>{
dispatch({type:"LOGOUT"});
};
const PF=... |
//
// ViewController.swift
// MyInstaImagePicker
//
// Created by 구태호 on 2022/07/17.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var btMake: UIButton!
@IBOutlet weak var btCenter: UIButton!
@IBOutlet weak var btSize: UIButton!
// imageView 들을 담을 배열
private ... |
---
tags: [operating-system]
---
# Pipe
Pipe provides a one-way stream (no data size examination) flow of data, where
the output of a process is directed into the input of another, which can be
created using `pipe()` #[Unix System Call](202210062303.md). Pass in a file
descriptor array (of type `int`) with a size of ... |
import React, { useEffect, useState } from 'react';
import { useLocation, Link, NavLink } from 'react-router-dom';
import { useMediaQuery } from 'react-responsive';
import { useStyleContext } from '../components/StyleContext';
import Box from '../components/Box';
import logo from '../assets/images/logo.webp';
const H... |
% This program calculates approximate solutions to the
% Functionalized Cahn-Hilliard (FCH) equation using a first-order
% IMEX scheme, with stabilization. The method was designed by Chen
% and Shen in the paper
%
% Feng Chen, Jie Shen, "Efficient spectral-Galerkin methods for
% systems of coupled second-order equ... |
namespace com.linkedin.policy
import com.linkedin.common.Urn
import com.linkedin.ownership.OwnershipTypeInfo
/**
* Information used to filter DataHub actors.
*/
record DataHubActorFilter {
/**
* A specific set of users to apply the policy to (disjunctive)
*/
users: optional array[Urn]
/**
* A speci... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strmapi.c :+: :+: :+: ... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Timesheet Calculator</title>
<link rel="stylesheet" href="assets/styles/bulma.min.css"/>
<link rel="icon" type="image/png" href="assets/images/favicomatic/favicon-32x32.png" sizes="32x32"/>
<link rel="icon" type="image/png" href="... |
#ifndef OOP_CARTE_H
#define OOP_CARTE_H
#include <iostream>
#include <string>
#include <memory>
#include <ctime>
#include "EroareCarte.h"
class Carte {
protected:
std::string numeCarte;
std::string gen;
int anAparitie;
bool disponibilitate = true;
public:
Carte() = default;
Carte(const std::... |
import { COMPUTED_PATH } from "../const";
import { computed } from "../inline";
import { getObserver, getObservers } from "../utils";
/**
* @description `Computed` is a property decorator.
* Changes in computed state values are also recognized according to changes in observers used within the getter function.
* Yo... |
use std::sync::Arc;
use async_trait::async_trait;
use lazy_static::lazy_static;
use tokio::sync::Mutex as AsyncMutex;
use crate::account_deck::service::account_deck_service::AccountDeckService;
use crate::account_deck::service::account_deck_service_impl::AccountDeckServiceImpl;
use crate::account_deck_card::controller... |
import React, { useState, useEffect } from "react";
import { useNavigate } from "react-router-dom";
import styled from "styled-components";
import Button from "react-bootstrap/Button";
import Form from "react-bootstrap/Form";
import editar from "../../images/editar.png";
import HeaderComponents from "../Headers/Head... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.