text stringlengths 184 4.48M |
|---|
/**
* @param {Function} fn
* @return {Function}
*/
var curry = function(fn) {
return function curried() {
if (arguments.length >= fn.length) {
return fn(...arguments);
} else {
return (...nextArgs) => curried(...arguments, ...nextArgs);
}
};
};
/**
* function... |
import React, {useEffect, useState} from "react";
import {workingHoursCreate, workingHoursGet} from "../../../../http.js";
import Text from "../../components/Text.jsx";
import Button from "../Button.jsx";
import {hourFormat, parsed} from "../../../../hours.js";
export default function Hours({}) {
const [hours, setHo... |
<%@page import="java.sql.PreparedStatement"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%@page import="java.sql.Connection" %>
<%@page impor... |
from flask_wtf import FlaskForm
from wtforms import StringField,PasswordField,BooleanField,SubmitField
from wtforms.validators import InputRequired,Email,EqualTo
from ..models import User
from wtforms import ValidationError
class RegistrationForm(FlaskForm):
email = StringField('Email Address',validators=[InputRe... |
<template>
<img :src="`/img/${intro.icon}`" :alt="intro.title" class="intro__icon" />
<div class="intro__wrapper">
<picture>
<source
media="(max-width: 768px)"
:srcset="`/img/${intro.img[0]}/Mobile/${intro.img[1]}.webp`"
type="image/webp"
/>
<source
media="(min-... |
import { useState } from 'react';
import Navbar from './Navbar';
import Body from './Body'
import Alert from './Alert';
export default function Home() {
const [mode, setMode] = useState('gray-100')
const [alert, setAlert] = useState(null)
const showAlert = (massege) => {
setAlert({
msg : ma... |
<?php
namespace App\Filament\Resources\ResolveLogResource\Widgets;
use App\Models\ResolveLog;
use Filament\Widgets\ChartWidget;
use Illuminate\Support\Facades\DB;
class DnsRequestsByStatus extends ChartWidget
{
protected static ?string $heading = 'DNS Requests by Status';
protected function getData(): array... |
t <- readRDS("data/derived/fia_trees.rds") %>%
mutate(tree_id = paste(subplot_id, designcd, tree))
s <- readRDS("data/derived/fia_seedlings.rds")
sp <- 318 # sugar maple
# identify (sub?)plots surveyed in 2+ years under same designcd
p <- bind_rows(t, s) %>%
select(plot_id, lon, lat, invyr, spcd, designcd) ... |
package org.kiwiproject.dropwizard.jakarta.xml.ws;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import io.dropwizar... |
# Python Programming: A Brain-Friendly Guide to Object-Oriented Programming
Welcome to the world of Python programming! In this guide, we'll explore the fascinating world of Object-Oriented Programming (OOP) in Python. Whether you're a beginner or a seasoned programmer, Python's simplicity and versatility make it an a... |
//
// RecruitItems.swift
// Task
//
// Created by trost.jk on 2022/09/16.
//
import Foundation
// MARK: - RecruitItems
struct RecruitItems: ModelType {
let recruitItems: [RecruitItem]
enum CodingKeys: String, CodingKey {
case recruitItems = "recruit_items"
}
}
// MARK: - RecruitItem
struct Re... |
// app.service.ts
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import * as OktaAuth from '@okta/okta-auth-js';
@Injectable()
export class OktaAuthService {
oktaAuth = new OktaAuth({
url: 'https://dev-256664.okta.com',
clientId: '{clientId}',
issuer: 'https://dev... |
<?php
namespace App\Providers;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider
{
/*... |
package com.recipe.search.ui.view.auth.login
import android.app.AlertDialog
import android.content.Intent
import android.os.Bundle
import android.text.method.HideReturnsTransformationMethod
import android.text.method.PasswordTransformationMethod
import android.view.View
import android.widget.ImageView
import com.recip... |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# 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 applicabl... |
import React, { useState, useEffect, useContext } from 'react';
import axios from 'axios';
import { useNavigate } from 'react-router-dom';
import { toast } from 'react-toastify';
import { Input, Select, Button } from 'antd';
import { AuthContext } from "../context/auth.context";
import "./CreatePlaylist.css"
const { Op... |
# Getting Started
# Mi Proyecto Spring Boot con H2
Este es un proyecto de ejemplo que utiliza Spring Boot y H2.
## Requisitos
- Java 8 o superior
- Gradle
## Configuración
El proyecto está configurado para utilizar una base de datos H2 en memoria. La configuración de la base de datos se encuentra en el archivo `s... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.translateFiles = void 0;
const fs_1 = __importDefault(require("fs"));
const translateFile_1 = re... |
package com.study.config;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.LocaleResolver;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Locale;
public class MyLocaleResolver implements LocaleResolver {
//解析请求
... |
using System;
using UnityEngine;
namespace Cosmos.Scene
{
public interface ISceneManager : IModuleManager, IModuleInstance
{
/// <summary>
/// 异步加载场景;
/// </summary>
/// <param name="sceneInfo">场景信息</param>
/// <param name="callback">加载完毕后的回调</param>
/// <return... |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:widget_app/api_repository/home_repository.dart';
import 'package:widget_app/bloc/home/home_bloc.dart';
import 'package:widget_app/bloc/home/home_event.dart';
im... |
import {
ReactNode,
createContext,
useState,
useContext,
useEffect,
} from "react";
import { UserContext } from "./UserContext";
import { DonationContext } from "./DonationContext";
import api from "../services/api";
import { IDonation } from "../interfaces/donations.interface";
import {
// IAllDataDonation... |
import React, { useEffect } from 'react';
import './main.css';
import { Link, useNavigate } from 'react-router-dom';
import { HiOutlineLocationMarker } from 'react-icons/hi';
import { BsClipboardCheck } from 'react-icons/bs';
import { MdLanguage } from 'react-icons/md';
import Home from '../Home/Home';
import img from... |
========
$natural
========
.. default-domain:: mongodb
Definition
----------
.. operator:: $natural
Use the :operator:`$natural` operator to use :term:`natural order` for
the results of a sort operation. Natural order refers to the logical
:ref:`ordering <return-natural-order>` of documents internally within ... |
Short usage notes on the R4G framework
Format of this file: Long lines (essentially paragraphs), ASCII characters, UNIX line endings.
All symbols of the public interface have a prefix of "r4g". That is short for "Revision Control System, 4th Generation".
All header files of the public interface contain a base-35 U... |
import { type TypedUseSelectorHook, useSelector, useDispatch } from 'react-redux'
import { type Dispatch, type ThunkDispatch, type UnknownAction } from '@reduxjs/toolkit'
import type store from '../Store'
import * as ls from './ls'
export const loadState = (): State => {
try {
const serializedStore = ls.get('YOU... |
import React, {useEffect, useState} from "react";
import requests from "../../services/requests";
import functions from "../../services/functions";
import api_roliste from "../../services/api_roliste";
import {useNavigate} from "react-router-dom";
import axios from "axios";
const Inscription = ({buttonImg}) => {
... |
<!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">
<title>Leader Board</title>
<link rel="stylesheet" href="styles/style.css">
<!-- Font Awesome -->
<scrip... |
import * as React from 'react';
import { toast } from 'react-toastify';
import { Button } from 'semantic-ui-react';
import { openModal } from '../../App/Components/Modals/modalsSlice';
import { useAppDispatch, useAppSelector } from '../../App/Store/hooks';
import {
decrement,
increment,
selectSandboxData,
selec... |
import React from "react";
import Form from 'react-bootstrap/Form'
import Button from 'react-bootstrap/Button'
import dbUtil from "../../utilities/dbUtil";
import { useHistory } from "react-router";
export default function AddMajor(){
let history = useHistory();
const newMajor = {
majorID: "",
... |
import pytest
import os
from django import db
from base64 import b64encode
from rest_framework.test import APIClient
from django.core.management import call_command
current_file_path = os.path.abspath(__file__)
current_dir_path = os.path.dirname(current_file_path)
LOCAL_IMAGE_PATH = 'test_images'
def get_absolute_pa... |
// ----------------------------------------------------------------------------
// Copyright 2023 CEA*
// *Commissariat a l'Energie Atomique et aux Energies Alternatives (CEA)
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file exc... |
import * as _ from 'lodash';
import { Component, ViewEncapsulation, Input, Output, OnInit, TemplateRef, ElementRef, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
import { ThemeType } from '../theme';
import { ITabConfig, ITabEmit } from './tab.interface';
@Component({
selector: `tf-tab`,
templateUr... |
import { Action, ActionPanel, Color, Icon, List, showToast, Toast } from "@raycast/api";
import { useFetch } from "@raycast/utils";
import { useState } from "react";
import {
InstallExtensionByIDAction,
OpenExtensionByIDInBrowserAction,
OpenExtensionByIDInVSCodeAction,
UninstallExtensionByIDAction,
} from "./ex... |
import { render, screen } from '@testing-library/react';
import { createMemoryHistory } from 'history';
import { configureMockStore } from '@jedmao/redux-mock-store';
import { Provider } from 'react-redux';
import HistoryRouter from '../../components/history-router/history-router';
import { AuthorizationStatus } from '... |
# Java 代码面试完全指南(四)
> 原文:[`zh.annas-archive.org/md5/2AD78A4D85DC7F13AC021B920EE60C36`](https://zh.annas-archive.org/md5/2AD78A4D85DC7F13AC021B920EE60C36)
>
> 译者:[飞龙](https://github.com/wizardforcel)
>
> 协议:[CC BY-NC-SA 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/)
# 第十一章:链表和映射
本章涵盖了在编码面试中遇到的涉及映射和链表的最受欢迎的编... |
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'dart:convert';
class VideoDataModel {
String? url;
String? title;
String? siteName;
String? description;
String? mediaType;
String? contentType;
List<dynamic>? images;
List<dynamic>? videos;
List<dynamic>? f... |
@c -*-texinfo-*-
@c
@c GNU libavl - library for manipulation of binary trees.
@c Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Free Software
@c Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.2
@c or any la... |
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms... |
/** @format */
"use client";
import { EmptyBoards } from "./emptyBoards";
import { EmptyFavrt } from "./emptyFavrt";
import { EmptySearch } from "./emptySearch";
import { useQuery } from "convex/react";
import { api } from "@/convex/_generated/api";
import { BoardCard } from "./boardCard";
import { NewBoardBtn } from... |
import { Autocomplete } from "@equinor/eds-core-react";
import { InputAdornment, TextField } from "@material-ui/core";
import React, { useContext, useEffect, useState } from "react";
import OperationContext from "../../contexts/operationContext";
import { HideModalAction } from "../../contexts/operationStateReducer";
i... |
import { h, defineComponent, computed, mergeProps } from "vue";
import "./style";
import { buttonProps } from "./types";
import { pxToVw } from "@moxui/utils/utils";
export default defineComponent({
name: "MoButton",
props: buttonProps,
setup(props, { slots }) {
const buttonTxt = computed(() => {
ret... |
"""
Customtkinter documentation: https://customtkinter.tomschimansky.com/documentation/widgets/button
Appearance: customtkinter
forest-ttk-theme (used for treeview table)
"""
import tkinter as tk
from tkinter import ttk
import customtkinter
import ctypes ... |
IO.puts "Hello World"
# => Hello World
# => :ok
40 + 2
# => 42
"hello" <> " world" # => "hello world"
10 / 2 # => 5.0
div(10, 2) # => 5
rem 10, 3 # => 1
0b1010 # => 10
0b1 # => 1
0b10 # => 2
round 3.58 # => 4
trunc 3.58 # => 3
true == false # => false
is_boolean false # => true
is_boolean 1.0 # => f... |
package tracing
import (
"context"
"fmt"
texporter "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace"
gcppropagator "github.com/GoogleCloudPlatform/opentelemetry-operations-go/propagator"
"go.opentelemetry.io/contrib/detectors/gcp"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/... |
<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>User Centre</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width" />
<base href="/" />
</head>
<link href="/myst... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('customers', function (B... |
//
// OrderView.swift
// PizzaTech
//
// Created by Léon Becker on 11.06.21.
//
import SwiftUI
struct SingleOrderedItemView: View {
@Environment(\.managedObjectContext) var managedObjectContext
let orderedItem: OrderedItem
let item: CatalogGeneralItem?
let numberFormatter = { () -> NumberForma... |
# User Auth (Client-Side)
{% hint style="info" %}
In any situation where you're calling our API with a Niftory AppUser, this is the type of authentication you should use. If you're using your own User system, you can skip this portion of the guide. 
{% endhint %}
To allow your users to sign in, set up their acco... |
// tests/memory_access_tests.rs
#[cfg(test)]
mod tests {
use memorylib::memory;
#[test]
fn test_read_null() {
let null_ptr: *const u8 = std::ptr::null();
assert_eq!(memory::read::<u8>(null_ptr), Err("Null pointer dereference"));
}
#[test]
fn test_write_null() {
let nul... |
# This file is part of pyOCCT which provides Python bindings to the OpenCASCADE
# geometry kernel.
#
# Copyright (C) 2016-2018 Laughlin Research, LLC
# Copyright (C) 2019 Trevor Laughlin and the pyOCCT contributors
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU... |
package parse
import (
"errors"
"go-server-gen/conf"
"go-server-gen/data"
"go-server-gen/utils"
"go-server-gen/writer"
)
func GenServiceCode(layout conf.LayoutConfig, services []data.Service, code map[string]writer.WriteCode) error {
// 全局模板解析,一个idl对应一个文件
for _, tpl := range layout.GlobalTemplate {
writeCode... |
import React, { useContext } from "react";
import classes from "./Navigation.module.css";
import AuthContext from "../../context/auth-context";
const Navigation = (props) => {
//AuthContext를 가리킨다.
//이..이게 더 엘레강트하다....
const ctx = useContext(AuthContext);
//consumer은 자식을 가진다. 인수로 context 데이터를 가져온다. 따라서 이 경우 객... |
package edu.umg.datos;
import edu.umg.domain.Persona;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
public class PersonaDAO {
private Connection conexionTransaccional;
// Constructor
public PersonaDAO() {
}
public PersonaDAO(Connection conexionTransaccional) {
th... |
import { render, screen, fireEvent } from "@testing-library/react";
import "@testing-library/jest-dom";
import FileList from "./FileList";
import { FileListProps } from "./FileList";
const defaultProps: FileListProps = {
files: [],
setFiles: jest.fn(),
orderFiles: [],
setOrderFiles: jest.fn(),
showList: true... |
import React, { useEffect, useState } from "react";
import { AiFillCamera } from "react-icons/ai";
import { NavLink } from "react-router-dom";
import { toast } from "react-toastify";
import axios from "../../../utility/api-instance";
const SourcesCard = () => {
const [numberOfSources, setNumberOfSources] = useState(... |
// JavaScript Basic: Exercise-2 with Solution
/**
*
*
*
*
* Write a JavaScript function to print the contents of the current window.
Sample Solution:
HTML Code:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Print the current page.</title>
</head>
<body>
<p></p>
<p>Click the button to prin... |
#include "userprog/syscall.h"
#include <stdio.h>
#include <syscall-nr.h>
#include "threads/interrupt.h"
#include "threads/thread.h"
#include "threads/loader.h"
#include "userprog/gdt.h"
#include "threads/flags.h"
#include "intrinsic.h"
/* ------ Project 2 ------ */
#include <string.h>
#include "filesys/filesys.h"
#incl... |
const { default: axios } = require('axios');
const express = require('express');
const cors = require('cors');
const app = express();
const port = 3003;
app.use(cors());
const getCryptoData = async () => {
try {
const response = await axios.get(
'https://api.binance.com/api/v3/ticker/24hr'
);
con... |
// Created by Daniele Formichelli.
import Utils
/// https://adventofcode.com/2019/day/18
struct Year2019Day18: DayBase {
func part1(_ input: String) -> CustomDebugStringConvertible {
let status = input.initialStatus(splitMap: false)
var costCache: [Status: Int] = [:]
return self.collect(status: status,... |
<mat-horizontal-stepper>
<mat-step>
<ng-template matStepLabel>Sus productos</ng-template>
<div *ngIf="(products$ | async) as products">
<p *ngIf="products.length === 0">no hay productos</p>
<div class="row" *ngFor="let product of products">
<div class="col-xs-12 col-sm-2 col-md-2">
... |
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from '../../environments/environment';
import { UsuarioService } from './usuario.service';
import { Storage } from '@ionic/storage';
import { RootObject, Visita, VisitaItemsRes } from '../i... |
import { Inject, Injectable } from '@nestjs/common';
import { Wallet } from '../../domain/entities/wallet.entity';
import { CreateWalletDto } from '../../infrastructure/dtos/create-wallet.dto';
import { IWalletRepository } from '../../infrastructure/repositories/wallet-repository.interface';
import { WalletTypes } from... |
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Wild Circus Super Heroes</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonym... |
// Copyright 2014 Thomas E. Vaughan
//
// This file is part of Ulam.
//
// Ulam 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.
//
... |
<%= bob_header 'Overview' %>
<p class='commentable' id="general">
In general, object is the a structure with its own properties (it can carry the data which represents and describes the object) and methods (functions or procedures associated with the object). For example, you may want to have object <code>Server</cod... |
import { useRecoilState } from 'recoil';
import { Switch } from '~/components/ui/Switch';
import useLocalize from '~/hooks/useLocalize';
import store from '~/store';
export default function SendMessageKeyEnter({
onCheckedChange,
}: {
onCheckedChange?: (value: boolean) => void;
}) {
const [enterToSend, setEnterTo... |
import { SubmitHandler, useForm } from 'react-hook-form';
import { BG_COLORS, BG_IMAGES } from '../../const/const';
import { useCreateBoardMutation } from '../../store/reducers/workspace/workspace.api';
import { showErrorToast, showLoadingToast, showSuccessToast } from '../../utils/toast';
import './CreateBoardForm.sc... |
# Raindrops
Welcome to Raindrops on Exercism's Python Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Your task is to convert a number into a string that contains raindrop sounds corresponding to certain potential factors. A factor is a number that evenly divid... |
package com.zuitem.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zuitem.domain.*;
import com.zuitem.domain.util.Result;
import com.zuitem.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.Req... |
import { Dialog, Transition } from '@headlessui/react';
import { Fragment, useState } from 'react';
import { useForm } from 'react-hook-form';
import axios from 'axios';
import { toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
export default function ForgotPasswordModal({ isOpen, closeMo... |
/// <reference types="vitest/globals" />
import { render } from '../renderer.js'
describe('dropdown.toggle', () => {
it('renders dropdown toggle button with default props', async () => {
const html = await render('<ui:dropdown.toggle>Toggle</ui:dropdown.toggle>')
expect(html).toMatchInlineSnapshot(`
"... |
from typing import List
from pydantic import BaseModel
class Blog(BaseModel):
title : str
body : str
class User(BaseModel):
name : str
email : str
password : str
class ShowUser(BaseModel):
name : str
email : str
blogs : List[Blog] = []
class Config():
o... |
import React from 'react'
import { SectionTitle, Product } from '@/components'
import { productService } from '@/services/product.service'
import { Product as IProduct } from '@/types/product.types'
import type { NextPage, NextPageContext } from 'next'
import Head from 'next/head'
import styles from './produto.module.c... |
// while 문 : 가장 기본적인 반복문
// while 문 실행 시 while 문 밖에 초기화 변수를 선언하고, while 안에서 초기화 변수의 카운트가 필요함
import java.util.Scanner;
public class While {
public static void main(String[] args) {
System.out.println("\n----- while 문 -----\n");
int hit = 0; // 초기화 변수
while (hit < 10){ // 히트가 10보다 작다 -> true... |
<!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">
<link rel="stylesheet" href="main.css">
<!-- Swiper -->
<link rel="stylesheet" href="https://unpkg.com/swipe... |
///How much power it costs to deconstruct an item.
#define DESTRUCTIVE_ANALYZER_POWER_USAGE (BASE_MACHINE_IDLE_CONSUMPTION * 2.5)
///The 'ID' for deconstructing items for Research points instead of nodes.
#define DESTRUCTIVE_ANALYZER_DESTROY_POINTS "research_points"
/**
* ## Destructive Analyzer
* It is used to dest... |
const hobbies = ['watching anime', 'gaming', 'cooking']
console.log(hobbies)
// Accessing array elements
const famousSayings = ['Fortune favors the brave.', 'A joke is a very serious thing.', 'Where there is love there is life.']
let listItem = famousSayings[0]
console.log(famousSayings[2])
// Update Elements
let gro... |
import 'package:flutter/material.dart';
import 'package:fwc_album_app/app/core/ui/styles/button_styles.dart';
import 'package:fwc_album_app/app/core/ui/styles/colors_app.dart';
import 'package:fwc_album_app/app/core/ui/styles/text_styles.dart';
import 'package:fwc_album_app/app/core/ui/widgets/button.dart';
import 'pac... |
autoload :Money, "money"
module Gilt
class Sku
CURRENCY = "USD"
FOR_SALE = "for sale"
RESERVED = "reserved"
SOLD_OUT = "sold out"
def initialize(sku_response)
@sku = sku_response
end
def id
@sku["id"].to_i
end
def inventory_status
@sku["inventory_status"]
... |
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next';
import config from 'config/config';
import { Select } from 'components/UI';
import axiosInstance from 'auth/axiosInstance';
import { useRouter } from 'next/router';
import { useSavedState } from... |
# Current Thread Scheduler
import time
import logging
import threading
from datetime import timedelta
from rx import config
from rx.core import Scheduler
from rx.internal import PriorityQueue
from .schedulerbase import SchedulerBase
from .scheduleditem import ScheduledItem
log = logging.getLogger('Rx')
class Tramp... |
#include <stdio.h>
#include <ncurses.h>
#define WIDTH 30
#define HEIGHT 10
#define ENTER 10
int startx = 0;
int starty = 0;
char *choices[] = {
"Play Game",
/*"Set Bodies",*/
"Exit",
};
int n_choices = sizeof(choices) / sizeof(char *);
void print_menu(WINDOW *menu_win, int highlight);
int game_menu()... |
import { extractIngredients, sanitize } from "./recipeUtilities.js";
export const getTitle = async (page, requestURL) => {
const titleElement = await page.locator("h1");
if (!titleElement) {
throw new Error(`Title not found on this page ${requestURL}`);
}
const rawTitle = await titleElement.textContent()... |
import styles from "./Home.module.css";
import Footer from "../components/Footer";
import Hero from "../components/Hero";
import NavBar from "../components/NavBar";
import ProductCard from "./ProductCard";
import products from "../assets/products.js";
function Home() {
return (
<>
<NavBar />
{/* <Her... |
import React from 'react'
import { ToastContainer, toast } from 'react-toastify'
import 'react-toastify/dist/ReactToastify.css'
import { useNavigate } from 'react-router-dom'
import {
Box,
Button,
Container,
Flex,
FormControl,
FormLabel,
Image,
Input,
Text,
} from '@chakra-ui/react'
import { Link } f... |
---
title: <resolution>
slug: Web/CSS/resolución
tags:
- CSS
- CSS tipo de datos
- Diseño
- Estilos
- Referencia
translation_of: Web/CSS/resolution
---
<div><section class="Quick_links" id="Quick_Links"><ol><li><strong><a href="/es/docs/Web/CSS">CSS</a></strong></li><li><strong><a href="/es/docs/Web/CSS/Refer... |
import { Component, OnInit } from '@angular/core';
import { HttpResponse } from '@angular/common/http';
import { FormBuilder, Validators } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs';
import { finalize, map } from 'rxjs/operators';
import { IPessoa, Pessoa... |
import { FrappeError, useFrappeGetCall } from 'frappe-react-sdk'
import { PropsWithChildren, createContext } from 'react'
import { useParams } from 'react-router-dom'
import { KeyedMutator } from 'swr'
export type Member = {
name: string
full_name: string
user_image: string | null
first_name: string
... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateInformationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('information... |
import React from 'react';
import {
Avatar,
CssBaseline,
Box,
Typography,
Container,
} from '@material-ui/core';
import LockOutlinedIcon from '@material-ui/icons/LockOutlined';
import { makeStyles } from '@material-ui/core/styles';
import Copyright from '../../Copyright';
import { useMediaQuery }... |
'use client'
import { useLoginModal } from '@/app/hooks/useLoginModal'
import { useRegisterModal } from '@/app/hooks/useRegisterModal'
import axios from 'axios'
import { signIn } from 'next-auth/react'
import { useCallback, useState } from 'react'
import { FieldValues, SubmitHandler, useForm } from 'react-hook-form'
i... |
import React, { useState } from 'react'
const Question = (props) => {
const { title, info } = props
const [isToggleOn, setIsToggleOn] = useState(false)
const toggleInfoVisibility = () => {
if (isToggleOn) {
setIsToggleOn(false)
} else {
setIsToggleOn(true)
}
}
return (
<article className="question"... |
import mongoose, { Schema } from 'mongoose';
import Config from '../../../config';
import { CartI, ProductCart, CartBaseClass } from '../cart.interface';
export const CartSchema = new mongoose.Schema<CartI>({
userId: {
type: Schema.Types.ObjectId,
required: true,
unique: true,
},
productos: [
{
... |
import React, { useEffect } from 'react';
import { useState } from 'react';
import {
Text,
View,
Alert,
ActivityIndicator,
ScrollView,
Pressable,
} from 'react-native';
import { colors, CLEAR, ENTER } from '../../constants';
import Keyboard from '../Keyboard';
import styles from './Game.styles';
import { co... |
using System.ComponentModel.DataAnnotations;
using BookShopAPI.Models.Requests;
using BookShopAPI.Models.Responses;
using BookShopAPI.Services;
using Microsoft.AspNetCore.Mvc;
namespace BookShop.Controllers;
[Route("api/v1/employees")]
public class EmployeeController : ControllerBase
{
private readonly IEmployeeS... |
import { combineReducers, createStore } from "redux";
import { accountReducer } from "./features/accounts/accountSlice";
import { customerReducer } from "./features/customers/customerSlice";
const rootReducer = combineReducers({
account: accountReducer,
customer: customerReducer,
});
const store = createStore(rootR... |
// @strictNullChecks: true
// @noimplicitany: true
// @declaration: true
declare type Box<T> = {
value: T;
};
declare type Boxified<T> = {
[P in keyof T]: Box<T[P]>;
};
declare function box<T>(x: T): Box<T>;
declare function unbox<T>(x: Box<T>): T;
declare function boxify<T>(obj: T): Boxified<T>;
declare funct... |
package fit.asta.health.designsystem.atomic
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.CornerBasedShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.compositionLocalOf
import andr... |
/**
* @jest-environment jsdom
*/
import "@testing-library/jest-dom";
import { fireEvent, screen, waitFor } from "@testing-library/dom";
import NewBillUI from "../views/NewBillUI.js";
import NewBill from "../containers/NewBill.js";
import { localStorageMock } from "../__mocks__/localStorage.js";
import router from ".... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.