text stringlengths 184 4.48M |
|---|
import React from 'react';
import { motion } from 'framer-motion';
import { Link, useNavigate } from 'react-router-dom';
import * as userActions from '../../redux/user/user-actions';
import { FaUserAlt } from 'react-icons/fa';
import { HiHome } from 'react-icons/hi';
import ModalCart from './ModalCart/ModalCart';
imp... |
package com.example.day09;
public class Smartphone {
// 내부 인터페이스
public interface Camera {
void takePhoto();
}
// 내부 인터페이스를 구현하는 내부 클래스
public class BasicCamera implements Camera {
@Override
public void takePhoto() {
System.out.println("Take a picture");
... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TinDog</title>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
... |
// Copyright (C) 2008 Jesse Jones
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
/... |
import express, { Request, Response } from 'express';
const app = express();
const port = process.env.PORT || 80;
import { createServer } from 'http';
import { Server } from 'socket.io';
import Docker from 'dockerode';
var docker = new Docker();
const server = createServer(app);
const io = new Server(server, {
tra... |
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Proveedor>
*/
class ProveedorFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
... |
import 'package:abc_banking/Models/accountClass.dart';
import 'package:abc_banking/Models/customerClass.dart';
import 'package:abc_banking/Provider/auth_provider.dart';
import 'package:abc_banking/Screens/Mobile/AccountSettings.dart';
import 'package:abc_banking/Screens/Mobile/Action.dart';
import 'package:abc_banking/... |
#include <stdlib.h> /* exit, atoi, malloc, free */
#include <stdio.h>
#include <unistd.h> /* read, write, close */
#include <string.h> /* memcpy, memset */
#include <sys/socket.h> /* socket, connect */
#include <netinet/in.h> /* struct sockaddr_in, struct sockaddr */
#include <netdb.h> /* struct hosten... |
# 10 7
# 1 3 5 7 9 11 13 15 17 19
def binary_search(array, target, start, end):
while start <= end:
mid = (start + end) // 2 # divide
if array[mid] == target: # 중간 값과 타겟 값이 같을 경우
return mid
elif array[mid] > target: # 타겟 값이 중간 값 보다 작을 경우
end = mid - 1
else... |
package com.jws.transcomp.api.service.impl;
import com.jws.transcomp.api.models.Employee;
import com.jws.transcomp.api.repository.EmployeeRepository;
import com.jws.transcomp.api.repository.RoleRepository;
import com.jws.transcomp.api.service.base.UserService;
import org.springframework.security.crypto.bcrypt.BCryptPa... |
import { EnvelopePSGModule } from "./envelope";
import { LengthPSGModule } from "./length";
import { PSG } from "./psg";
const SERIALIZE_FIELDS: (keyof NoisePSG)[] = [
'enabled',
'phaseClock',
'clockShift',
'clockDivider',
'lfsr',
'lfsr7Bit',
];
export class NoisePSG implements PSG {
output: number = 0;... |
// Updating the main window’s tree view
// Copyright © 2009 The University of Chicago
#include "linguisticamainwindow.h"
#include "MiniLexicon.h"
#include "Lexicon.h"
#include "TreeViewItem.h"
#include "LPreferences.h"
#include "StateEmitHMM.h"
#include "CorpusWord.h"
#include "DLHistory.h"
#include "Suffix.h"
#includ... |
import React, { useState, useEffect } from "react";
import { useHistory, useParams, useLocation } from "react-router-dom";
import axios from "axios";
import Form from "react-bootstrap/Form";
import InputGroup from "react-bootstrap/InputGroup";
import Button from "react-bootstrap/Button";
import moment from "moment";
f... |
import React, { useEffect, useState } from "react";
import axios from "axios";
import { FiArrowRight, FiLayers } from "react-icons/fi";
import { FaRegEdit } from "react-icons/fa";
import { AiOutlineDelete } from "react-icons/ai";
import Table from "../../../components/Table";
import { useLocation, useNavigate } from ... |
import { Book } from '../../../store'
import "./BookList.css"
import ConfirmationModal from '../confrimationModal/ConfirmationModal'
import { useEffect, useState } from 'react'
import { DragDropContext, Draggable, DropResult, Droppable } from 'react-beautiful-dnd'
import { useStore } from '../../../store'
import { MdOu... |
<?php
/**
* APIEventHandler.php
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Soft... |
/*
* The MIT License (MIT) Copyright (c) 2020-2023 artipie.com
* https://github.com/artipie/artipie/blob/master/LICENSE.txt
*/
package com.artipie.http;
import com.artipie.asto.Content;
import com.artipie.asto.Storage;
import com.artipie.http.auth.Authentication;
import com.artipie.http.auth.BasicAuthzSlice;
import... |
const express = require("express");
const dotenv = require("dotenv");
const morgan = require("morgan");
const bodyparser = require("body-parser");
const path = require("path");
const connectDB = require("./server/database/connection");
const { connect } = require("http2");
const app = express();
dotenv.config({ path... |
"""User model tests."""
import os
from unittest import TestCase
from sqlalchemy import exc
from models import db, User, Message, Follows
os.environ['DATABASE_URL'] = "postgresql:///warbler-test"
from app import app
db.create_all()
class UserModelTestCase(TestCase):
"""Test views for messages."""
... |
package article.command;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import article.model.ArticleData;
import article.service.ArticleNotFoundException;
import article.service.ModifyArticleServ... |
import fs from 'fs-extra'
import fg from 'fast-glob'
import matter from 'gray-matter'
import { resolvePath } from './utils'
import { slugify } from '.'
export function resolveTags(routes: any[]) {
const tagMap: { [key: string]: { path: string; blogs: string[] } } = {}
routes
.filter(item => item.meta?.layout ... |
package net.javaguides.springboot.usecase;
import net.javaguides.springboot.domain.dtos.CampanhaDTO;
import net.javaguides.springboot.domain.entity.Campanha;
import net.javaguides.springboot.domain.repository.CampanhaRepository;
import net.javaguides.springboot.usecase.exceptions.ObjectNotFoundException;
import org.sp... |
import { LayoutService } from './../layout.service';
import { ActivatedRoute, Router } from '@angular/router';
import { LocalStorageService } from './../../Auth/localStorageLogin/local-storage.service';
import {
FormGroup,
FormBuilder,
FormControl,
Validators,
} from '@angular/forms';
import { OwlOptions } fro... |
import { useWeb3React } from "@web3-react/core";
import React from "react";
import Sale from "@components/Sale";
import Spinner from "@components/Spinner";
import RequestAccess from "@components/RequestAccess";
import { useData } from "@hooks/useData";
import "@styles/Sales.scss";
const Sales = () => {
const { activ... |
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HTTP_INTERCEPTORS } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { AlertController } from "ionic-angular";
import { Observable } from "rxjs/Rx";
import { FieldMessage } from "../models/field_message";
import { StorageServi... |
path name matching capability of bash shell - GLOBBING
* -any string of O or more characters
? -any single character
~ -current users home directory
~username -usernames home directory
~+ -current working directory
~- -previous working directory
[abc...] -any one character in the enclosed class (EG: ls [a]* -it ... |
package com.example.tracker_presentation.tracker_overview.components
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import com.example.core.R
import java.time.LocalDate
import java.time.format.DateTimeFormatter
@R... |
import React from "react";
import { useDispatch } from "react-redux";
import placeholderImg from '../assets/img-placeholder-dark.jpg';
import { fetchVideoDetails, streamTypeAction } from "../features/common/commonSlice";
import { truncateText } from "../helper/helper";
import Ratings from "./Ratings";
function Card(pr... |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Event 처리(addEventListener)</title>
<script>
/*
[DOM Event 종류]
1. 마우스
- mouseover, mouseout
- mousedown -> mouseup -> click 클릭 한 번에 이렇게 동작함
- mousedown -> mouseup -> click ... mousedown -> mouseup -> click -> duble click 더블 클릭은 이렇게
2. 키보드
... |
import React from "react";
import { useSelector } from "react-redux";
import { useParams, Link } from "react-router-dom";
import { Button } from "antd";
import CharacterCard from "../CharacterCard/CharacterCard";
import styles from "./answers.module.css";
function Answers() {
const { rightAnswers } = useSelector((sto... |
<?php
// Define a class Person
class Person{
// Properties
private string $name;
private int $age;
//Methods
function setName(string $firstName, string $lastName): void {
$this->name = $firstName . ' ' . $lastName;
}
function setAge(int $age):... |
<script>
import * as THREE from "three";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
import SplineLoader from "@splinetool/loader";
import { onMount } from "svelte";
// camera
onMount(() => {
// camera
const camera = new THREE.OrthographicCamera(
window.inner... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>页面布局之三栏中间自适应布局</title>
<style>
* {
padding: 0;
margin: 0;
}
.container>div {
min-he... |
--
Java array is an object which contains elements of a similar data type.
Array in Java is index-based, the first element of the array is stored at the 0th index and so on.
In Java, array is an object of a dynamically generated class. Java array inherits the Object class, and implements the Serializable as well as C... |
import { useState } from 'react'
import Image from 'next/image'
import { useRouter } from 'next/router'
import { Paper } from '@mui/material'
import Layout from 'components/layout'
import { jLeagueTeams } from 'utils/TeamData'
import { TeamDataType } from 'types/internal'
import Meta from 'components/layout/Head'
impor... |
import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { YearComputerWork } from '../entities/year-computer-work.entity';
import { IYearComputerWorkOptions, YearComputerWorkPaginationResult } ... |
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using UnityEditor;
using UnityEngine.InputSystem.Utilities;
namespace UnityEngine.InputSystem.Editor
{
/// <summary>
/// Helpers for working with <see cref="SerializedProperty"/> in the editor.
/// ... |
import Document, { Html, Head, Main, NextScript } from 'next/document'
import { ReactElement } from 'react'
class MyDocument extends Document {
render(): ReactElement {
return (
<Html lang="pt-BR" dir="ltr">
<Head>
<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" conte... |
<!DOCTYPE html>
<html lang="en">
<head>
<link href="styles.css" rel="stylesheet">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-M0CHK7VL1R"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(argumen... |
//
// BugDataService.swift
// ProtonMail
//
//
// Copyright (c) 2019 Proton Technologies AG
//
// This file is part of ProtonMail.
//
// ProtonMail 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, eith... |
{% load static %} {# Necesario para los estilos #}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{% static '/styles/main.css' %}"> {... |
Imports System.IO
Imports System.Text
Imports System.Xml
Imports System.Text.RegularExpressions
Public Class Form1
Private scriptEncoding As Encoding ' Encoding del file dello script caricato
Private Sub LoadScriptButton_Click(sender As Object, e As EventArgs) Handles LoadScriptButton.Click
Try
... |
<!DOCTYPE html>
<html lang="en" dir="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="/css/register.css">
<link rel="stylesheet" href="/css/loader.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" inte... |
$Id$
Setting up the source trees
Check out the EDK2 trunk/edk2 to some directory of your choice (the command
creates an edk2 subdirectory):
svn checkout \
--username guest --password guest \
-r9572 https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2 edk2
Note for giters: r9572 = 1dba456e1a72a3c2d89... |
const { Client } = require('whatsapp-web.js');
const qrcode = require('qrcode-terminal');
const express = require('express');
const bodyParser = require('body-parser');
const axios = require('axios');
const app = express();
const port = process.env.PORT || 8000;
app.use(bodyParser.json());
// Criar uma única instânc... |
<template>
<el-card>
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="按权限查询">
<el-input v-model="query.permission" placeholder="按权限查询"></el-input>
</el-form-item>
<el-form-item label="管理员等级">
<el-select v-model="query.mlevel" placeholder="管理员等级">
<... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
// player moving from side to side
public class movement : MonoBehaviour
{
public float moveSpeed = 5f;
public float jumpForce = 10f;
private Rigidbody2D rb;
private ... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Enemy : MonoBehaviour
{
//引用
protected Player player;
protected Transform playerTrans;
protected Vector3 playerLastPos;
protected Rigidbody2D rigid;
//属性
protecte... |
import os
from scipy.special import erfc
import sklearn
import numpy as np
import tensorflow as tf
from tensorflow import keras
import matplotlib.pyplot as plt
# 数据准备
(X_train_full, y_train_full), (X_test,
y_test) = keras.datasets.fashion_mnist.load_data()
X_train_full = X_train_full / 2... |
package main
import (
"fmt"
"log/slog"
"net/http"
"runtime/debug"
"strings"
"bbccdd/internal/response"
"bbccdd/internal/validator"
)
func (app *application) reportServerError(r *http.Request, err error) {
var (
message = err.Error()
method = r.Method
url = r.URL.String()
trace = string(debug.S... |
package AdvanceDataStructure;
import java.util.Arrays;
public class RangeUpdateSegmentTree {
private int[] segmentTree;
private int[] lazy;
private int[] nums;
public RangeUpdateSegmentTree(int[] nums) {
this.nums = nums;
int n = nums.length;
// The size of the segment tree i... |
"use client";
//The root component for each baySide containing all the info about the viz
import WeatherTable from "./weatherTable";
import { useEffect, useState } from "react";
import { BaySide, RawWeatherData, RawTideData, RawSwellData } from "./types";
import LoadingSpinner from "./loadingSpinner";
import VideoViewe... |
<script>
import { loading, toast } from "$lib/store";
import { onMount } from "svelte";
import { db } from "$lib/db";
import { t } from "$lib/lang";
import { fnSelect } from "$lib/ui/fnSelect";
import { fnModal } from "floeui/dist/directives";
/**
* @type {import("pocketbase").ListResult<import("pocke... |
package br.com.fiap.postech.techchallenge.application.usecase;
import br.com.fiap.postech.techchallenge.application.domain.Pedido;
import br.com.fiap.postech.techchallenge.application.domain.StatusPedido;
import br.com.fiap.postech.techchallenge.application.exception.DominioException;
import br.com.fiap.postech.techch... |
import { DriversRouter } from "@drivers/interfaces";
import { UsersRouter } from "@users/interfaces/http";
import { v4 as uuidV4 } from "uuid";
import express, { NextFunction, Request, Response } from "express";
class App {
expressApp: express.Application;
constructor() {
this.expressApp = express();
thi... |
sum_group_n <- length(unique(sum_bar_data$group))
sum_legend_title <- paste(toTitleCase(gsub("_"," ",protocol)),"\n",toTitleCase(splice)," ",spikein,"\nNormalised\n",feature,sep="")
sum_pie_data$Label <- ifelse(sum_pie_data$Numbers > 0,as.character(sum_pie_data$Numbers),NA)
i_group_levels <- unlist(lapply(i_group,fun... |
import React from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Navbar from "./components/Navbar";
import MainPage from "./pages/MainPage";
import AuthPage from "./pages/AuthPage";
import DesktopPage from "./pages/DesktopPage";
import MvpPage from "./pages/MvpPage";
import LabPage f... |
// Author : $Author$
// Version: $Revision$
// Date : $Date$
// Url : $URL$
// Copyright: (C) 2012-2013 Gregor Cramer
// 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 ver... |
import edu.princeton.cs.algs4.Graph;
import edu.princeton.cs.algs4.In;
import edu.princeton.cs.algs4.StdOut;
import java.util.TreeSet;
import java.util.HashSet;
import java.util.Set;
import java.util.Stack;
public class BoggleSolver {
private int maxLen;
private TSTDict tst = new TSTDict();
private static int R... |
.container
- breadcrumb :event_search
= breadcrumbs separator: " › "
.title
%h2= I18n.t('events.search.event-search')
.row.card-box
.left-content.col-12.col-lg-3.mt-4
.card.mb-3
.card-body
= form_tag events_search_path, method: :get do
= hidden_field_tag :sea... |
<x-layout>
<x-section name="styles">
<!-- Some JS and styles -->
<title>Hello World</title>
<link rel="stylesheet" type="text/css" href="{{ URL::asset('texteditor/trix.css') }}">
<style>
.hr-lines:before {
content: " ";
... |
export interface PlayerInfo {
playerId: string;
nickname: string;
class: string;
level: number;
unitUid?: number;
isOffline?: boolean;
isReady?: boolean;
}
export interface RoomInfo {
uid: number;
capacity: number;
scenarioId: string;
joinedUsers: PlayerInfo[];
host: Pla... |
/**
* @jest-environment jsdom
*/
/**
* @jest-environment jsdom
*/
import { Observer } from "../types";
import { Observable } from "./observable";
export function fromEvent(
el: HTMLElement,
eventName: "click" | "change" | "error" | "input"
) {
function fromEventProducer(observer: Observer){
try {
... |
import scala.annotation.implicitNotFound
@implicitNotFound("You need to define a CompareT for ${T}")
abstract class CompareT[T] {
def isSmaller(i1: T, i2: T): Boolean
def isLarger(i1: T, i2: T): Boolean
}
def genInsert[T: Ordering](item: T, rest: List[T]): List[T] = {
val cmp = implicitly[Ordering[T]]
rest ma... |
/*
* AsyncWorldEdit a performance improvement plugin for Minecraft WorldEdit plugin.
* Copyright (c) 2019, SBPrime <https://github.com/SBPrime/>
* Copyright (c) AsyncWorldEdit contributors
*
* All rights reserved.
*
* Redistribution in source, use in source and binary forms, with or without
* modification, are ... |
using SocialNetwork.BLL.Exceptions;
using SocialNetwork.BLL.Models;
using SocialNetwork.DAL.Entities;
using SocialNetwork.DAL.Repositories;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SocialN... |
fin <- read.csv(here::here("Data prep","P3-Future-500-The-Dataset.csv"), stringsAsFactors = TRUE, na.strings = c(""))
# Quick EDA ----
head(fin, 10)
tail(fin)
str(fin)
summary(fin)
# Data Wrangling
# Change from non-factor to factor ----
fin$ID <- factor(fin$ID)
fin$Inception <- factor(fin$Inception)
# Factor Va... |
//go:build unit || all
package sales_test
import (
"context"
"errors"
"testing"
"time"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/uesleicarvalhoo/sorveteria-tres-estrelas/backend/product"
productsMocks "github.com/uesleicarvalhoo/sorveteria-t... |
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from 'environments';
import { Observable } from 'rxjs';
import type { Task } from './models';
const BASE_URL = '/todos';
export type GetTasksListParams = {
userId?: number;
completed?: boolean;
};... |
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="spform" ... |
<template>
<div class="wrapper">
<div class="section">
<div class="flex items-center flex-col my-2">
<h2
class="font-black"
@click="editTitle(true)"
v-if="!showTitleInput"
:style="{
'font-size': sectionTitleSize + 'px',
color: sectionTi... |
---
changelog:
- 2024-02-03, gpt-4-0125-preview, translated from English
date: 2024-02-03 19:04:51.124098-07:00
description: "C\xF3mo hacerlo: Clojure, al ser un lenguaje JVM, te permite utilizar\
\ directamente los m\xE9todos de String de Java. Aqu\xED tienes un ejemplo b\xE1\
sico de c\xF3mo\u2026"
lastmod: '2024... |
from collections import deque
import copy
from time import sleep
from clear import clear
from models import RobotDelivery
# map -> https://miro.com/welcomeonboard/eG9MVm53TUJYQjRtOTNkSEhnamRWM2RCYVBDUklUckVMN3k3OUdsb2hQVjdJcEhpSmY1NjVJUnc0S3V4OHJZVXwzNDU4NzY0NTM2MDUzNzg0NTg4fDI=?share_link_id=306437873724
maps = [[4,... |
package portals.benchmark
class BenchmarkConfig:
private var config = Map.empty[String, String]
private var required = Set.empty[String]
def args: List[String] = config.flatMap { case (k, v) => List(k.toString(), v.toString()) }.toList
// check if required config parameters are set
private def checkRequire... |
##
### Set Up a Local Redis Cache:
Objective: Learn how to set up and use Redis as a local caching solution.
Exercise: Install Redis on your local machine. Cache and retrieve a simple string.
Explanation: This demonstrates remote cache and key expiration concepts. Use the SET command with an expiry time and GET comma... |
import { useSelector } from 'react-redux';
import classes from './Calendar.module.css';
import CalendarFooter from './CalendarFooter/CalendarFooter.jsx';
import CalendarBody from './CalendarBody/CalendarBody.jsx';
import { USER_ROLE } from '../core/UserRoleEnum';
import {useEffect, useState} from "react";
import Event... |
/*
* Copyright 1999-2023 Percussion Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... |
import { InMemoryAnswersRepository } from 'test/repositories/in-memory-answers-repository';
import { AnswerQuestionUseCase } from './answer-question';
import { UniqueEntityID } from '@/core/entities/unique-entity-id';
import { InMemoryAnswerAttachmentsRepository } from 'test/repositories/in-memory-answer-attachments-re... |
/*
* Abstract syntax tree and symbol table for ordinary differential equations.
* The datastructures are built by ode-parser, thus available after odeparse().
*/
#ifndef AST_H
#define AST_H
#include <stdio.h>
#include <string>
#include <vector>
#include <map>
struct AstNumber;
struct AstSymbol;
struct AstVariable;
s... |
from torchinfo import summary
from prettytable import PrettyTable
from matplotlib import pyplot as plt
import seaborn as sns
from sklearn.metrics import roc_curve,auc
# Print a Comprehensive Summary of the Model, Modules, Submodules, Parameter Counts
def model_summary(model, generator):
review_batch, label, mask_... |
package com.example.notes;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
import java.io.Serializable;
@Entity(tableName = "notes")
public class Note implements Serializable {
@PrimaryKey(autoGenerate = true)
private int id;
p... |
/**
* IJA 2018/2019
* Projekt - Šachy/Dáma
*
* Abstraktní třída pro figurky
*
* @author Radek Duchoň (xducho07)
* @author Jan Juda (xjudaj00)
* @author Josef Oškera (xosker03)
*/
package ija2019.game;
/**
* Abstraktní třída pro figurky
*/
public abstract class Figure{
private boolean jeBily;
prote... |
import ContactItem from './ContactItem/ContactItem';
import css from './ContactList.module.css';
import { useSelector } from 'react-redux';
import { selectFilteredContacts } from 'redux/selectors';
export default function ContactList() {
const contacts = useSelector(selectFilteredContacts);
return (
<table cl... |
"""
Copyright 2017 Pedro Santos <pedrosans@gmail.com>
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 distribu... |
/********************************************************************
** Image Component Library (ICL) **
** **
** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
** Neuroinformat... |
import React from "react";
export const useOutsideClick = (callback) => {
const ref = React.useRef();
React.useEffect(() => {
const handleClick = (event) => {
if (ref.current && !ref.current.contains(event.target)) {
callback();
}
};
document.addEventListener("click", handleClick)... |
const express = require('express');
const mongoose = require('mongoose');
const dotenv = require('dotenv');
const morgan = require('morgan');
const passport = require('passport');
const exphbs = require('express-handlebars');
const session = require('express-session');
const MongoStore = require('connect-mongo');
const... |
# Demo-bug-report-generator
Demo to compare bug reports generated by LLM or from scratch
# Introduction
This is a general demonstration of how we can aid the beginners to create bug reports by simply inputting ONLY 4 parameters, i.e. 2 pairs of request-response for normal-browsing, and that of successfully hacked.
T... |
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
// express 라이브러리 기본 셋팅
const express = require('express');
require('dotenv').config()
const app = express();
const http = require('http').createServer(app);
const {Server} = require('socket.io')
const io = new Server(http);
const bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({ extended: true }))
c... |
# Today I Learned 📖
## 목표 🚩
>**오늘 배운, 알게 된, 학습한 내용들을 정제해서 기록한다.**
>**내가 이해한 만큼 직접 작성한다.**
>**미흡한 부분을 보완한다.**
## 작성 요령 ✍️
1. Markdown문법으로 작성하며 확장자는 .md로 한다.
2. 분야별로 카테고리를 정리한다.
3. 문체는 간략하게 쓴다.
4. 참조는 반드시 명시한다.
5. 공부한 내용은 어떠한 것이라도 작성한다.
### JavaScript
- [변수](JavaScript/변수/README.md)
- [표현식과 문](JavaScript/표현... |
import React from 'react'
import { render, screen, cleanup } from '@testing-library/react'
import { afterEach, describe, it, expect } from 'vitest'
import LoadingModal from './LoadingModal'
import { BrowserRouter as Router } from 'react-router-dom'
import { ThemeProvider } from '@itsrever/design-system'
describe('Load... |
import {
ButtonInteraction,
Client,
CommandInteraction,
Formatters,
GuildMember,
Message,
MessageActionRow,
MessageButton,
TextChannel,
} from "discord.js";
import { createLogger } from "bunyan";
import { CONFIG } from "./utils/config";
import { Ticket } from "./extensions/ticket";
import { reActiveTi... |
from rest_framework import serializers
from ..fields import LazyChoiceField, NullCoercedTimeField, PositiveIntegerField
from ..models import BENTHICPQT_PROTOCOL
from .choices import (
benthic_attributes_choices,
current_choices,
growth_form_choices,
reef_slopes_choices,
relative_depth_choices,
... |
import Foundation
import GitLib
import Tea
import Slowbox
struct Model: Equatable, Encodable {
let git: Git
let views: [View]
let info: InfoMessage
let menu: Menu
let gitLog: GitLogModel
func with(buffer: [View]? = nil,
info: InfoMessage? = nil,
menu: Menu? = nil,
... |
-- Copyright 2021 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... |
import random
from itertools import combinations
import time
import sys
from backgorund_board import QueenBoard
class NQueens:
exec_solutions = 0
max_iterations = 0
queens_quantity = 0
movement_time = 0
def __init__(self, max_iterations, queens_quantity, movement_time):
self.max_iteratio... |
#ifndef SHADER_H
#define SHADER_H
#pragma once
#include <string>
#include <unordered_map>
#include <GL/glew.h>
#include "glm/glm.hpp"
//hold strings for vertex and fragment code
struct ShaderProgramSource
{
std::string VertexSource;
std::string FragmentSource;
};
//abstraction for creating and maintaining shad... |
package com.github.stefvanschie.inventoryframework.gui.type;
import com.github.stefvanschie.inventoryframework.HumanEntityCache;
import com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder;
import com.github.stefvanschie.inventoryframework.exception.XMLLoadException;
import com.github.stefvanschie.in... |
import 'package:flutter/material.dart';
// import 'package:flutter_svg/flutter_svg.dart';
import '/screens/screens.dart';
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
final String title;
final bool hasAction;
const CustomAppBar({
Key? key,
required this.title,
this.ha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.