text stringlengths 184 4.48M |
|---|
import React from 'react';
import { useCart } from 'react-use-cart';
import './Cart.css';
import Navbar from '../Navbar/Navbar22';
function Cart() {
const {
isEmpty,
totalUniqueItems,
items,
totalItems,
cartTotal,
updateItemQuantity,
removeItem,
empt... |
# coding=utf-8
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
from general.models import UserSettings
class UserSettingsForm(forms.ModelForm):
class Meta:
model = UserSettin... |
import { QlikSaaSClient } from "qlik-rest-api";
export interface IAPIKey {
id: string;
tenantId: string;
description: string;
sub: string;
subType: string;
status: string;
expiry: string;
createdByUser: string;
created: string;
lastUpdated: string;
}
export class APIKey {
#id: string;
#saasCli... |
---
title: Creating a new page with Hugo
date: 2024-05-31
author: Hugo Toyin
image: /images/blog/creating-a-hugo-theme-from-scratch.jpg
type: blog
---
Hello and welcome back to my blog. This blog post is about creating a new page using Hugo. Hugo is one of the most popular open-source static site generators (straight f... |
/**
* Performs a binary search on a sorted array and returns the index of the target element if found, otherwise -1.
* @param arr The sorted array to search in.
* @param target The target element to search for.
* @returns The index of the target element if found, otherwise -1.
*/
export function binarySearch<T>(
... |
/*
10) Crie uma função para uma "mini" calculadora (somente de inteiros), ou seja, passe como argumento:
➢ Dois (2) números inteiros: Número1 e Número2 e
➢ Um (1) Operador: Soma ( + ) ou Subtração ( ̶) ou Multiplicação ( * ) ou Divisão ( / ) ou MOD ( % )
Retorne desta função a operação matemát... |
import {FC, ReactPortal, useEffect, useState} from "react";
import PopupMenu from "../../index";
import "./index.scss";
import MenuButton from "../../items/button";
import PopupDialog from "../../../popup-dialog";
import {useChangePasswordMutation, useEditProfileMutation, useGetAvatarMutation} from "../../../../service... |
---
title: Cache
description: Cache Overview
hide_table_of_contents: true
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
<Tabs queryString="primary">
<TabItem value="cache-overview" label="Overview">
Temporary data store, typically in RAM, that holds frequently accessed data for fast... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ToolbarComponent } from './components/toolbar/toolbar.component';
import {MatIconModule} from "@angular/... |
<!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>刮刮卡</title>
</head>
<body>
<canvas id="canvas" width="500" height="500" style="border: 1px so... |
import { useMemo, useEffect, useRef } from 'react';
import isDev from '../utils/isDev';
import { isFunction } from '../utils';
import { debounce } from 'lodash-es';
type noop = (...args: any[]) => any;
export interface DebounceOptions {
wait?: number;
leading?: boolean;
trailing?: boolean;
maxWait?: number;
}... |
# CS416 Programming Assignment 1
This assignment consists of several parts. Each part includes an implementation component and several questions to answer. Modify this README file with your answers. Only modify the specified files in the specified way. Other changes will break the programs and/or testing infrastructur... |
function resizeTest(plugin)
%writeTests(plugin)
% Checks to see if automatic resizing of images is working properly for a
% given videoReader/videoWriter plugin using some quick heuristics.
%
%Examples:
% resizeTest
% resizeTest ffmpegPopen2 % linux & similar
% resizeTest ffmpegDirect % ...if system's gcc is c... |
#!/usr/bin/env python3
## Coding: UTF-8
## Author: mjanez@tragsa.es
## Institution: -
## Project: -
# inbuilt libraries
import logging
import os
# Logging
def log_file(log_folder):
'''
Starts the logger --log_folder parameter entered
Parameters
----------
- log_folder: Folder where log is stor... |
# Copyright (C) 2019 Greenbone Networks GmbH
# Text descriptions are largely excerpted from the referenced
# advisory, and are Copyright (C) the respective author(s)
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Gen... |
use std::{fs::File, io::{BufReader, BufRead, Read}, path::PathBuf};
#[tauri::command]
pub async fn read_text_file(file_path: &str) -> Result<Option<Vec<String>>, ()> {
let file = match File::open(file_path) {
Ok(f) => f,
Err(e) => {
eprintln!("{:?}", e);
return Ok(None);
},
};
let reader = BufReader... |
//
// LoadNewsFromRemoteUseCaseTest.swift
// CryptoListTests
//
// Created by Ihwan on 13/02/22.
//
import XCTest
@testable import CryptoList
class LoadNewsFromRemoteUseCaseTest: XCTestCase {
func test_init_doesNotRequestDataFromURL() {
let (_, client) = makeSUT()
XCTAssertTrue(cl... |
import { createApp } from "vue"
import App from "./App.vue"
import router from "./router"
import { initSocket } from "./socket"
import {
Button,
Input,
setConfig,
frappeRequest,
resourcesPlugin,
FormControl,
} from "frappe-ui"
import EmptyState from "@/components/EmptyState.vue"
import { IonicVue } from "@ionic... |
/********************************************************************
* \file RendererManager.h
* \brief Renderer Manager, manage renderer(s) and render targets
*
* \author Lancelot 'Robin' Chen
* \date June 2022
*********************************************************************/
#ifndef RENDERER_MANAGER... |
import React, { useContext, useEffect } from "react";
import { useState } from "react";
import { auth, database } from "../firebase";
const AuthContext = React.createContext();
export function useAuth() {
return useContext(AuthContext);
}
export function AuthProvider({ children }) {
const [currentUser, setCurren... |
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { routerRedux } from 'dva/router';
import { connect } from 'dva';
import { Row, Col, Card } from 'antd';
import BinLocationList from './List';
import BinLocationSearch from './Search';
import BinLocationModal from './Modal';
@con... |
export class Employee {
constructor(name, typeCode) {
this._name = name;
this._typeCode = typeCode;
}
get name() {
return this._name;
}
get type() {
return Employee.legalTypeCodes[this._typeCode];
}
static get legalTypeCodes() {
return { E: 'Engineer', M: 'Manager', S: 'Salesman' };
... |
import React from 'react'
import { ActivityIndicator, View, StyleSheet } from 'react-native'
import type { ViewProps as RNViewProps } from 'react-native'
import colors from '~/theme/colors'
const styles = StyleSheet.create({
container: {
display: 'flex',
height: '100%',
paddingHorizontal: 12,
width:... |
"""Python Module in which we define all the need classes for our machine-learning routine.
"""
# Libraries
import torch
import polars as pl
from pathlib import Path
from torch import optim, nn
import lightning.pytorch as lg
from model import LogisticRegression
from torch.utils.data import Dataset, Data... |
<?php
namespace App\Http\Controllers;
use App\Models\Branch;
use App\Models\Coach;
use App\Models\Customer;
use App\Models\Employee;
use App\Models\Expense;
use App\Models\Installment;
use App\Models\Product;
use App\Models\Salary;
use App\Models\Subscription;
use Carbon\Carbon;
use Illuminate\Http\Request;
class Da... |
;; @see https://bitbucket.org/lyro/evil/issue/360/possible-evil-search-symbol-forward
;; evil 1.0.8 search word instead of symbol
(setq evil-symbol-word-search t)
;; load undo-tree and ert
(add-to-list 'load-path "~/.emacs.d/site-lisp/evil/lib")
;; @see https://bitbucket.org/lyro/evil/issue/511/let-certain-minor-modes... |
export type Json =
| string
| number
| boolean
| null
| { [key: string]: Json | undefined }
| Json[]
export interface Database {
public: {
Tables: {
ends: {
Row: {
created_at: string | null
end_number: number
game_id: number
hammer_team_id: number... |
/*!
* \file CBinTreeRB.hpp Template red-black balanced binary tree container
* class.
* \brief Template red-black balanced binary tree container class.
* \author Ivan Shynkarenka aka 4ekucT
* \version 1.0
* \date 29.08.2006
*/
/*
FILE DESCRIPTION: Template red-balck balanced binary ... |
import React, { useMemo, useState } from "react";
import { Box, useTheme } from "@mui/material";
import Header from "components/Header";
import { ResponsiveLine } from "@nivo/line";
// import { useGetSalesQuery } from "state/api";
import { useGetProductStatsQuery } from "state/api";
import DatePicker from "react-datepi... |
#!/software/hgi/installs/anaconda3/envs/hgi_base/bin/Rscript --vanilla
## Note! It is not intended that you use this file directly as it is adapted to Sanger's LSF submission
## system (See callouts for LSB_JOBINDEX). It is intended that you modify this script to fit your job
## submission sytem.
library(data.table)... |
import torch
from torch import Tensor
import deepinv as dinv
class MultispectralUtils:
"""Utility class to obtain lrms, hrms and pan images from concatenated volumes.
We assume that all volumes are passed around as (B,C+1,H,W) where the extra channel
is the pan band, and H,W are the HR dimensions. LRMS is ... |
/* eslint-disable @typescript-eslint/no-unused-vars */
import {
Card,
Space,
Typography,
Divider,
} from 'antd';
import TextArea from 'antd/lib/input/TextArea';
import React, {
forwardRef,
useEffect,
useImperativeHandle,
useState,
} from 'react';
import {
useForm,
FormProvider,
Controller,
} from ... |
from django import forms
from django.contrib.auth.models import User
from .models import Profile
class UserRegistrationForm(forms.ModelForm):
password = forms.CharField(label="Password", widget=forms.PasswordInput)
password2 = forms.CharField(label="Confirm Password", widget=forms.PasswordInput)
class Me... |
import React, { useContext, useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { Context } from "../store/appContext";
const Login = () => {
const { store, actions } = useContext(Context);
const [formValue, setFormValue] = useState({ email: "", password: "" });
const navigate =... |
package br.com.capsistema.view.jetpackcomposepermissions
import android.Manifest
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.provider.Settings
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.rememberLauncherForActi... |
import { useState } from "react";
export interface IuseObjBoolFns {
[key: string]: (newValue: boolean) => void;
}
export const useObjectBool = (
initialKeys: Array<[string, boolean]>
): [Record<string, boolean>, IuseObjBoolFns, (key: string) => boolean] => {
// useState
const [value, setValue] = useState<Reco... |
"""microauth URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-b... |
import json
import requests
from config import currencies
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
class APIException(Exception):
"""
Класс исключений ошибок пользователя.
...
"""
pass
class CurrencyConverter:
"""
Класс конвертера валют.
..... |
import React, { useEffect, useState } from 'react'
import {
getDeck,
getFirstNPokemon,
IsGameOver,
} from '../../Utils/functionUtils'
import { CardComponent } from '../CardComponent/CardComponent'
import style from './GameComponent.module.scss'
export type Card = {
pokemonName: string
isVisible: boolean
is... |
import { useCallback } from "react";
import CartGoodCard from "./CartGoodCard";
import {
AddToCart,
CartReducer,
ClearCart,
RemoveFromCart,
SetCartItem,
} from "./cart";
import { API_URL } from "./constants";
import { useLocalStorage } from "./useLocalStorage";
export interface CartPageProps {
reducer: Car... |
package com.lollypop.runtime.instructions.invocables
import com.lollypop.language._
import com.lollypop.runtime.errors.ScenarioNotFoundError
import com.lollypop.runtime.instructions.VerificationTools
import com.lollypop.runtime.instructions.conditions.Verify
import com.lollypop.runtime.instructions.expressions.{Dictio... |
/*************************************************************************
* Copyright 2009-2016 Ent. Services Development Corporation LP
*
* Redistribution and use of this software in source and binary forms,
* with or without modification, are permitted provided that the
* following conditions are met:
*
* R... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The basic code for equational reasoning with a non-reflexive relation
------------------------------------------------------------------------
{-# OPTIONS --cubical-compatible --safe #-}
open import Function us... |
#include <stdio.h>
/**
* main - Entry point
*
* Description: prints all possible different combinations of two digits
*
* Return: 0 (End Program)
*/
int main(void)
{
int first = 0;
int second = 0;
while (first <= 98)
{
second = first;
while (second <= 99)
{
if (first != second)
{
putchar((first /... |
/*
* phobj.h
*
* Copyright (c) 2009 Ismael Gomez-Miguelez, UPC <ismael.gomez at tsc.upc.edu>. All rights reserved.
*
*
* This file is part of ALOE.
*
* ALOE 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 Founda... |
{% extends "base.html" %}
{% block content %}
<div class="flex flex-col items-center justify-center px-6 py-8">
<!-- Challenge information -->
<div class="mb-24 w-full bg-white rounded-lg shadow dark:border md:mt-0 sm:max-w-md xl:p-0 dark:bg-gray-800 dark:border-gray-700">
<div class="p-6... |
const sinon = require('sinon');
const { expect } = require('chai');
const connection = require('../../../models/connection');
const modelProducts = require('../../../models/productsModel');
describe('Testa ao chamar a função getById da camada de modelo', () => {
describe('Quando existe o produto no banco de dados', ... |
---
layout: default
title: En hel webbplats
subtitle: Steget från en bunt webbsidor till en sammanhängande webbplats
desc: Hur webbsidor länkas samman för att bli en webbplats. Pseudoklasser för länkar. Att inkludera dokument i andra dokument idag <em>alltid</em> innebär serverskript, exempel i PHP.
category: grunderna... |
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "./Base64.sol";
contract PewNFT is ERC721 {
using Strings for uint256;
// Store data about the contributions made by a user holding the token
struct Contribution {
string ipfs... |
import {
Box,
Button,
CloseButton,
Flex,
Image,
Input,
Text,
} from "@chakra-ui/react";
import { ChangeEvent, FC, useEffect, useRef, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
import { ReplyIconLg } from "@/components/svg/ReplyIconLg";
import { useDevice } from "@/ho... |
/*
3. আমরা for লুপ ব্যাবহার করে ১ থেকে ১০ এর যোগফল বের করেছি। নিচের ৫টি ধারা গুলোর যোগফল বের করার জন্য প্রোগ্রাম লিখ।
===A) 1+2+3+.....50 ===
var sum = 0;
for (var i = 1; i <=50; i++) {
sum = sum + i;
}
console.log(sum);
=== B. 1+3+5+...+39 ( প্রথম ২০টি পদ) ===
var sum = 0;
for (var i = 1; i <=39; i+=2){
s... |
% Analise dataset
% Alessandro Antonucci @AlexRookie
% Placido Falqueto
% University of Trento
close all;
clear all;
clc;
options.save = false; % save results
options.plot = false; % show plot
options.show = false; % show statistics
% Folder tree
addpath(genpath('../functions/'));
addpath(genpath('../Clothoids/')... |
import { useState } from "react";
import { useDispatch } from "react-redux";
import InputText from "../../../components/Input/InputText";
import ErrorText from "../../../components/Typography/ErrorText";
import { showNotification } from "../../common/headerSlice";
import { useCreateMentalHealth } from "../../../hooks/m... |
import logging
from web3 import Web3
from ....general.enums import rewarderType
from ..gamma.rewarder import gamma_rewarder
class zyberswap_masterchef_rewarder(gamma_rewarder):
def __init__(
self,
address: str,
network: str,
abi_filename: str = "",
abi_path: str = "",
... |
import 'dart:io';
import 'package:dukan/provider/product_provider.dart';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:image_picker/image_picker.dart';
import 'package:provider/provider.dar... |
"use client"
import { useState, useEffect } from "react";
import Link from "next/link";
import jwt from "jsonwebtoken";
import { useRouter } from "next/navigation";
export default function Navbar() {
// Step 1: Check if a token exists in the localStorage
const token = localStorage.getItem("token");
const isLogg... |
<?php
declare(strict_types=1);
namespace App\Jobs;
use App\Events\DealChanged;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
/**
* Class DealCreated
*
* @author ... |
package StackAndQueue;
// 35 https://leetcode.cn/problems/top-k-frequent-elements/description/
/**
* 使用map记录每个元素出现的频次
* 使用优先级队列完成排序,保留频次最高的K个元素,具体过程是:
* 1. 优先级队列存储元素和频次,且以频次升序排序,这样构造的优先级队列是小顶堆,即堆顶是频次最低的元素
* 2. 遍历map:当队列大小小于K时,直接添加元素;否则比较当前元素频次和队列中最小频次元素的频次,如果当前元素频次较大,则替换队列中最小频次元素
* 3. 遍历结束后,队列中剩下的元素即为频次最高的K个元素
... |
#include "SuperHeroGame.h"
SuperHeroGame::SuperHeroGame() {
_system = &(_system->getInstance());
std::ifstream ofsGame(FileConstants::GAME_FILE_NAME, std::ios::out | std::ios::binary);
if (!ofsGame.is_open())
throw std::logic_error("Can not open the file!");
ofsGame.read((char*)&turnsCounter, sizeof(size_t))... |
//
// DetailViewController.swift
// iFindMovies
//
// Created by Pratyush Thapa on 2/13/17.
// Copyright © 2017 Pratyush. All rights reserved.
//
import UIKit
class DetailViewController: UIViewController {
@IBOutlet weak var TitleLabel: UILabel!
@IBOutlet weak var OverviewLabel: UILabel!
@IBOutlet we... |
package com.example.android.evcharge;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
i... |
<!DOCTYPE html>
<html>
<head>
<title>商品分类表-添加/修改</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 所有的 css js 资源 -->
<link rel="stylesheet" href="https://unpkg... |
import torch
import torch.nn as nn
from .layers import Latent, Reshape
class Conv(nn.Module):
def __init__(self, T, n, n_z):
super().__init__()
self.T = T
self.n = n
self.enc = nn.Sequential(
nn.Conv1d(in_channels = n, out_channels = 50, kernel_size = ... |
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using RealEstateAdmin.Core.DTO.Views;
using RealEstateAdmin.Core.Helpers;
using RealEstateAdmin.Core.ServiceContracts;
using RealEstateAdmin.Core.Services;
namespace RealEstateAdmin.Api.Controllers
{
[ApiController]
[Route("api/user")]
... |
import { Injectable } from '@angular/core';
import { DataStorageService } from './data-storage.service';
import { Router } from '@angular/router';
import { AlertController } from '@ionic/angular';
import { UtilsService } from './utils/utils.service';
declare global {
interface Window {
google: any;
}
}
@Injec... |
-- GROUP BY
-- STATEMENT
-- IT ALLOWS TO AGGARATE DATA FOR CATEGORY LEVEL
-- WE NEED CAEGORICAL COLUMN TO USE GROUP BY (MOST OF THE CASE, SOME EXCEPTION LIKE: AGE)
-- AGE CAN BE NUMERICAL
-- syntax
-- SELECT COL1,AGG(COL2) AS COLUMN_NAME
-- FROM TABLE
-- WHERE (EXPRESSION IF ANY)
-- GROUP BY COL1;
-- HAVING (EXPRESSION... |
---
user-type: administrator
product-area: system-administration
navigation-topic: create-and-manage-custom-forms
title: Agregar un salto de sección a un formulario personalizado con el generador de formularios heredado
description: Puede agrupar los campos y widgets personalizados en un formulario personalizado en sec... |
# ArduinoCraft
A Minecraft Fabric mod that allows redstone signals to interact with an Arduino and vice versa.
Please note that this is my first mod, and I'm still learning how to make mods, so there might be some bugs or issues.
## Features
- An "Arduino Block" which takes redstone signals and converts it to `digita... |
//
// RecentTableViewCell.swift
// quickChat
//
// Created by Shan-e-Ali Shah on 4/7/16.
// Copyright © 2016 Shan-e-Ali Shah. All rights reserved.
//
import UIKit
class RecentTableViewCell: UITableViewCell
{
//backendless instance
let backendless = Backendless.sharedInstance()
@IBOutlet weak var name... |
import React from 'react'
import styled from 'styled-components'
import { Link } from 'react-router-dom';
const StyledButton = styled.button`
background: none;
border: none;
cursor: pointer;
color: white;
transition: color 0.3s ease, border 0.3s ease, transform 0.3s ease;
&:hover {
color: #949494;
... |
/*
* Copyright 2002-2014 the original author or 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 ap... |
import React, {useState} from "react";
import {SubHeading, Description} from "../styled";
import useMobile from '../../assets/js/useMobile';
const FeatureCards = (props) => {
const isMobile = useMobile();
return (
<div>
{
!isMobile &&
<div className="d-flex ... |
<script setup lang="ts">
import { onMounted, reactive, ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import { Collapse } from 'bootstrap';
import CartCounterIcon from './CartCounterIcon.vue';
const router = reactive(useRouter());
const collapseRef = ref<HTMLDivElement | string>('');
const collapse ... |
# USING "TIDYTABLE" PACKAGE (A TIDY INTERFACE TO "DATA.TABLE")
# https://markfairbanks.github.io/tidytable/index.html
# TO IMPROVE SPEED OF EXECUTION
combo_plus <- combo %>%
left_join.(lkp_tretspef, by = "tfc") %>%
relocate(treatment_function, .after = tfc) %>%
relocate(tf_group, .after = treatment_function) ... |
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";
import Container from '@mui/material/Container';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
export default NewUser = ({ setToken }) => {
const [email, setEmail] = useState('')... |
import { ArgsTable, Story, Canvas, Meta } from '@storybook/addon-docs';
import { Row, VerticalSpacer } from '@components';
import { mainColors } from '@primitives';
import { showToast, ToastContainer } from '.';
import { Toast } from './components/ToastPortal';
<Meta
title="Components/Toasts"
decorators={[
... |
#!/usr/bin/python3
"""This defines a module"""
class Rectangle:
"""
This rectangle class
"""
def __init__(self, width=0, height=0):
"""
"""
if type(width) is not int:
raise TypeError("width must be an integer")
if width < 0:
raise ValueError("widt... |
# npm Checker
## Feature
"npm Checker" is an API that determines the safety of npm packages from multiple perspectives before installing them.
### Perspectives
| Viewpoints | Thresholds |
| --- | --- |
| Is it an active package? | Updated within the past year |
| Does it have a track record of being used? | The num... |
package easylog
import (
"context"
"os"
"time"
"github.com/logerror/easylog/pkg/izap"
"github.com/logerror/easylog/pkg/option"
otelzap "github.com/logerror/easylog/pkg/otel"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"gopkg.in/natefinch/lumberjack.v2"
)
var (
globalLogger Logger
globalRawLogger ... |
<template>
<!-- 自定义组件中使用v-mode指令 -->
<input type="search" @input="changeInput" data-myValue="">
</template>
<script>
export default {
name: 'CustomModel',
// 当我们使用model的默认值的时候value作prop,input作event时,可以省略不写model。
model: {
prop: 'myValue', // 默认是value
event: 'myInput', // 默认是input
},
props: {
/... |
import argparse
from generic_checker_plugin import GenericCheckerPlugin
from ethpwn import *
from myutils import *
#
# NOTE:
#
# This script implements the GenericChecker as described in the paper in Section 4.3 (Generic Checker).
# To run the script like we did for our evaluation, an access to an blockchain index d... |
# 从 Hugo 迁移到 Gridsome
> 原文:<https://dev.to/lauragift21/-migrating-to-gridsome-from-hugo-2o6e>
上周我在浏览我的推特时间表时,无意中发现了这条推文。在查看了 gridsome-starter-blog 之后,我决定做出改变。
> Gridsome@ gridsome第一位正式 gridsome... |
<?php
/**
* Abstract class for builders compatibility.
*
* @package Neve_Pro\Modules\Custom_Layouts\Admin\Builders
*/
namespace Neve_Pro\Modules\Custom_Layouts\Admin\Builders;
use Neve_Pro\Traits\Core;
use Neve_Pro\Traits\Conditional_Display;
/**
* Class Abstract_Builders
*
* @package Neve_Pro\Modules\Custom_... |
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="text-center">
<h1>Login</h1>
<h6>Please enter email & password</h6>
</div>
<form [formGroup]="loginForm" (ngSubmi... |
import { randomUUID } from 'crypto'
import dayjs from 'dayjs'
import { Day } from '../../app/entities/day'
import { DayRepository } from '../../app/repositories/day-repository'
export class InMemoryDayRepository implements DayRepository {
days: Day[] = []
async createByDate(date: Date): Promise<Day> {
const pa... |
from django.contrib.auth.hashers import make_password
from rest_framework import serializers
from users.models import CustomUser
class CustomUserSerializer(serializers.ModelSerializer):
password = serializers.CharField(write_only=True)
confirm_password = serializers.CharField(write_only=True)
class Meta... |
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:paitentapp/screens/select_time_slot/view/select_time_slot_screen.dart';
import 'package:table_calendar/table_calendar.dart'... |
# Excel File Handling in ASP.NET MVC
This ASP.NET MVC project demonstrates how to upload, extract, and process data from Excel files, creating tables in a SQL Server database for each worksheet in the Excel file.
## Features
- **Excel File Upload:** Users can upload Excel files with an unknown structure.
- **Dynamic... |
#' Data frame of quarterly variables
#'
#' @description Computes punctual risk coordinates in the Lexis diagram and quarterly biometric
#' variables of a population.
#'
#' @author Jose M. Pavia \email{pavia@@uv.es}
#' @author Josep Lledo \email{josep.lledo@@uv.es}
#' @references Pavia, JM and Lledo, J (202... |
import React, { useState } from "react";
import { Tab, Tabs } from "react-bootstrap";
import { BiMessageDetail } from "react-icons/bi";
import { FaHome } from "react-icons/fa";
import { FiHelpCircle } from "react-icons/fi";
import ChatView from "../Chat";
// import "../../style/index.scss";
import HomeTab from "../Home... |
//
// DMNFSPersonNode_IndividualAssertionsDeleteWrapperOperation.m
// fs-dataman
//
// Created by Christopher Miller on 3/12/12.
// Copyright (c) 2012 Christopher Miller. All rights reserved.
//
#import "DMNFSPersonNode_IndividualAssertionsDeleteWrapperOperation.h"
#import "DMNFSPersonNode.h"
#import "Console.h"
... |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Migration_Install_items extends Migration
{
/**
* The name of the database table
*
* @var String
*/
private $table_name = 'items';
/**
* The table's fields
*
* @var Array
*/
private $fields = array(
'id' => array(
... |
<?php
namespace App\Repository;
use App\Entity\Cancion;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Cancion>
*
* @method Cancion|null find($id, $lockMode = null, $lockVersion = null)
* @method Cancion|null... |
# 这是一个示例 Python 脚本。
# 按 ⌃R 执行或将其替换为您的代码。
# 按 双击 ⇧ 在所有地方搜索类、文件、工具窗口、操作和设置。
from Env import Environment, Agent, find_best_features
from data_process import importData, X1PATH, Y1PATH, X2PATH, Y2PATH, DataClass, XPATH2016merge, YPATH2016merge, \
XPATH2016CLEAN, YPATH2016CLEAN
import numpy as np
import rl_utils
import... |
package co.com.reactive.sample.apirest;
import co.com.reactive.sample.model.Account;
import co.com.reactive.sample.model.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Flux;
import reactor.core.publisher.M... |
import { ChangeEvent, Dispatch, SetStateAction } from 'react';
import Select from 'react-select';
import { CustomStyle } from '../../../../../components/CustomSelectStyle';
import FormGroup from '../../../../../components/FormGroup';
import Input from '../../../../../components/Input';
import { Container as StyledConta... |
# Machine_Learning_Model
Understanding the Basics of Machine Learning through a problem statement using the data from a csv dataset.
The problem statement is as follows:
The goal of this task is to build a neural network model that predicts whether an employee will leave the present company or not depending on variou... |
import { useEffect, useReducer, useState } from "react";
import "./App.css";
import { SearchBar } from "./components/SearchBar";
import { SearchResultsList } from "./components/SearchResultsList";
import ProductList from "./components/ProductList";
import Cart from "./components/Cart";
import { cartReducer } from "./r... |
import React from "react";
import styled from "styled-components";
import MDEditor from "@uiw/react-md-editor";
import TagInput from "../components/TagInput";
import { useParams, useNavigate } from "react-router-dom";
import { useSelector, useDispatch } from "react-redux";
import { useState, useEffect } from "react";
i... |
package com.github.scribejava.core.oauth;
import com.github.scribejava.core.builder.api.DefaultApi10a;
import com.github.scribejava.core.model.AbstractRequest;
import com.github.scribejava.core.model.OAuth1AccessToken;
import com.github.scribejava.core.model.OAuth1RequestToken;
import com.github.scribejava.core.model.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.