text stringlengths 184 4.48M |
|---|
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import reportWebVitals from './reportWebVitals';
import {BrowserRouter} from "react-router-dom";
/**
* 리덕스 적용
*/
import {Provider} from 'react-redux';
import {createStore} from 'redux';
import rootReducer from './modules';
import {... |
"use client";
import MatchResultsItem from "@app/components/listItem/MatchResultsItem";
import getAllUserGameResults from "@app/hooks/game/getAllUserGameResults";
import { Divider, Spinner, User } from "@nextui-org/react";
import Link from "next/link";
type AllUserGameResult = {
game_result_id: number;
user_id: nu... |
---
title: 'Factorial ANOVA - The omnibus ANOVA and Main effects'
---
Note that this week's vignette assumes you have the following packages:
```{r}
pacman::p_load(emmeans,
ez, # get info on design of ANOVA, also can run ezANOVA
Rmisc, # getting summary data
cowplot,
... |
import {Trans, Plural} from '@lingui/react'
import {DataLink} from 'components/ui/DbLink'
import {BASE_GCD} from 'data/CONSTANTS'
import {Event, Events} from 'event'
import {filter} from 'parser/core/filter'
import {dependency} from 'parser/core/Injectable'
import {Actors} from 'parser/core/modules/Actors'
import {Tier... |
/**
* Takes all the line items and adds them up
* @param {Array | undefined} lineItems
* @returns {number}
*/
export const sumLineItems = (lineItems: LineItem[] | undefined): number => {
if (!lineItems) return 0;
return lineItems.reduce((prevValue, curValue) => prevValue + curValue.amount, 0);
};
/**
* Takes an... |
/*
* Copyright 2017 - 2023 the original author or authors.
*
* 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.
*
*... |
package main
import (
"fmt"
)
type ListNode struct {
Val int
Next *ListNode
}
func detectCycle(head *ListNode) *ListNode {
if head == nil {
return nil
}
slow := head
fast := head
for slow != nil {
// fmt.Printf("slow = %v, fast = %v\n", slow, fast)
if fast == nil || fast.Next == nil {
return n... |
require_relative '../fastlane/readme_api/api'
require_relative '../fastlane/code_blocks/code_blocks'
require 'rspec'
RSpec.describe 'Fastfile' do
before do
# Set the current working directory to the spec folder so it behaves the same as fastlane
current_dir = File.dirname(File.expand_path(__FILE__)... |
//
// DynamicFilteredView.swift
// Task Manager
//
// Created by Can on 29.10.2022.
//
import SwiftUI
import CoreData
struct DynamicFilteredView<Content: View, T>: View where T: NSManagedObject {
// MARK: - Core Data Request
@FetchRequest var request: FetchedResults<T>
let content: (T) -> Content
... |
package ua.nure.andreiko.airline.web.command.dispatcherCommands;
import org.apache.log4j.Logger;
import ua.nure.andreiko.airline.Path;
import ua.nure.andreiko.airline.db.DBManager;
import ua.nure.andreiko.airline.db.entity.Application;
import ua.nure.andreiko.airline.db.entity.Flights;
import ua.nure.andreiko.airline.... |
from unittest import mock
import sklearn.preprocessing as pp
import pandas as pd
import pytest
from src.enum.scaling_methods_enum import ScalingMethodEnum
from src.scaling.standard_scaler import StandardScaler
DATA = pd.DataFrame({'col': ['value0', 'value1'],
'col1': ['value2', 'value3']})
COLU... |
package com.example.tobyspringboot;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import or... |
Day 2 ASSIGNMENT
Q1
public static int smallestNumber(int x, int y, int z) {
int min = y;
if (y > x) {
min = x;
}
if (z < x) {
min = z;
}
return min;
}
Q2
public static String middleChar(String find) {
char[] str = find.toCharArray();
String middle = "";
int index = str.length / 2;
if (str.len... |
package com.flightbooking.service;
import com.flightbooking.model.Flight;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@Service
... |
import tkinter as tk
class HomePage(tk.Frame):
def __init__(self, root, app):
tk.Frame.__init__(self, root)
self.root = root
self.app = app
self.create_widgets()
def create_widgets(self):
self.categories = [
"Home appliances",
"Electronics",
... |
/**
* Class for managing actions based on element data attributes.
*/
export class Action {
#element;
#apiURL;
#description;
#libUrl;
#id;
/**
* Initializes the Actions object with a DOM element and its data attributes.
*
* @param {HTMLElement} element - The DOM element containing data attribute... |
{% extends 'base.html' %}
{% load static %}
{% block title %}Songs{% endblock %}
{% block content %}
<div class="grey_container" data-bs-theme="dark">
<div class="container mt-5 mb-5 w-50">
<div class="bd-masthead mt-5" id="content">
<div class="d-flex mb-4">
<div class="dropdown me-auto">
... |
#### [1015. 可被 K 整除的最小整数](https://leetcode.cn/problems/smallest-integer-divisible-by-k/)
给定正整数 `k` ,你需要找出可以被 `k` 整除的、仅包含数字 **1** 的最 **小** 正整数 `n` 的长度。
返回 `n` 的长度。如果不存在这样的 `n` ,就返回-1。
**注意:** `n` 可能不符合 64 位带符号整数。
**示例 1:**
```
输入:k = 1
输出:1
解释:最小的答案是 n = 1,其长度为 1。
```
**示例 2:**
```
输入:k = 2
输出:-1
解释:不存在可被 2 整除的正整... |
import React from 'react'
import PropTypes from 'prop-types'
function SelectInput(props) {
var i=0;
let wrapperClass = "form-group"
if (props.error.length > 0) {
wrapperClass += " has-error"
}
return (
<div className={wrapperClass}>
<label htmlFor={props.id}>{props.lab... |
/*
* Copyright (c) 2016 ab2005@gmail.com
*
* 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 ... |
# Internal
from ouigo.types_class import Station_FR, Station_ES
# From python
from dataclasses import dataclass
import json
# External
import requests
stations_fr = None
stations_es = None
URL_API_STATIONS_ES = "https://mdw02.api-es.ouigo.com/api/Data/GetStations"
URL_API_STATIONS_FR = "https://mdw.api-fr.ouigo.com/... |
import React from 'react'
import "./Education.css"
import { VerticalTimeline, VerticalTimelineElement } from 'react-vertical-timeline-component';
import 'react-vertical-timeline-component/style.min.css';
import { FcGraduationCap } from "react-icons/fc";
function Education() {
const data = [
{
n... |
/*
* net/tipc/name_distr.c: TIPC name distribution code
*
* Copyright (c) 2000-2006, Ericsson AB
* Copyright (c) 2005, 2010-2011, Wind River Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions ... |
package org.example.lambda;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
p... |
import { CiImageOn } from "react-icons/ci";
import { BsEmojiSmileFill } from "react-icons/bs";
import { useRef, useState } from "react";
import { IoCloseSharp } from "react-icons/io5";
import useAuthUser from "../../hooks/useAuthUser";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import toast fr... |
import React, { useState, useEffect } from 'react';
import {
View,
Text,
TextInput,
TouchableOpacity,
ScrollView,
StyleSheet,
ActivityIndicator,
} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import { useNavigation } from '@react-navigation/native';
import { CommonActions... |
#pragma once
#include"Core/Parallel.h"
namespace GEngine::GridBasedContainer
{
template<typename T>
class ArrayAccessor<T, 3> final
{
public:
ArrayAccessor() :m_Data{ nullptr } {};
ArrayAccessor(const Dim3d& size, T* const data)
{
Reset(size, data);
}
ArrayAccessor(size_t... |
import React from "react";
import "./Home.css";
import HomeNavigation from "./../../components/home_navigation/HomeNavigation";
import DisplayMessage from "./../../components/display_message/DisplayMessage";
import Quiz from "./../../components/quiz/Quiz";
import { UserActionContext } from "../../contexts/userContext";... |
<?php
namespace App\Models;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Subscriber extends Model
{
use SoftDeletes, HasFactory;
public $table = 'subscribers';
protected $dates =... |
<?php
/*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a... |
//
// HomeTableViewCell.swift
// VeroCaseStudy
//
// Created by Adem Burak Cevizli on 31.03.2023.
//
import UIKit
class HomeTableViewCell: UITableViewCell {
static let identifier = "HomeTableViewCell"
private let taskLabel = UILabel()
private let titleLabel = UILabel()
private let descriptionL... |
import { IsArray, IsNotEmpty, IsString } from 'class-validator';
import { Expose, Type } from 'class-transformer';
export class CoffeeCardResponseDto {
@Expose({ name: '_id' })
@Type(() => String)
@IsNotEmpty()
id: string;
@Expose()
@IsString()
@IsNotEmpty()
uid: string;
@Expose()
@IsString()
@... |
import { shallowMount, createLocalVue } from '@vue/test-utils'
import { mockUserDataFixture } from '@/api/mocs/api-user-mock'
import Vuex from 'vuex'
import { getters as realUserModuleGetters } from '@/store/user'
import SAlert from '@/components/ui-system/s-alert'
import AppStaticMessages from '@/components/base/app-s... |
import React, { useEffect, useState } from 'react';
import styles from './BoardPage.module.css'
import { Link, useLocation } from 'react-router-dom';
import Search from '../component/Search/Search';
export default function SearchResultPage() {
const location = useLocation();
const searchParams = new URLSearchP... |
#
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# 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 ... |
import { useEffect, useReducer, useState } from "react";
import { onValue, ref, set } from "firebase/database";
import { auth, db } from "../../utils/firebase";
import { useNavigate } from "react-router-dom";
import { onAuthStateChanged } from "firebase/auth";
export default function useNewBlog(originalPost) {
con... |
<template>
<Carousel
:i18n="{
ariaNextSlide: 'Zur nächsten Slide',
ariaPreviousSlide: 'Zur vorherigen Slide',
ariaNavigateToSlide: 'Springe zu Slide {slideNumber}',
ariaGallery: 'Galerie',
itemXofY: 'Slide {currentSlide} von {slidesCount}',
iconArrowUp: 'Pfeil nach oben',
... |
//
// Shapes.swift
// Bullseye
//
// Created by Matthew Lewis on 7/23/21.
//
import SwiftUI
struct Shapes: View {
@State private var wideShapes = true
var body: some View {
VStack {
if !wideShapes {
Circle()
.strokeBorder(Color.blue, lineWidth: 20.0)
... |
---
title: "Как сделать пулреквест на GitHub"
description: "Создайте свой первый запрос на изменение GitHub пулреквеста."
authors:
- igsekor
related:
- tools/version-control
- tools/git-cli
- tools/github-actions
tags:
- article
---
## Задача
Сделать пулреквест в существующий репозиторий на GitHub.
## Гото... |
import Indecision from '@/components/Indecision.vue';
<template>
<!-- Hacemos binding con image -->
<img
v-if="image"
:src="image"
alt="bg"
/>
<div class="bg-dark"></div>
<div class="indecision-container">
<h1>{{ titulo }}</h1>
<input
type="text"
placeholder="Hazme una pregunta... |
# from flask import Flask, request, render_template
# from search_model import search_book_tfidf, search_book_w2v, search_book_fuzzy
#
# app = Flask(__name__)
#
#
# @app.route('/')
# def home():
# return render_template('index.html')
#
#
# @app.route('/search', methods=['POST'])
# def search():
# query = reques... |
import { Link } from 'react-router-dom';
import { useEffect, useState } from 'react';
import CartWidget from './CartWidget/CartWidget';
import './NavBar.css';
import FirebaseService from '../services/FirebaseService';
import { FirebaseCollections } from '../helpers/FirebaseUtil';
const NavBar = () => {
const [cat... |
import { useRef, useState } from 'react';
import { useHistory } from 'react-router-dom';
import './project_4.scss';
const Project_4 = () => {
const history = useHistory();
const [user, setUser] = useState({});
const [errorMessage, setErrorMessage] = useState({});
const usernameRef = useRef();
const emailRef... |
/* Write a solution to calculate 3-day rolling averages of steps for each user.
We calculate the n-day rolling average this way:
For each day, we calculate the average of n consecutive days of step counts ending on that day if available, otherwise, n-day rolling average is not defined for it.
Output the user... |
<!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>Age Calculator</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap... |
import React from 'react'
import SignUp from '../pages/SignUp'
import frameImage from "../assets/frame.png"
import SignUpForm from '../Component/SignUpForm'
import LoginForm from "../Component/LoginForm"
import {FcGoogle} from "react-icons/fc"
export const Template = ({ title, desc1, desc2, image, formtype, setIsLogged... |
<?php declare(strict_types=1);
namespace Flow\ETL\Extractor;
use Flow\ETL\Exception\InvalidArgumentException;
trait Limitable
{
private ?int $limit = null;
private int $yieldedRows = 0;
public function changeLimit(int $limit) : void
{
if ($limit <= 0) {
throw new InvalidArgument... |
//
// ConfirmationView.swift
// SwiftUI-Supabase-Calendly-Clone
//
// Created by Micah Hodge on 10/6/23.
//
import SwiftUI
struct ConfirmationView: View {
@Binding var path: NavigationPath
var currentDate: Date
var body: some View {
ScrollView {
VStack {
Im... |
### Reto #1: EL "LENGUAJE HACKER"” ###
""" https://retosdeprogramacion.com/
Escribe un programa que reciba un texto y transforme lenguaje natural a
"lenguaje hacker" (conocido realmente como "leet" o "1337"). Este lenguaje
se caracteriza por sustituir caracteres alfanuméricos.
- Utiliza esta tabla (https://www.g... |
--> Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--> Overhead Object
local OverheadObject = ReplicatedStorage:WaitForChild("Overhead")
--> Gradients
local GradientsFolder = ReplicatedStorage:WaitForChild("Gradients")
--> Packages
local Packages = script:WaitForChild("Packages")
local Class... |
package com.yedam.web.common;
import lombok.Getter;
@Getter
//내부값 변경이 필요한 경우가 잘 없어서 생성자에서만 값을 변경시키고 읽어들이기만 하기 위해 getter만 설정
public class PagingVO {
private final static int defaultVal = 10;
private int totalData; //현재 총 데이터 수
private int nowPage; //현재 페이지
private int cntPage = 10; //View 안에서 보여줄 페이지 수 -> 시작... |
import { Component, Inject } from '@angular/core';
import { MatDialog, MAT_DIALOG_DATA, MatDialogRef, MatDialogModule, MatDialogConfig } from '@angular/material/dialog';
import { MatButtonModule } from '@angular/material/button';
import { FormsModule } from '@angular/forms';
import { MatInputModule } from '@angular/mat... |
using MoneyManager.Models;
using MoneyManager.Data.Repositories.Concrete;
using System.ComponentModel;
using System.Windows.Input;
using System.Threading.Tasks;
using System;
using System.Collections.ObjectModel;
using System.Windows;
namespace MoneyManager.ViewModels.Deposits
{
public class AddDepositViewModel :... |
# %%
import numpy as np
from dataclasses import dataclass
import scipy.stats as ss
import pandas as pd
from typing import Optional, Any, List
# %%
# a class to store parameters
@dataclass
class Parameter:
input_model: List[float]
transition_model: List[float]
observation_model: List[float]
initial_stat... |
import { Component, OnInit, ElementRef, ViewChild, AfterViewInit, ChangeDetectorRef } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { AuthService } from '../../core/auth/auth.service'
import { PlataformDetectorService } from ... |
import React, { useEffect, useState } from "react";
type CountdownTimerProps = {
time: number;
start_date?: string;
className?: string;
precisionDigit?: number;
};
export default function CountdownTimer({
time,
start_date,
className,
precisionDigit = 1,
}: CountdownTimerProps) {
co... |
import java.util.Arrays;
public class ClimbStairsFib {
// recursions -O(2^n)
public static int ways(int n){
if(n == 0){
return 1;
}
if(n < 0){
return 0;
}
return ways(n-1) + ways(n-2);
}
// dp - memo ->O(n)
public static int waysdp(i... |
<?php
/**
* Template part for displaying posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package pastelinterior
*/
?>
<article <?php post_class('blog_item'); ?> >
<?php
if( is_sticky() ){
echo '<span class="sticky_label">'. esc_html__( 'Sticky', 'pastel-interi... |
const express = require('express');
const app = express();
// req ==> middleware ==> res
const logger = (req,res,next)=>{
const method = req.method;
const url = req.url;
const time = new Date().getFullYear();
console.log(method, url, time);
// this is an example of terminating your code in the midd... |
const faker = require('faker');
const boom = require('@hapi/boom');
class ProductsServices {
constructor() {
this.products = [];
this.generate();
}
generate() {
const limit = 100;
for (let i = 0; i < limit; i++) {
this.products.push({
id: this.pr... |
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TweetComponent } from './tweet.component';
describe('TweetComponent', () => {
let component: TweetComponent;
let fixture: ComponentFixture<TweetComponent>;
beforeE... |
Shader "Custom/Terrain"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Terrain Texture Array", 2DArray) = "white" {}
_GridTex("Grid Texture", 2D) = "white" {}
_Glossiness("Smoothness", Range(0,1)) = 0.5
_Metallic("Metallic", Range(0,1)) = 0.0
}
SubShader
{
Tags { "RenderType" = "Opaque"... |
import Head from "next/head";
import Link from "next/link";
import type { NextPage } from "next";
import { useState, useEffect } from "react";
import { motion, MotionConfig } from "framer-motion";
import Nav from "~/components/nav";
import { Button } from "~/elements/button";
import CollectionCard from "~/components/c... |
package com.example.oppawtunity;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Text... |
import React from 'react';
import { connect, useDispatch, useSelector } from "react-redux";
import { filterCards, orderCards } from '../../redux/actions';
import Card from '../Card/Card';
import styles from "./Favorites.module.css";
const Favorites = () => {
const favorites = useSelector(state => state.filterFavor... |
import React, { useContext, useEffect, useState } from "react";
import {
Button,
Card,
Container,
FormControl,
InputGroup,
Modal,
} from "react-bootstrap";
import { AuthContext } from "../../services/auth/context/AuthContext";
import {
getOrdenes,
getOrdenesUsuario,
removeOrden,
} from "../../services... |
import React, { useCallback, useMemo, useState } from 'react';
import { isDefined } from '@togglecorp/fujs';
import {
Modal,
Button,
useAlert,
TextInput,
NumberInput,
} from '@the-deep/deep-ui';
import {
ObjectSchema,
PartialForm,
useForm,
getErrorObject,
requiredCondition,
r... |
import 'package:equatable/equatable.dart';
import '../../../../const/app_enums.dart';
class Travel extends Equatable {
final String? travelTitle;
final String? travelDescription;
final String? travelAddress;
final String? travelPrice;
final String? travelPhone1;
final String? travelPhone2;
final String?... |
;;; core-ui.el -*- lexical-binding: t; -*-
;;
;;; Variables
(defvar doom-theme nil
"A symbol representing the Emacs theme to load at startup.
Set to `nil' to load no theme at all. This variable is changed by
`load-theme'.")
(defvar doom-font nil
"The default font to use.
Must be a `font-spec', a font object, an... |
# This file is part of NIT ( http://www.nitlanguage.org ).
#
# 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... |
package Pinwheel::Cache;
use strict;
use warnings;
use Pinwheel::Cache::Null;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(cache cache_clear cache_get cache_remove cache_set);
# By default use the Null backend
my $backend = new Pinwheel::Cache::Null;
sub cache_clear
{
return $backend->clear()... |
import random
def get_user_choice():
while True:
user_choice = input("Enter your choice (rock/paper/scissors): ").lower()
if user_choice in ["rock", "paper", "scissors"]:
return user_choice
else:
print("Invalid choice. Please choose rock, paper, or scissors.")
def g... |
from dataclasses import dataclass
from itertools import chain, repeat
from pprint import pformat
from string import Template
from textwrap import dedent
from typing import (
AbstractSet,
Iterable,
Iterator,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
)
from uuid import uu... |
import { expect } from 'chai';
import { projectName } from '../dist/index.js';
import { setup } from './utils.js';
describe('project name', async () => {
const fixture = setup();
it('pass in name', async () => {
const context = { projectName: '', cwd: './foo/bar/baz', prompt: () => {} };
await projectName(cont... |
# User stories
Dit document zal de user stories voor de benodigde onderdelen en features bevatten.
Gezien dit voor mij de eerste keer is dat ik deze maak zal ik eerst volgens een voorbeeld een standaard opmaak aanmaken en vanuit daar werken.
## Standaard opmaak.
In de eerdere versie van deze opdracht (versie 1.0) kr... |
const Header = (props) => {
return (
<h1>{props.course}</h1>
)
}
const Part = (props) => {
const part = props.part;
return (
<p> {part.name} {part.exercises} </p>
)
}
const Content = (props) => {
return (
<div>
<Part part={props.parts[0]} />
<Part part={props.parts[1]} />
<Pa... |
import "./_game.scss";
import Header from "../../Layouts/Header";
import Footer from "../../Layouts/Footer";
import { axiosJWT, gameQuestions } from "../../utils/axios";
import { useEffect, useState } from "react";
import Timer from "../../Components/Timer/Timer";
import ProgressBar from "../../Components/ProgressBar/P... |
import React from 'react';
import { Container } from 'react-bootstrap';
import Chart from "react-apexcharts";
import { userData } from '../../../dummyData';
const ServiceSales = () => {
const names = userData.map((user) => (user.name));
const data = userData.map((user) => (user['Active User']));
ret... |
package main
import (
"context"
"database/sql"
"fmt"
"net/netip"
"k8s.io/klog/v2"
"source.monogon.dev/cloud/bmaas/bmdb"
"source.monogon.dev/cloud/bmaas/bmdb/model"
"source.monogon.dev/cloud/shepherd"
)
// provider represents a shepherd.Provider that works entirely on a
// static device list. It requires a p... |
package controllers
import (
"cofin/models"
"net/http"
"strconv"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"gorm.io/gorm"
)
type CompaniesController struct {
DB *gorm.DB
Logger *zap.SugaredLogger
}
func (cc CompaniesController) GetCompany(c *gin.Context) {
companyID, err := strconv.ParseUint(c.Param... |
import React, {useState, useRef, useEffect} from 'react';
import TodoList from './TodoList'
import {uuid} from 'uuidv4'
const LOCAL_STORAGE_KEY = 'todoApp.todos'
function App() {
const [todos, setTodos] = useState([])
const todoNameRef = useRef()
console.log(todos)
useEffect(() => {
const localStorageDat... |
import { Todo } from '@/types'
import { TodoService } from './TodoService'
const defaultTodos: Todo[] = [
{ id: 1, title: 'Item1', checked: true },
{ id: 2, title: 'Item2', checked: true },
{ id: 3, title: 'Item3', checked: true },
{ id: 4, title: 'Item4', checked: true },
{ id: 5, title: 'Item5', checked: t... |
//
// ContentUnavailableView.swift
// CleanPad
//
// Created by Uriel Ortega on 10/10/23.
//
// Inspired by ContentUnavailableView (iOS 17+)
import SwiftUI
/// View meant to be used when a list is empty, inviting the user to add an item.
/// Can be personalized modifying its default parameters values.
struct Empty... |
<template>
<v-container class="hasBgColor">
<v-progress-linear v-if="isLoading || checkLoading" indeterminate></v-progress-linear>
<h3>
{{ textFilter('balance') }}<b class="red--text">{{ this.balanceSum }}</b>
</h3>
<v-btn-toggle v-if="withdrawalsCurrencyList && withdrawalsCurrencyList.length" t... |
<!doctype html>
<html lang="en">
<head>
<style>
div{
}
</style>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/di... |
import React from 'react';
import {Link, useHistory} from 'react-router-dom';
import '../App.css';
import {connect} from 'react-redux';
const NavBar = (props) => {
const history = useHistory();
const renderList = () => {
if(props.user){
return [
<li key="feature"><Link to=... |
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { Profile } from '@/entity/Profile';
import { ProfileSchema } from '../../model/types/editorProfileSchema';
import { fetchProfileData } from '../services/fetchProfileData/fetchProfileData';
import { updateProfileData } from '../services/updateProfile... |
import React from "react";
import { connect } from "react-redux";
import { firestoreConnect } from "react-redux-firebase";
import { compose } from "redux";
import { Redirect } from "react-router-dom";
import Spinner from "../../UI/Spinner/Spinner";
import moment from "moment";
const ProjectDetails = props => {
if (... |
import React, { forwardRef } from "react";
import projects from "/src/data/projects";
import ProjectsListItem from "/src/components/ProjectsListItem";
// Forward ref to be used in HomePage component
const RecentProjects = forwardRef((props, ref) => {
const { ...propsRest } = props;
// Reverse array's order to li... |
package com.example.fittracker.service;
import com.example.fittracker.exception.ResourceNotFoundException;
import com.example.fittracker.model.User;
import com.example.fittracker.repository.UserFriendsRepository;
import com.example.fittracker.repository.UserRepository;
import org.hibernate.annotations.Cache;
import o... |
import { extendType, inputObjectType, intArg } from 'nexus'
import { Context } from '../../../context'
import { findManyFinanceDebt, debtCount } from '../finance'
import { FindManyAccountDebtResponse } from '../nexus-type'
export const FinanceWhereInput = inputObjectType({
name: 'FinanceWhereInput',
definition(t) ... |
@regression @employeeProposal
Feature: Testing Proposals Functionality
Background:
Given Navigate to CRM url
When User enters correct employee email and password
And Click "Sales" Module from left side navigation menu
And User clicks "Proposals" module
@newProposal
Scenario: Create New Proposal ... |
import {Component, OnInit} from '@angular/core';
import {NgClass} from "@angular/common";
@Component({
selector: 'app-ex03',
standalone: true,
imports: [
NgClass
],
template: `
<h1>Exercice 3</h1>
<p [ngClass]="getClass()">Random between 1 and 10: {{ n }}</p>
`,
styles: `
.fail {color: re... |
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
#include <DHT.h>
#include "MQ7.h"
#include "SDS011.h"
#define BLYNK_TEMPLATE_ID "TMPLTtUw3aPb"
#define BLYNK_TEMPLATE_NAME "Living Sane"
#define BLYNK_AUTH_TOKEN "Le1pNdDBrs0jBm2qL3VKWulK3QBCF7ix"
#define DHTPIN 15 // Digital pin connected to the DHT sensor
#define ... |
'use strict';
//引入 vue
import Vue from 'vue'
//引入App.vue
import App from './app.vue';
import Accessible from './components/ol/Accessible.vue';
import Animation from './components/ol/Animation.vue';
import XYZ from './components/ol/XYZ.vue';
import ArcgisImage from './components/ol/ArcgisImage.vue';
import geoJson from... |
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
</head>
<body>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9"
... |
<!doctype html>
<html class="no-js" lang="{{ request.locale.iso_code }}">
<head>
<link rel="preload" href="https://cdn.shopify.com/s/files/1/0729/7938/2564/files/white-bg_460x.png?v=1689839554" as="image">
{% if template == 'index' %}
<link rel="preload" href="https://zildjian.com/cdn/shop/files/Zildjian_... |
# CALCULO NUMERICO
# RAIZES DE NúMEROS REAIS
# - METODO DA BISSECAO
#
# Versão 1.00 (2019) - 16.08.2019
# Autor: Prof. Giovanni Leopoldo Rozza (2019)
# Os algorítmos aqui implementados estão descritos no capítulo 2 do livro:
#
# RUGGIERO, Márcia A. Gomes; LOPES, Vera Lúcia da Rocha.
# Cálculo numérico: aspectos t... |
Problem Statement
Given a matrix of N*N dimensions (Mat). Print the matrix rotated by 90 degrees and 180 degrees.
Input
The first line contains N.
N lines follow each containing N space-separated integers.
Constraints
2 <= N <= 100
1 <= Mat[i][j] <= 10000
Output
Output 2*N+1 lines.
First N lines should contain the Mat... |
<template>
<view class="setting">
<view class="yun-avatar-wrap">
<yun-avatar
@upload="uploadImage"
ref="avatar"
avatarStyle="height: 0"
noTab="true"
/>
</view>
<view class="list-wrap">
<view class="item uCenterY uBet" @click="handleAvatar">
<view>更... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.