text stringlengths 184 4.48M |
|---|
<?php
declare(strict_types=1);
namespace Junges\Kafka\Facades;
use Illuminate\Support\Facades\Facade;
use Junges\Kafka\Contracts\ProducerMessage;
use Junges\Kafka\Support\Testing\Fakes\KafkaFake;
/**
* @method static \Junges\Kafka\Contracts\MessageProducer publish(string $broker = null)
* @method static \Junges\K... |
---
title: "Regierende Populisten und ideologische Heterogenität anhand des Beispiels Griechenland"
subtitle: "Zusammenarbeit trotz oder Spaltung wegen politischer Differenzen?"
author: "Florian Wisniewski"
date: "`r Sys.Date()`"
output:
prettydoc::html_pretty:
theme: leonids
highlight: github
toc: TRUE
... |
import { EffectsModule } from '@ngrx/effects';
import { RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { StoreModule } from '@ngrx/store';
import { ReactiveFormsModule } from '@angular/forms';
import { reducer } from 'src/app/auth... |
import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class RankTeams {
private static Map<String, TeamStats> teamStatsMap = new HashMap<>();
public static void main(String[] args) {
File file = new File("/Users/mt25... |
<div class="container">
<%= form_for(resource, as: resource_name, url: session_path(resource_name), html: {class: "form-signin"}) do |f| %>
<h2 class="form-signin-heading"> Please sign in</h2>
<div class="field">
<%= f.label :email, 'Email Address', class 'sr-only' %>
<%= f.email_field :email, aut... |
from fastapi import HTTPException, UploadFile, BackgroundTasks
from typing import List
from models import StatusEnum
from utils.app_exceptions import AppException
from cruds.submission import SubmissionCRUD
from services.main import AppService
from utils.service_result import ServiceResult
from schemas.submission impo... |
package com.example.address.web;
import com.example.address.domain.dto.AddressRequestDto;
import com.example.address.domain.dto.AddressResponseDto;
import com.example.address.service.AddressService;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframew... |
// main.rain file
//
// This is file for showcasing the syntax of my programming language aka. Rain.
// Syntax is inspired from many languages, heavily Jai, Javascript, C++, and Wren.
//
// Enjoy!
/// Main function, everything starts from here:
main :: () {
println("Hello world!")
return 0
}
/// Comments:
... |
package or.common;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.seleniu... |
import React from "react";
import { animated } from "react-spring";
import createAnimation from "./createAnimation";
import HistoryViewer from "./HistoryViewer";
import { formatForArray } from "./formatFunctions";
function ArrayAnimation({ numbers, colors, pointers, springs, api, boxWidth, boxSpacing, currentAction, n... |
#pragma once
#include <cstddef>
#include <limits>
struct LinearProbing
{
static constexpr std::size_t next(const std::size_t start, const std::size_t step, const std::size_t size) noexcept
{
return (start + step) & (size - 1);
}
};
struct QuadraticProbing
{
static constexpr std::size_t next(s... |
<!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>Flexbox Examples</title>
<link rel="stylesheet" href="css/flex-styles.css" />
<link rel="stylesheet"... |
/*
* Copyright (c) 2003, the JUNG Project and the Regents of the University of California All rights reserved.
*
* This software is open-source under the BSD license; see either "license.txt" or
* http://jung.sourceforge.net/license.txt for a description.
*/
package edu.umd.cs.hcil.socialaction.jung.io;
import j... |
import { shallowMount } from '@vue/test-utils'
import NavigationBar from '@/components/NavigationBar.vue'
import { useRouter, useRoute } from 'vue-router'
jest.mock('vue-router', () => ({
useRouter: jest.fn(),
useRoute: jest.fn(),
}))
describe('NavigationBar.vue', () => {
let routerMock, routeMock
beforeEach... |
<script setup lang="ts">
import type { CatProducto } from '@/models/catproducto'
import { onMounted, ref } from 'vue'
import http from '@/plugins/axios'
import router from '@/router'
import Header from "../Header.vue";
import Footer from "../Footer.vue";
const props = defineProps<{
ENDPOINT_API: string
}>()
const E... |
import { Pipe, PipeTransform } from '@angular/core';
import { IWorkingHour } from '../../features/working-hour/IWorkingHour';
@Pipe({
name: 'workingHoursPipe'
})
export class WorkingHoursPipe implements PipeTransform {
transform(items: IWorkingHour[], searchText: string): IWorkingHour[] {
if (!items) return []... |
package com.example.bookstore.service;
import com.example.bookstore.dto.book.BookDTO;
import com.example.bookstore.dto.book.InsertBookDTO;
import com.example.bookstore.entity.Book;
import com.example.bookstore.factory.BookFactory;
import com.example.bookstore.repository.BookRepository;
import jakarta.persistence.Entit... |
<template>
<div>
<div class="todo" v-for="(todo, index) in todos" :key="index">
<div class="taskList">
<i
class="fa-solid fa-check text-white"
@click="completed(todo)"
:class="{ checked: todo.isCompleted }"
></i>
<ul class="list-group border-none">
... |
import { loggerFile } from '../../configuration/logger';
import { Request, Response, NextFunction } from 'express';
import { ApiSuccess } from '../../utils/api';
import { fetchEnrolledCourses } from '../moodle/fetch';
import { getBaseUrl } from '../moodle/index';
import { MoodleSettings } from '../moodle/schemas/moodle... |
/*
Copyright 2023.
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 writing, software
distributed un... |
---
title: "Conjunction Junction, what's your function in R?"
output:
html_document:
highlight: textmate
toc: yes
toc_float:
collapsed: no
theme: cosmo
---
## Introduction and Notes about Functions in R
R is a powerful programming language for statistical computing with many packages and to... |
import { useMemo, useState } from 'react';
import './App.css';
function App() {
const [results, setResult] = useState([]);
const [searchText, setSearchText] = useState('');
const debounce = (callback, delay) => {
let timeOut = null;
return (...args) => {
clearTimeout(timeOut);
timeOut = se... |
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{route('home')}}">Home</a></li>
... |
---
title: Get Roles
icon: 'user-pen'
---
This function takes a single parameter 'target', which is the ID of the player that the Discord user data should be retrieved. It returns a table that contains Discord user data, including the user's name, discriminator, and avatar. **If the user is not in the discord, or ther... |
<template>
<div>
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="店铺名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="详细详细地址" prop=... |
package com.mb.menu.entity;
import java.io.Serializable;
import java.util.List;
/**
* id:节点ID,对加载远程数据很重要。 text:显示节点文本。 state:节点状态,'open'
* 或'closed',默认:'open'。如果为'closed'的时候,将不自动展开该节点。 checked:表示该节点是否被选中。 attributes:
* 被添加到节点的自定义属性。 children: 一个节点数组声明了若干节点。
*/
public class BaseTree implements Serializable {
pri... |
## Plan: Task 1 of 2
Your pre-work assignment is to build a site using one of the following public APIs. Pick a topic that is of most interest to you:
- Open-Meteo - a weather API
- Spotify - a music API (requires a free Spotify account and use of an access token)
- Swapi.Tech - an API about Star Wars films
- Marvel ... |
<?php
/**
* Copyright (c) Enalean, 2012. All Rights Reserved.
*
* This file is a part of Tuleap.
*
* Tuleap 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 2 of the License, or
* (at you... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
import { getLlantasAll, postLlantas, deleteLlantas, updLlantasOne, getLlantasOne, getUsuarioOne } from "./API/API.js";
addEventListener("DOMContentLoaded", iniciar())
async function iniciar(){
const token = localStorage.getItem('token');
const oneUsuario = parseJwt(token);
const usuarioId = oneUsuario.ui... |
declare global {
namespace jest {
interface Expect {
/**
* Asserts that a value is a `true`, `false`, `new Boolean(true)`, or `new Boolean(false)`.
* @param divisor
* @example
* expect(onPress).toHaveBeenCalledWith(
* expect.obje... |
package mil.af.abms.midas.api.comment;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import java.lang.reflect.Field;
import java.util.LinkedList;
import java.util.List;
import java.... |
AgentMover mover;
int MASS_TO_PIXEL=10;
float mass_mover = 10;
float mass_attractor;
PVector pos_attractor;
float radius_attractor;
float area;
float dist=0;
String[] getFilenames(){
String path=sketchPath()+"/sounds";
File dir = new File(path);
String all_filenames[] = dir.list();
int N_wavs=0;
for(int i=... |
const { Actor, Movie } = require("../models");
const { movieExistsError } = require("../helpers/index.js");
const { formatMovieResponse } = require("../helpers/index.js");
const createMovie = async (req, res) => {
try {
const { title, year, format, actors } = req.body;
const existingMovie = await Movie.find... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JS + CSS Clock</title>
</head>
<body>
<div class="clock">
<div class="clock-face">
<div class="hand hour-hand"></div>
<div class="hand min-hand"></div>
<div class="hand second-hand"></div>
</div>
</di... |
---
date: "2022-01-18T00:00:00Z"
external_link: ""
links:
- icon: link
icon_pack: fa
name: Slides
url: https://zoterotutorials.netlify.app/#1
- icon: youtube
icon_pack: fab
name: Videos
url: https://www.youtube.com/watch?v=REfQTIYxeMU&list=PL8dil_YRqri670TX9LOzb3NDwKSCuf8ro
- icon: github
... |
<script>
export default {
props: [
"table",
"movies",
"genres",
"logs",
"optionStatus",
"role",
"idUser",
],
methods: {
deleteGenreHandler(id, name) {
Swal.fire({
title: `Are you sure want to delete genre ${name}?`,
text: "You won't be able to revert this!",
... |
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useNavigate } from 'react-router-dom'
import { toast } from 'react-hot-toast'
import copy from 'copy-to-clipboard'
import {ACCOUNT_TYPE} from "../../../utils/constants"
import { addToCart } from '../../../Slices/cartSlice'
import ... |
<template>
<div class="v-search-container">
<div class="v-search-container__block">
<v-my-input :model-value="this.searchQuery"
@update:model-value="SET_SEARCH_QUERY"/>
<button @click="showDialog"
class="v-search-container__btn"
v-if="COU... |
from rest_framework.generics import ListCreateAPIView, RetrieveAPIView, DestroyAPIView, UpdateAPIView, ListAPIView
# rest methods
from rest_framework.response import Response
from rest_framework import status
from rest_framework.exceptions import NotFound
# serializer
from api.serializers import TodoSerializer, Cate... |
/*
* This file is part of the X10 project (http://x10-lang.org).
*
* This file is licensed to You under the Eclipse Public License (EPL);
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.opensource.org/licenses/eclipse-1.0.php
*
*... |
import java.util.Scanner;
class Student
{
Scanner sc = new Scanner(System.in);
private int Roll;
private String Name;
private int Age;
private int Marks;
public Student()
{
Roll = 0;
Name = "Empty";
Age = 0;
Marks = 0;
}
public void SetStudent()
... |
import http from 'node:http'
import { Transform } from 'node:stream'
class InverseNumberStream extends Transform {
_transform (chunk, encoding, callback) {
const transformed = Number(chunk.toString()) * -1
console.log(transformed)
callback(null, Buffer.from(String(transformed)))
}
}
/*
request =>... |
# WadidawTheater API Documentation
## Models :
### User
```
username : string
email : string, unique (required) emailFormat
password : string (required) length>=5
```
### Ticket
```
MovieId : integer (required)
UserId : integer (required)
movieName : string
price : integer (required)
```
### Relationship :
```
User ... |
import { DndContext, closestCenter } from "@dnd-kit/core";
import {
arrayMove,
SortableContext,
verticalListSortingStrategy,
} from "@dnd-kit/sortable";
import { useState } from "react";
import DraggableItem from "./component/DraggableItem/DraggableItem.jsx";
const ITEMS = [
{
id: crypto.randomUUID(),
... |
package org.example.presentation.grpc;
import com.google.protobuf.Empty;
import com.google.protobuf.Int32Value;
import io.grpc.stub.StreamObserver;
import lombok.RequiredArgsConstructor;
import net.devh.boot.grpc.server.service.GrpcService;
import org.example.appcore.appservice.ProductService;
import org.example.appco... |
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.diagnostics.stream;
using fuchsia.diagnostics;
using zx;
/// Maximum number of arguments that can be encoded per record, as specified by t... |
import { Card, Error, LetterAvatar, Loading } from '@/components/ui'
import { getAxiosError } from '@/lib/common'
import { DBConnection } from '@prisma/client'
import axios from 'axios'
import useConnections from 'hooks/useConnections'
import { useTranslation } from 'next-i18next'
import Link from 'next/link'
import { ... |
import {FC} from "react";
import {Avatar, Box, Button, Dialog, DialogContent, DialogTitle, Typography} from "@mui/material";
import {ICharacter} from "../../../../interfaces";
import css from './CharacterPopUp.module.css';
interface IProps {
character: ICharacter,
open: boolean,
setOpen: (open: boolean) =... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
... |
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
import { Product } from 'src/app/shared';
@Injectable({
providedIn: 'root',
})
export class ProductService {
private apiUr... |
class Graph {
adjacencyList: Map<number, number[]>;
constructor() {
this.adjacencyList = new Map();
}
addNode(node: number) {
this.adjacencyList.set(node, []);
}
addEdge(node1: number, node2: number) {
this.adjacencyList.get(node1)?.push(node2);
this.adjacencyList.get(node2)?.push(node1);... |
/*
* Copyright (C) 2022 FreeLancer Development Team
*
* 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 p... |
import { type NextAuthOptions } from 'next-auth';
import CredentialsProvider from 'next-auth/providers/credentials';
import prisma from '@/lib/prisma';
interface CredentialsProps {
email: string;
password: string;
}
export const authOptions: NextAuthOptions = {
providers: [
CredentialsProvider({
type... |
<?php
namespace Illuminate\Foundation\Support\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array<class-string, class-string>
*/
protected ... |
# Builder Fork
This is a fork of the official repo to provide a lightweight way to build TensorRT-LLM engines.
<div align="center">
TensorRT-LLM
<h4> A TensorRT Toolbox for Optimized Large Language Model Inference</h4>
[](https://... |
{
Implementar un programa que invoque a los siguientes módulos.
a. Un módulo recursivo que permita leer una secuencia de caracteres terminada en punto, los
almacene en un vector con dimensión física igual a 10 y retorne el vector.
b. Un módulo que reciba el vector generado en a) e imprima el contenido del vector.
c. ... |
import React, { useEffect, useState } from 'react'
import axios from 'axios';
import { useNavigate } from 'react-router-dom';
const PostCard = () => {
const Navigate = useNavigate();
const [preview, setPreview] = useState('');
const [image, setImage] = useState('');
const [text, setText] = useState(''... |
import { LoginHandler } from './login.handler';
import { AuthService } from 'src/auth/auth.service';
import { Test } from '@nestjs/testing';
import { Repository } from 'typeorm';
import { UserEntity } from 'src/users/infra/db/entities/user.entity';
import { getRepositoryToken } from '@nestjs/typeorm';
import { LoginCom... |
import { Calendar } from 'react-big-calendar';
import withDragAndDrop from "react-big-calendar/lib/addons/dragAndDrop";
import "react-big-calendar/lib/addons/dragAndDrop/styles.css";
import 'react-big-calendar/lib/css/react-big-calendar.css';
import { CalendarLayout } from '../../layouts';
import { useCalendar } from ... |
// https://adventofcode.com/2017/day/25 The Halting Problem
package main
import (
"fmt"
"time"
)
type SubInstruction struct {
write, move int
next string
}
type Instruction struct {
instructions [2]SubInstruction
}
var (
pos int
tape map[int]int = make(map[int]int)
)
// input has states A .. F
// on... |
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
import {useForm} from "react-hook-form";
import { useState,useEffect } from "react";
import * as z from "zod";
import { Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle} from "@/components/ui/dialog... |
import {
Controller,
Get,
Post,
Body,
Param,
Delete,
Put,
HttpCode,
UseGuards,
} from '@nestjs/common';
import { UsersService } from './users.service';
import { CreateUserDto } from './dto/create-user.dto';
import { UpdateUserDto } from './dto/update-user.dto';
import { ApiBearerAuth, ApiBody, ApiOper... |
import socket
##########################################################
# Terminal coloring #
##########################################################
class BeautifyTerminal:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
... |
from project.task import Task
class Section:
def __init__(self, name: str):
self.name = name
self.tasks = []
def add_task(self, new_task: Task) -> str:
if new_task in self.tasks:
return f"Task is already in the section {self.name}"
self.tasks.append(new_task)
... |
################################################################################
# #
# Project: Population segmentation and transition probability estimation #
# using data on health and health-related social service needs from the ... |
import java.time.Duration;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.util.List;
import model.Epic;
import model.Subtask;
import model.Task;
import service.Managers;
import service.TaskManagerService;
import service.impl.FileBackedTaskManager;
/**
* Класс для тестирования менеджеров
... |
import 'package:flutter/material.dart';
import 'package:pasya/theme.dart';
import 'package:pasya/ui/changeAddress/change_address_page.dart';
class AddressCard extends StatelessWidget {
const AddressCard(
{super.key,
required this.title,
required this.name,
required this.number,
required... |
# Practice 6: Regular Expressions
import re
# Validate an Email Address
# Write a function `validate_email_address` which returns `True` if the given string is an email address, `False` is it isn't.
def validate_email_address(email):
if re.match(r'\w+@\w+\.com', email):
return True
else:
retu... |
import { useGetSuppliesQuery } from "@/features/api/apiSlice";
import Container from "@/lib/container";
import { useState } from "react";
import { Button } from "../ui/button";
import { Link } from "react-router-dom";
import { CardModal } from "./CardModal";
interface Donation {
amount: number;
category: string;
... |
package br.com.rafaelbiasi.blog.facade.impl;
import br.com.rafaelbiasi.blog.data.AccountData;
import br.com.rafaelbiasi.blog.data.CommentData;
import br.com.rafaelbiasi.blog.data.PostData;
import br.com.rafaelbiasi.blog.facade.CommentFacade;
import br.com.rafaelbiasi.blog.model.Comment;
import br.com.rafaelbiasi.blog.... |
"use client";
import { useState, useRef, useEffect } from "react";
import arrowLeft from "@/app/images/arrow-left-solid.svg";
import Image from "next/image";
import { useDispatch } from "react-redux";
import { createPost } from "@/app/store/slices/postSlice";
export default function AddPost({onClose}) {
const inpu... |
library(readxl)
library(tidyverse)
library(readr)
library(tidycensus)
### Census Bureau Building Permits annual files ("a" files)
permits17 <- read_csv("./Data/RawData/USCB/Building Permits Survey/co2017a.txt") %>% filter(FIPS...2 == "19") %>%
rename(Bldgs1 = ...7, Units1 = `1-unit`, Value1 =...9,
Bldgs2 = ... |
import { useState } from "react";
import "./SearchBar.css";
import { signInGoogle } from "../Firebase";
function SearchBar({ meals, setMeals }) {
const [searchTerm, setSearchTerm] = useState("");
const [searchResults, setSearchResults] = useState([]);
const handleInputChange = (event) => {
setSearchTerm(eve... |
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Register</title>
<link rel="stylesheet" th:href="@{/css/shared/shared.css}">
<link rel="stylesheet" th:href="@{/css/mechanic-styles/mechanic-reg-form.css}">
</head>
<body>
<header class="heading">
<nav cl... |
# Anderson Lorena CMS Application demonstration.
## Introduction
This CMS Application is built using the ABP framework with Angular. It allows users to manage (list, create, edit, delete) CMS pages and access them through a dynamically generated menu.
## Features
- **CMS Pages**: Home menu to CMS management.
- **New ... |
package com.pingidentity.pingone.connection;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
/**
* Singleton class
* This class is responsible for executing HTTP requests using OkHttp library
*/
public class ConnectionManager {
private static OkHttpClient client;
private stat... |
import 'normalize.css'
import '../styles/scss/main.scss'
import type { AppProps } from 'next/app'
import Head from 'next/head'
import { useEffect, useState } from 'react'
import { wrapper } from '../store/store'
import lemon from '../public/images/lemon.svg'
import Aos from 'aos'
import 'aos/dist/aos.css'
import Script... |
package com.example.costarepair.controller;
import com.example.costarepair.domain.Cliente;
import com.example.costarepair.domain.Vehiculo;
import com.example.costarepair.service.ClienteService;
import com.example.costarepair.service.VehiculoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.Htt... |
package testFx.Librarian;
import com.example.kthimi.Controller.BookController;
import com.example.kthimi.Controller.LibrarianFuncController;
import com.example.kthimi.Controller.MainController;
import com.example.kthimi.Controller.Mockers.FileBasedStockBookRepository;
import com.example.kthimi.Controller.Mockers.MockA... |
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { BehaviorSubject, tap } from "rxjs";
@Injectable({
providedIn: 'root'
})
export class AuthService {
private baseUrl = 'http://localhost:5051';
loggedInUser = new BehaviorSubject<string | undefined... |
pragma solidity 0.5.0;
import "./ERC721Full.sol";
import "./AccessControl.sol";
import "./Log.sol";
contract CryptoJourney is AccessControl, ERC721Full, Log {
// using SafeMath32 for uint32;
constructor() ERC721Full("CryptoJourney", "CJ") public {
/// Starts paused.
// paused = true;
... |
import { apiKey, apiURL } from '../consts'
import getCountryName from './getCountryName'
const getCurrentWeatherData = async ({ lat, lon, name, state, country }) => {
const url = `${apiURL}/data/2.5/weather?lat=${lat}&lon=${lon}&appid=${apiKey}&units=metric`
const response = await fetch(url)
const data = a... |
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Clientes</title>
<!-- Bootstrap CSS -->
<link href="../static/css/bootstrap.css" rel="stylesheet"
th:href="@{/css/bootstrap.css}">
<link href="../static/css/bootstrap.css" rel="stylesheet"
th:href="@{/css/bootstrap.min.c... |
import { GenreResponseProps } from "../App";
import { Button } from "./Button";
interface SideBarProps {
genres: GenreResponseProps[];
onClick: (genreId: number) => void;
selected: number;
}
export const SideBar: React.FC<SideBarProps> = ({
genres,
onClick,
selected,
}) => {
return (
<nav className="... |
package utils
import (
"encoding/base64"
"fmt"
"time"
"github.com/golang-jwt/jwt"
)
func GenerateToken(payload interface{}, privateKey string, ttl time.Duration) (string, error) {
decodedPrivateKey, err := base64.StdEncoding.DecodeString(privateKey)
if err != nil {
return "", fmt.Errorf("Could not decode pri... |
//
// URLProtocolStub.swift
// EssentialFeedTests
//
// Created by Finn Ebeling on 02.04.24.
//
import Foundation
class URLProtocolStub: URLProtocol {
private struct Stub {
let onStartLoading: (URLProtocolStub) -> Void
}
private static var _stub: Stub?
private static var stub: Stub? {
... |
import 'package:admin_dashboard/providers/auth_provider.dart';
import 'package:admin_dashboard/providers/login_from_provider.dart';
import 'package:admin_dashboard/router/router.dart';
import 'package:admin_dashboard/ui/buttons/custom_outlined_button.dart';
import 'package:admin_dashboard/ui/buttons/link_text.dart';
im... |
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define SCREEN_ADDRESS 0x3C
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
#define VIBRATOR_PIN 6 // Change this ... |
/**
* Copyright (C) 2018-2021 Jessica James.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHO... |
// Coding Train
// Coding Challenge 22 - Julia Set
// https://www.youtube.com/watch?v=fAsaSkmbF5s&list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH&index=25
float angle = 0;
void setup(){
size(640, 320);
colorMode(HSB,1);
}
void draw(){
//float ca = -0.8;
//float cb = 0.156;
//float ca = map(mouseX, 0, width,... |
<template>
<h1>{{title}}</h1>
<br/>
<p>Lasagna con camaroni</p>
<br/>
<!-- Temp refs example -->
<input type="text" ref="name">
<br/>
<button @click="handleClick">Click me</button>
<!-- Modal -->
<teleport to="#modals" v-if="showModal">
<Modal theme="sale" @close="toggleModal">
<template ... |
---
title: Introduction
toc: false
---
<style>
.hero {
display: flex;
flex-direction: column;
align-items: center;
font-family: var(--sans-serif);
margin: 4rem 0 8rem;
text-wrap: balance;
text-align: center;
}
.hero h1 {
margin: 2rem 0;
max-width: none;
font-size: 14vw;
font-weight: 900;
line... |
from http import HTTPStatus
from typing import Annotated, Any
from fastapi import APIRouter, Depends, HTTPException, Path, Query
import app.db.models as db
from app.api.api_v1.dependencies import (
CharacterSearchParameters,
DBSession,
FilterParameters,
ListParameters,
UnicodeBlockQueryParamResolv... |
**Zadanie 1** Paradygmaty
:white_check_mark: Procedura do generowania 50 losowych liczb od 0 do 100
:white_check_mark: Procedura do sortowania liczb
:white_check_mark: Dodanie parametrów do procedury losującej określającymi zakres losowania: od, do, ile
:white_check_mark: 5 testów jednostkowych testujące procedury
... |
import * as mongoose from 'mongoose'
import UserModel, {User} from './user'
import GroupModel, {Group} from './group'
import IdeaModel, {Idea} from './idea'
import {RootIdeaType, IdeaType, VoteType} from './_enums'
import chalk from 'chalk'
const connected = chalk.cyan;
const error = chalk.yellow;
const disconnected =... |
// import React, { useState } from 'react';
// import * as S from './styles';
// import Modal from '@mui/material/Modal';
// import Box from '@mui/material/Box';
// import { Typography, TextField } from '@mui/material';
// import { RiAlarmWarningFill } from 'react-icons/ri';
// import { useEffect } from 'react';
// imp... |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCardSubscriptionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('card_... |
import { colors } from '@app/constants';
import { CustomButtonProps } from '@app/utils/interface';
import React, { FC } from 'react';
import { TouchableOpacity, Text, Image, ActivityIndicator } from 'react-native';
import styles from './style'
const PrimaryButton: FC<CustomButtonProps> = (props: CustomButtonProps) =>... |
<section class="layout">
<mat-card class="content-todo-list">
<mat-card-header class="justify-content-center">
<div class="row w-100">
<div class="col-8">
<h1 class="vivify fadeIn">{{currentDate | date: 'EEEE, d'}}</h1>
</div>
<div class="col-4 d-flex justify-content-end ac... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.