text stringlengths 184 4.48M |
|---|
import './App.css';
import Header from './Component/Header/Header';
import 'bootstrap/dist/css/bootstrap.min.css';
import {
BrowserRouter as Router,
Switch,
Route,
Link
} from "react-router-dom";
import Home from './Component/Home/Home';
import Login from './Component/Login/Login';
import { createContext } ... |
package com.codestates.main07.exception;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestCon... |
// GET request (read)
import Prompt from '@/models/Prompt';
import { connectDB } from '@/utils/database.js';
const GET = async function (request, { params }) {
try {
await connectDB();
const prompt = await Prompt.findById(params.id).populate({ path: 'creator' });
if (!prompt) return new Response('Prompt not f... |
import { Selector } from 'testcafe';
import { navBar } from './navbar.component';
class AdminDashboardPage {
private pageId: string;
private pageSelector: Selector;
constructor() {
this.pageId = '#admin-dashboard';
this.pageSelector = Selector(this.pageId);
}
private async isDisplayed(tc: TestCont... |
#include <Arduino.h>
#include <WiFi.h>
#include <WiFiMulti.h>
#include <WiFiClientSecure.h>
#include <WebSocketsClient.h>
#include <ESP32Servo.h>
WiFiMulti WiFiMulti;
WebSocketsClient webSocket;
Servo myservo;
Servo myservoexit;
int pinIn = 34;
int pinOut = 35;
int pinInExit = 32;
int pinOutExit = 33;
int servoPin ... |
package main
import "fmt"
func diasDaSemana(numero int) string {
switch numero {
case 1:
return "Domingo"
case 2:
return "Segunda-Feira"
case 3:
return "Terça-Feira"
case 4:
return "Quarta-Feira"
case 5:
return "Quinta-Feira"
case 6:
return "Sexta-Feira"
case 7:
return "Sabado"
default:
... |
type FAQsProps = {
index: number;
question: string;
answer: string;
opened: boolean;
};
const FAQ = ({ index, question, answer, opened }: FAQsProps) => {
return (
<>
<div className='text-black md:text-xl font-semibold min-h-12 md:h-16 px-2 md:px-4 py-1 md:py-2 flex justify-between items-center h-fi... |
"use client";
import * as React from "react";
import * as Toast from "@radix-ui/react-toast";
import "../../globals.css";
import { Button } from "@radix-ui/themes";
const AuthToast = () => {
const [open, setOpen] = React.useState(false);
const eventDateRef = React.useRef(new Date());
const timerRef = React.useRe... |
/*********************************************************************
* Copyright (c) 2019 Arm and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identif... |
<?php
namespace App\Http\Controllers;
use App\Collection;
use App\Http\Resources\CollectionResource;
use App\Http\Resources\CollectionResourceCollection;
use App\Http\Resources\ProductResource;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
class Collec... |
package com.xtremepixel.jetweatherapp.screens.search
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShap... |
import { ReactNode, createContext } from "react";
interface ChildrenProvider {
children: ReactNode;
}
interface Auth {
logout: () => void;
isAuthenticated: () => boolean;
getTaxIdUser: () => string | undefined;
}
export const AuthContext = createContext<Auth>({} as Auth);
export const AuthProvider = ({ chil... |
#pragma once
#include <iostream>
#include <vector>
#include <ostream>
#include <string>
#include <map>
#include <algorithm>
#include <iterator>
#include <optional>
#include "../Types.h"
namespace FPL {
class FonctionArgumentDef {
public:
std::string ArgumentName;
std::string ArgumentValue;
... |
"use client";
import { motion } from "framer-motion";
import Link from "next/link";
import { usePathname } from "next/navigation.js";
import React from "react";
import { linkUrl } from "../../../data/link-url.js";
const container = {
hidden: { opacity: 0, y: 20 },
visible: {
opacity: 1,
y: 0,
transitio... |
import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, View, Alert } from "react-native";
import { useEffect } from "react";
// Screen Navigation
import Start from "./components/Start";
import Chat from "./components/Chat";
// Navigation
import { NavigationContainer } from "@react-navigation/native";
i... |
package com.api.crud.services;
import com.api.crud.models.UserModel;
import com.api.crud.repositories.IUserRepository;
import jakarta.persistence.EntityNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import ja... |
package com.atacankullabci.todoapp.security;
import com.atacankullabci.todoapp.dto.AuthenticationResponseDTO;
import com.atacankullabci.todoapp.dto.LoginRequestDTO;
import com.atacankullabci.todoapp.dto.RefreshTokenRequestDTO;
import com.atacankullabci.todoapp.dto.UserLoginDTO;
import com.atacankullabci.todoapp.except... |
import React from "react";
import { useDispatch, useSelector } from "react-redux";
import { handleFindProspect } from "../../redux/ProspectSlice";
import { useTranslation } from "react-i18next";
const ShowProspectDetails = ({ setShowProspectDetails }) => {
const { singleProspect } = useSelector((state) => state.root... |
package com.jf.controller.email;
import org.springframework.context.ApplicationContext;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import java.io.InputStream;
import java.util.Date;
import java.util.Map;
import java.util.... |
import { inject, injectable } from "tsyringe";
import { AppError } from '../../errors/AppError';
import { ICategoriesRepository } from '../../repositories/interfaces/ICategoriesRepository';
import { ISpendsRepository } from '../../repositories/interfaces/ISpendsRepository';
interface IRequest {
name: string;
descr... |
import { FC, useEffect } from "react";
import { FieldValues, useForm } from "react-hook-form";
import { useStore } from "../hooks/useStore";
import { KeyIcon, LoginIcon, TagIcon } from "./icons/Icons";
import styles from "./Layout.module.scss";
export const Layout: FC = () => {
const { store, updateStore, onStoreEve... |
//
// No26.swift
// SwiftUI100
//
// Created by 西田楓 on 2023/05/27.
//
import SwiftUI
fileprivate struct Stone: Identifiable {
let id = UUID()
let name: String
}
struct No26: View {
@State private var stones: [Stone] = [
Stone(name: "Cobblestone"),
Stone(name: "Stone"),
Stone(na... |
//
// StorageManager.swift
// MyCoreData
//
// Created by Kuat Bodikov on 26.01.2022.
//
import CoreData
class StorageManager {
static let shared = StorageManager()
// MARK: - Core Data stack
lazy var persistentContainer: NSPersistentContainer = {
let container = NSPersistentContainer... |
package com.example.eVoting.entities;
import com.example.eVoting.enums.Gender;
import javax.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
... |
<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Cor... |
/*Say you're an analyst at Parch & Posey and you want to see:
each account who has a sales rep and each sales rep that has an account
(all of the columns in these returned rows will be full)
but also each account that does not have a sales rep and each sales rep that does not have an account
(some of the columns in t... |
// Global
// Local
// Local
// Local
// You can define variables with same names at different scopes
// Called variable shadowing
let name = 'Brian';
if (true) {
let name = 'Mike';
if (true) {
console.log(name);
name = 'Jen'
console.log(name);
}
}
if (true) {
console.log(name);
}
// ... |
### Why is sleep important? ###
Sleep restores children physically. It helps them learn and remember things, and it boosts immunity. And sleep helps children grow. For example, children’s bodies produce growth hormone when they’re asleep.
Children of all ages need to get enough sleep so they can play, learn and concen... |
"use client";
import {
type PropsWithChildren,
createContext,
useState,
type FC,
} from "react";
import { noopFn } from "~/utils/common";
export type OverlayContextType = {
isVisible: boolean;
toggleVisible: (newState?: boolean) => void;
};
export const OverlayContext = createContext<OverlayC... |
<template>
<div style="width:100%;">
<h3 class="title" style="text-align:left;margin:0 auto 10px">游戏付费分析-图形</h3>
<el-row :gutter="24">
<div class="userOptiondiv">
<el-col :xs="24" :sm="6" :lg="4">
<el-date-picker v-model="searchbegin" align="right" size="small" type="date" value... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Reveal Events on Scroll</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<section>
<h2>Scroll to Reveal</h2>
</section>
... |
import { Injectable, HttpException, HttpStatus } from '@nestjs/common';
import { UserService } from '../user/user.service';
import { JwtService } from '@nestjs/jwt';
import argon2 from 'argon2';
import { AuthResponseDTO } from './dtos/register-response.dto';
import { CreateUserDTO } from '../user/dtos/createuser.dto';
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<div id="app">
<my-component></my-component>
</div>
<div id="app2">
<my-component></my-component>
... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'dart:convert';
import 'tv_series_model.dart';
class TvResponse {
final List<TvModel> tvList;
TvResponse({required this.tvList});
factory TvResponse.fromMap(Map<String, dynamic> map) {
return TvResponse(
tvList: List.from(
... |
package com.example.cs310_project;
import static android.content.Intent.getIntent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat... |
<template>
<div class="animated fadeIn">
<vue-element-loading :active="blockLoader" spinner="bar-fade-scale" color="#F06292" size="50" />
<!-- TAB FORM BEGIN -->
<b-card no-body v-show="isForm">
<validation-observer ref="observer" v-slot="{ handleSubmit }">
<b-form @submit.stop.prevent="hand... |
package api
import (
"errors"
"net/http"
"github.com/gin-gonic/gin"
)
// HealthCheck godoc
// @Summary Health check
// @Description always returns OK
// @Tags health
// @Produce json
// @Success 200 {object} string
// @Failure 500
// @Router /health [get]
func handleHealthCheck(c *gin.Context) {
if true ... |
import React, { useCallback, useContext } from "react"
import { ProductContext } from "./ProductCard"
import styles from '../styles/styles.module.css'
export interface Props {
className?: string
style?: React.CSSProperties
}
export const ProductButtons = ({className, style}: Props) => {
const { counter, increas... |
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#ifdef DEBUG_OUTPUT
#define debug(...) printf(__VA_ARGS__)
#else
#define debug(...)
#endif
struct queue_entity_t {
int n;
int prev_index;
int next_index;
};
struct queue_t {
struct queue_entity_t queue_pool[1001]... |
package com.hadoop.study.spark.sql
import org.apache.spark.SparkConf
import org.apache.spark.sql.expressions.Aggregator
import org.apache.spark.sql.{Encoder, Encoders, SparkSession, functions}
import scala.collection.mutable
import scala.collection.mutable.ListBuffer
/**
* <B>说明:描述</B>
*
* @author zak.wu
* @vers... |
import enum
import cocotb
from cocotb.binary import BinaryValue
from cocotb.triggers import Lock, RisingEdge, ReadOnly
from cocotb_bus.drivers import BusDriver
class AXIBurst(enum.IntEnum):
FIXED = 0b00
INCR = 0b01
WRAP = 0b10
class AXIxRESP(enum.IntEnum):
OKAY = 0b00
EXOKAY = 0b01
SLVERR =... |
import wave
import matplotlib.pyplot as plt
import numpy as np
import os
import math
#读取本地音频
f = wave.open("./data/audio.wav",'rb')
#获取音频参数
params = f.getparams()
nchannel,sampwidth,framerate,nframes = params [:4]
print(nchannel,sampwidth,framerate,nframes)
#2 2 44100 6140484
#读取多通道音频
strData = f.readframes(nframes)... |
/******************************************************************
** This code is part of Breakout.
**
** Breakout is free software: you can redistribute it and/or modify
** it under the terms of the CC BY 4.0 license as published by
** Creative Commons, either version 4 of the License, or (at your
** option) any lat... |
import React from "react";
import { NavLink } from "react-router-dom";
const Navbar = () => {
return (
<>
<div className="container-fluid">
<div className="row">
<div className="col-10 max-auto nav-bg">
<nav className="navbar navbar-expand-lg navbar-light bg-light">
... |
/* Copyright (c) 2019-2023 Griefer@Work *
* *
* This software is provided 'as-is', without any express or implied *
* warranty. In no event will the authors be held liable for any damages *
... |
//
// SwiftUIView.swift
// Fructs
//
// Created by Александр Тарасевич on 09.03.2022.
//
import SwiftUI
struct SwiftUIView: View {
var fruit: Fruit
@State private var isAnimating: Bool = false
var body: some View {
ZStack {
VStack(spacing: 20 ) {
... |
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { User } from '../../types';
import { Status } from '../../types/fetchStatus';
import { getFollowUsers } from './asyncActions';
interface UsersState {
users: User[];
error: unknown;
lastPage: number | null;
currentPage: number;
status: Status;... |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// The <code>chrome.declarativeNetRequest</code> API is used to intercept and
// perform actions on a network request by specifying declarative rules.
nam... |
import { Batch, createPairId, isBatch, Pair } from "../models/AppConfig";
import IProvider from "../providers/IProvider";
import logger from './LoggerService';
export default class NetworkQueue {
queue: Batch[] = [];
processingIds: Set<string> = new Set();
intervalId?: NodeJS.Timer;
public id: string;... |
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
import { categoryService } from "./categoryService";
const initialState = {
categories: [],
isLoading: false,
isError: false,
isSuccess: false,
message: "",
};
// I LEAVE THIS HERE IN CASE I NEED TO DO A VIEW TO ADD OR DELETE CATEGORIES, MEAN... |
// Implement permutation type that transforms union types into the array that includes permutations of unions.
{
type Permutation<T, K = T> =
[T] extends [never]
? []
: K extends K
? [K, ...Permutation<Exclude<T, K>>]
: never;
// 'a' | 'b' | 'c' extends 'a' | 'b' | 'c'
... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { BilleterieComponent } from './billeterie/billeterie.component';
import { ConcertComponent } from './concert/concert.component';
import { ConcertsComponent } from './... |
import { PlusCircleIcon } from '@heroicons/react/24/solid';
import React from 'react'
import { Draggable, Droppable } from 'react-beautiful-dnd'
import TodoCard from './TodoCard';
import { useBoardStore } from '@/store/BoardStore';
import { useModalStore } from '@/store/ModalStore';
type Props = {
id: TypedColumn... |
import axios from 'axios';
export const listPublishers = () => async (dispatch, getState) => {
try {
dispatch({ type: 'PUBLISHER_LIST_REQUEST' }); //reduceru
const {
userLogin: { userInfo },
} = getState();
const config = {
headers: {
Authorization: `Bearer ${userInfo.token}`,
... |
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: 'folder/:id',
loadChildren: () => import('./folder/folder.module').then( m => m.FolderPageModule)
},
{
path: '',
redirectTo: 'folder',
pathM... |
import 'package:flutter/material.dart';
import 'package:hell_ew_s_application2/presentation/login_screen/login_screen.dart';
import 'package:hell_ew_s_application2/presentation/signup_screen/signup_screen.dart';
import 'package:hell_ew_s_application2/presentation/home_container_screen/home_container_screen.dart';
impor... |
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it w... |
import React from 'react';
import Select from 'react-select';
import { useField } from 'formik';
import styles from "./Dropdown.module.css";
function Dropdown(props) {
const [field, state, {setValue, setTouched}] = useField(props.field.name);
const onChange = ({value}) => {
setValue(value);
};
const co... |
import { createAsyncMiddleware } from '@onekeyhq/json-rpc-engine';
import { ethErrors } from 'eth-rpc-errors';
import handlersCFX from 'wallets/providers/CFX/dapp/handlers';
import log from 'loglevel';
import bgHelpers from '../../../../src/wallets/bg/bgHelpers';
import utilsApp from '../../../../src/utils/utilsApp';
i... |
import React from 'react'
import { Button, Form, Label } from './components'
import classes from './App.module.scss'
import Navbar from './components/templates/Navbar/Navbar'
function App() {
return (
<div className={classes.app}>
<Navbar
tabs={{ home: '/home', about: '/about', dashboard: '/dashbo... |
import cv2
import dlib
import numpy as np
import math
# Load the pre-trained face detection model
face_cascade = cv2.CascadeClassifier('haarcascades/haarcascade_frontalface_default.xml')
# Load the facial landmark predictor model
predictor = dlib.shape_predictor('shape_predictor_68_face_landmarks.dat')
# Load the im... |
Classes Wrapper:
- As classes Wrappers são objetos que encapsulam os tipos primitivos, no entanto das classes wrapper tipo numericos são extenções da classe number
e por ser uma extensão segue todas as regras de um objeto assim como a regra do polimorfismo.
- nas classes primitivas são aplicadas as gregras de tam... |
# Tenhou Paifu Logger
[<img src="https://img.shields.io/pypi/v/PaifuLogger?style=plastic"> <img src="https://img.shields.io/pypi/wheel/PaifuLogger?style=plastic">](https://pypi.org/project/Tenhou-Paifu-Logger/) [<img src="https://img.shields.io/github/stars/Jim137/Tenhou-Paifu-Logger?style=plastic">](https://github.co... |
/* MapleLib - A general-purpose MapleStory library
* Copyright (C) 2009, 2010, 2015 Snow and haha01haha01
* 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... |
/**
* @file
* Attaches behaviors for the Tour module's toolbar tab.
*/
(function ($, Backbone, Drupal, document) {
"use strict";
/**
* Attaches the tour's toolbar tab behavior.
*
* It uses the query string for:
* - tour: When ?tour=1 is present, the tour will start automatically
* after the page has ... |
\documentclass{tufte-handout}
\newcommand{\blenderVersion}{2.79}
\newcommand{\programName}{Rhorix}
\newcommand{\fullName}{Rhorix 1.0.0, M J L Mills, 2017, github.com/MJLMills/rhorix}
\newcommand{\programWebsite}{www.mjohnmills.com/rhorix}
\newcommand{\programCitation}{Mills, Sale, Simmons, Popelier, J. Comput. Chem., ... |
const userInfo = require('../model/schema/user.info.schema')
const userCredentials = require('../model/schema/user.crendentials.schema')
const sequelize = require('../config/database')
const { encrypt, compare } = require('../helpers/handler.bcrypt')
const UserInfo = require('../model/schema/user.info.schema')
const Er... |
# Inisialisasi variabel
x, y, z = 1,2,2 # Tebakan awal
n_iterasi = 3
T1, T2, T3 = 2 , 4, 3
# Inisialisasi daftar untuk menyimpan galat di setiap iterasi
galat_x = []
galat_y = []
galat_z = []
print("Psulusi:")
print(f'x : {T1}\n'
f'y : {T2}\n'
f'z : {T3}\n')
print("Tebakan awal:")
print(f'x : {x}\n'
... |
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:sec="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>All Users</title>
<link th:href="@{css/users.css}" rel="stylesheet"/>
<link th:href="@{css/home.css}" rel="stylesheet" />
</head>
<body>
<ul>
<li><a ... |
package by.tms.authCalculation.servlet;
import by.tms.authCalculation.config.TypeMessageEnum;
import by.tms.authCalculation.entity.FrontMessage;
import by.tms.authCalculation.entity.User;
import by.tms.authCalculation.exception.ParametersNotPassedException;
import by.tms.authCalculation.exception.UserNotFoundException... |
import * as React from "react";
import { useColorScheme } from "@mui/joy/styles";
import { IconButton } from "@mui/joy";
import LightModeIcon from "@mui/icons-material/LightMode";
import DarkModeIcon from "@mui/icons-material/DarkMode";
export const ModeToggle = () => {
const { mode, setMode } = useColorScheme();
... |
"use client";
import React, { useState, useEffect } from "react";
import { MdOutlineEmail } from "react-icons/md";
import { AiOutlineLock } from "react-icons/ai";
import ModalWrapper from "./ModalWrapper";
import Link from "next/link";
import Input from "@/app/atoms/Input";
import { useRouter, useSearchParams } from "n... |
// ignore_for_file: avoid_print
import 'package:flutter/material.dart';
import 'package:flutter_learn/pages/home_page.dart';
import 'package:flutter_learn/pages/login_page.dart';
import 'package:flutter_learn/pages/main_page.dart';
import 'package:flutter_learn/styles/app_colors.dart';
void main() {
runApp(const My... |
import { useState } from 'react';
import { AccordionData } from 'interfaces/Accordion';
import styles from './../styles/accordion.module.scss';
import mainStyles from './../styles/main.module.scss';
export default function Accordion({ data }: { data: AccordionData[] }) {
const [activeAccordionIndex, setActiveAcco... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Added a title for my fictitious brand -->
<title>Automoblox</title>
<!-- CSS Normalize -->
<link rel="stylesheet" href="css/normalize.css">
<!-- Lin... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Traits\ModelValidatable;
class ClientRegulation extends Model
{
use ModelValidatable;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'client_regulations';
/**
* Th... |
export interface User {
id?: number;
name: string;
}
export interface gameHistory {
userId: number;
difficulty: string;
score: number;
}
export interface questionBlock {
gameHistory: number;
questionText: string;
answers: string;
submittedAnswer: string;
correctAnswer: string;
}
export interface ... |
import { NgModule } from '@angular/core';
import { Routes,RouterModule } from '@angular/router';
import { LandingpageComponent } from 'src/app/components/landingpage/landingpage.component';
import { RegisterComponent } from 'src/app/components/register/register.component';
import { LoginComponent } from 'src/app/comp... |
import { Component, OnInit } from '@angular/core';
import { Job } from '../../types/job.type';
import { School } from '../../types/school.type';
import { Reference } from '../../types/reference.type';
import { GraphqlService } from '../graphql.service';
import { GET_JOBS_QUERY } from '../../graphql/queries/get-jobs';
i... |
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import { configure, shallow } from 'enzyme';
import { Task } from './task';
configure({ adapter: new Adapter() });
test('Component Task should match snapshot', () => {
const component = shallow(<Task title='Title' isCompleted={false} onComplete={() => {}}/>)... |
package com.techelevator.hotels.services;
import com.techelevator.hotels.model.City;
import com.techelevator.hotels.model.Hotel;
import com.techelevator.hotels.model.Review;
import org.springframework.web.client.RestTemplate;
public class HotelService {
private static final String API_BASE_URL = "http://localhos... |
import { React,useState,useContext } from 'react'
import GithubContext from '../../context/github/GithubContext'
import AlertContext from '../../context/alert/AlertContext'
import Alerts from '../layout/Alerts'
import { searchUsers } from '../../context/github/GithubActions'
function UserSearch() {
const [text,... |
import { NavLink } from "react-router-dom";
import { links } from "../data";
import "./navbar.css";
import { useState } from "react";
const NavBar = () => {
const[showMenu, setShowMenu] = useState (false);
return (
<nav className="nav">
<div className={`${showMenu ? 'nav__menu show-menu' : ... |
---
title: Reduzindo a lacuna entre a lista de tarefas e o rodapé em Aspose.Tasks
linktitle: Reduzindo a lacuna entre a lista de tarefas e o rodapé em Aspose.Tasks
second_title: API Java Aspose.Tasks
description: Aprenda como reduzir a lacuna entre as listas de tarefas e rodapés do MS Project usando Aspose.Tasks for Ja... |
import 'package:flutter/material.dart';
import 'package:journal/pages/home.dart';
import 'package:journal/blocs/authentication_bloc.dart';
import 'package:journal/blocs/authentication_bloc_provider.dart';
import 'package:journal/blocs/home_bloc.dart';
import 'package:journal/blocs/home_bloc_provider.dart';
import 'pack... |
package com.ssac.ah_jeom.src.main
import android.os.Bundle
import android.util.Log
import android.widget.Toast
import com.kakao.sdk.common.util.Utility
import com.ssac.ah_jeom.R
import com.ssac.ah_jeom.src.main.home.HomeFragment
import com.ssac.ah_jeom.config.BaseActivity
import com.ssac.ah_jeom.databinding.ActivityMa... |
import BigNumber from 'bignumber.js';
import { CryptoCurrency } from '../../../domain/models/CryptoCurrency';
import { CryptoNetwork } from '../../../domain/models/CryptoNetwork';
import { CurrencyProvider } from '../../Crypto/providers/CryptoProvider';
import * as HttpAdapter from '../../HttpAdapter';
const BTC_LOGO ... |
@isTest
public class Test_VVSCustomHelper {
//Test #1 - Test our Type Field is populated on our two records based on Record Type
static testmethod void testRunVVSLogic_Test1() {
Util.byPassAllTriggers = true;
// Modified By - Rajeev Jain - 05Aug2020 - CR-20200218-13783
Acco... |
import { fireEvent, render, screen } from '@testing-library/react';
import Button from '..';
describe('Button component', () => {
it('renders a button with the provided label', () => {
const label = 'Click me';
render(<Button label={label} />);
const button = screen.getByRole('button');
expect(butto... |
package com.yufeng.concurrency.jcip.part1.chapter04;
import com.yufeng.concurrency.jcip.annotations.ThreadSafe;
import com.yufeng.concurrency.jcip.part3.Point;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Concu... |
import vscode, { MarkdownString, ProgressLocation, ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri, commands, env, window, workspace } from "vscode";
import { TreeDataProvider } from "vscode";
import { Config, JobManager } from "../../config";
import { JobInfo, SQLJobManager } from "../../connection/manager";
import... |
---
toc: True
comments: True
layout: post
title: AI Box
description: Chat box
courses: {'compsci': {'week': 0}}
type: hacks
---
<style>
body {
background-color: lavender;
}
</style>
<html>
<head>
<title>Formatted Math Chatbox</title>
<style>
/* Container Styles */
.container... |
####
# Base
####
extend type Mutation {
"Create a flat rate fulfillment method"
createFlatRateFulfillmentMethod(
"Mutation input"
input: CreateFlatRateFulfillmentMethodInput!
): CreateFlatRateFulfillmentMethodPayload!
"Update a flat rate fulfillment method"
updateFlatRateFulfillmentMethod(
"Muta... |
<?php
namespace Laminas\Db\Sql\Predicate;
use Laminas\Db\Sql\AbstractExpression;
use Laminas\Db\Sql\Exception;
use Laminas\Db\Sql\Select;
use function array_fill;
use function count;
use function gettype;
use function implode;
use function is_array;
use function vsprintf;
class In extends AbstractExpression impleme... |
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';
export type JobsDocument = Jobs & Document;
@Schema({ collection: 'jobs', timestamps: true, versionKey: false })
export class Jobs {
@Prop({ required: true })
name: string;
@Prop({ required: true, unique: true,... |
import { wordWrap } from '../../util/strings/wordWrap';
import { TAB, isSimpleType, normalizeKey } from './util';
const formatComment = (comment, __) => {
if (!comment)
return '';
const lines = wordWrap(comment, { width: 80 - 3 - __.length });
return __ + '/**\n' + __ + ' * ' + lines.join('\n' + __ ... |
/* eslint-disable react/prop-types */
import styled from "styled-components";
const StyledSelect = styled.select`
font-size: 1.4rem;
padding: 0.8rem 1.2rem;
border: 1px solid
${(props) =>
props.type === "white"
? "var(--color-grey-100)"
: "var(--color-grey-300)"};
border-radius: var(-... |
import React from 'react'
import { IntlProvider } from 'react-intl'
import { Route, Routes } from 'react-router-dom'
import { useLocale } from '@app/hooks'
import css from './App.css'
import { Home } from './routes'
const App = () => {
const { locale, messages } = useLocale()
return (
<IntlProvider locale=... |
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Model>
*/
class StudentFactory extends Factory
{
/**
* Define the model's default state.
*
* @re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.