text stringlengths 184 4.48M |
|---|
<?php
declare(strict_types=1);
namespace Src\Broadcasting\Mail;
use Src\Core\Additional\EmailSender;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Src\Models\Views\EmailTemplate;
/**
* Class ParkManagerInsuranceDaysLeftMail
* @package Src\Mail
*/
class Par... |
/**
* @file milis.h
* @brief Datoteka koja deklarise funkcije za upravljanje vremenom (milisekundi)
* @author David Arsenijevic
* @date 16-5-2021
* @version 1.0
*/
#ifndef TIMER0_H_
#define TIMER0_H_
#include <avr/io.h>
#include <avr/interrupt.h>
/// Promenljiva koja skladisti broj milisekundi proteklih o... |
package helloworld
import (
"context"
"fmt"
GoText2Speech "github.com/FaaSTools/GoText2Speech/GoSpeech2Text"
"github.com/FaaSTools/GoText2Speech/GoSpeech2Text/providers"
"github.com/GoogleCloudPlatform/functions-framework-go/functions"
"golang.org/x/oauth2/google"
"io"
"net/http"
)
func execT2S(r *http.Reques... |
<!DOCTYPE html>
<html>
<head>
<title>Simple Calculator</title>
<style>
body {
background-color: #f0f0f0;
font-family: Arial, sans-serif;
}
#calculator {
max-width: 300px;
margin: 0 auto;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 4px 8px rgba(0, 0, ... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\MasterClass;
use DB;
use Session;
use App\SchoolType;
class ClassController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
... |
# CaptchaSolver
Model to solve six character captchas. The code available on this repository is based on the example presented [here](https://keras.io/examples/vision/captcha_ocr/), which solves captchas with five characters. Besides the size of the captchas, the main difference in the code available here is that it a... |
import 'package:flutter/material.dart';
import 'package:hi_clinic_app/common/constans/string.dart';
import 'package:hi_clinic_app/common/styles.dart';
import 'package:hi_clinic_app/tool/hex_color.dart';
import 'package:hi_clinic_app/tool/skeleton_animation.dart';
class CardShimmer extends StatelessWidget {
const Car... |
import React from 'react';
// import './movie.styles.css'
const Movie = ({result}) => {
// The image complete path
const IMG_PATH = 'https://image.tmdb.org/t/p/w1280';
// This function takes in the vote from the result props and checks what value the rating is
function getClassByRate(vote){
... |
package auth_test
import (
"context"
"github.com/IliyaYavorovPetrov/api-gateway/app/common/models"
"github.com/IliyaYavorovPetrov/api-gateway/app/server/auth"
"log"
"reflect"
"testing"
)
func setup(ctx context.Context) {
auth.Init(ctx)
err := auth.ClearSessionStore(ctx)
if err != nil {
log.Fatal("could no... |
@orange
Feature: orange Login Test
@orangeunsuccessful @orangeLoginunsuccessful
Scenario: Unsuccessful login
Given the user visits Orange page
When the user clicks on the login button
Then an error message is displayed
@orangesuccessful @orangeLoginsuccessful
Scenario Outline: Successful login
... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package mozilla.components.support.locale
import androidx.test.ext.junit.runners.AndroidJUnit4
import kotlinx.cor... |
---
title: 单硬盘三系统安装记录
date: 2020-04-04 15:04:15
updated: 2020-05-25 10:24:00
categories:
- [工具, 软件配置]
- [操作系统, Linux]
- [操作系统, macOS]
- [操作系统, Windows]
- [启动, GRUB]
---
分享一下我在同一个SSD里同时安装Ubuntu, Windows, macOS三个系统并以GRUB作为开机引导的经验. 说实话过程并不复杂.
<!-- More -->
也不知道最近自己时间都浪费哪里去了😑 3月7号弄好的东西现在才得以闲下来记录一番. 先秀一张GRUB界面😏
 {
// Sử dụng thuật toán sắp xếp nhanh để sắp xếp mảng sản phẩm theo tên sản phẩm
const quickSort = (arr: any, left: number, right: number) => {
if (left < right) {
const pivotIndex = Math.floor((left + right) / 2);
const pivotValue = arr[pivotIndex]... |
@inject ILocalStorageService LocalStorageService
@inject AuthenticationStateProvider AuthenticationStateProvider
@inject NavigationManager NavigationManager
@inject ICartService CartService
<div class="dropdown">
<button @onclick="ToggleUserMenu"
@onfocusout="HideUserMenu"
class="btn btn-s... |
In part 10 you created an iterable shopping list, and we just learnt that an object created from an iterable class can be used with list comprehensions. The exercise template contains a stripped down version of the ShoppingList with just enough functionality to fulfil the requirements of this exercise.
Please write a ... |
# Parser
[](https://github.com/FollowTheProcess/parser)
[](https://pkg.go.dev/github.com/FollowTheProcess/parser)
[; you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
// or agreed to in... |
import { useEffect, useState } from "react";
import { alchemySDK } from "../utils/alchemy-settings";
import emptyLogo from "../assets/empty-token.webp";
export default function TokenDetails({ token }) {
const [metadata, setMetadata] = useState(null);
useEffect(() => {
async function getMetadata() {
cons... |
import 'dart:math';
import 'package:flutter/material.dart';
import 'fileOfData.dart';
class RolesRout extends StatefulWidget {
const RolesRout({super.key});
@override
State<RolesRout> createState() => _RolesRoutState();
}
class _RolesRoutState extends State<RolesRout> {
int index = 0;
String selectedLocati... |
/**
* v0 by Vercel.
* @see https://v0.dev/t/jxWLyLdy7P6
* Documentation: https://v0.dev/docs#integrating-generated-code-into-your-nextjs-app
*/
import { Link } from "react-router-dom";
import { Avatar } from "@/components/ui/avatar";
import { Book, UserCircleIcon } from "lucide-react";
import { useState } from "rea... |
import 'package:flutter/material.dart';
class ChartBar extends StatelessWidget {
const ChartBar({
Key? key,
required this.label,
required this.spendingAmount,
required this.spendingPctOfTotal,
}) : super(key: key);
final String label;
final double spendingAmount;
final double spendingPctOfTo... |
import cv2
import numpy as np
import dlib
from imutils import face_utils
import pygame
import os
import pywhatkit as kitkat
from datetime import date
from datetime import datetime
import smtplib
time = datetime.now()
date = date.today()
pygame.mixer.init()
cap = cv2.VideoCapture(0)
detector = dlib.get_frontal_face_d... |
using System.Collections.Generic;
using System.Linq;
using EnumsNET;
using MBW.BlueRiiot2MQTT.Features.Enums;
using MBW.BlueRiiot2MQTT.Features.Pool.Bases;
using MBW.BlueRiiot2MQTT.HASS;
using MBW.BlueRiiot2MQTT.Helpers;
using MBW.Client.BlueRiiotApi.Objects;
using MBW.Client.BlueRiiotApi.RequestsResponses;
using MBW.... |
# taxi-management-api
An api for taxi management.
Doc is hosted here: https://github.com/DBMS-CE/taxi-management-api/blob/master/taximanagement.docx
## Description
This is a project based on taxi management. It consists of seven tables named “Consumer”, “Driver”, “Expense”, “Order”, “Owner”, “Taxi” and “Transaction... |
const express = require('express');
// import ApolloServer
const { ApolloServer } = require("apollo-server-express");
const path = require('path');
const db = require('./config/connection');
const routes = require('./routes');
const { authMiddleware } = required("./utils/auth");
// import typeDefs, resolvers in schemas... |
function rxnID = findRxnIDs(model, rxnList)
% Finds reaction indices in a model
%
% USAGE:
%
% rxnID = findRxnIDs(model, rxnList)
%
% INPUTS:
% model: COBRA model structure
% rxnList: cell array of reaction abbreviations
%
% OUTPUT:
% rxnID: indices for reactions corresponding to rxnList
% .. ... |
import { useState, useEffect } from "react";
import { Chess } from "chess.js";
import { Chessboard } from "react-chessboard";
import { validateFen } from 'chess.js'
import Engine from './Engine.js';
const DEPTH = 8;
const FEN_POSITION =
"rnbqkb1r/pp1p1ppp/2p2n2/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 2 4";
expo... |
/**
* MIT License
*
* Copyright (c) 2022 DragonDreams (info@dragondreams.ch)
*
* 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 r... |
use crate::{
component_container::ComponentContainer,
query::ComponentContainerTrait,
system::{Borrow, BorrowType, SystemRunState},
Component, Ref, RefMut,
};
use parking_lot::{
MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLockReadGuard, RwLockWriteGuard,
};
use std::any::TypeId;
/// The type p... |
#!/usr/bin/python3
"""class representing a student"""
class Student:
"""a class student"""
def __init__(self, first_name, last_name, age):
"""initialization of the attributes
Args:
first_name (str): first name of student
last_name (str): last name of student
... |
import path from 'path'
import process from 'process';
import fs from 'fs'
import { Storage, Bucket } from '@google-cloud/storage';
import { SHA256 } from 'crypto-js'
import { Encryptor } from './Encryptor'
import type { EncryptedObject } from './Encryptor'
import type { ValidStoredData } from './StoredDataValidator';... |
<template id="main">
<v-ons-page>
<page1/>
<page2/>
<v-ons-toolbar>
<div class="center">{{ titles }}</div>
</v-ons-toolbar>
<v-ons-tabbar swipeable position="auto"
:tabs="tabs"
:visible="true"
:index.sync="activeIndex"
>
</v-ons-tabbar>
</v-ons-page>
</template>
<... |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ListMedicoComponent } from './views/SistemaMedico/list-medico/list-medico.component';
import { HttpClien... |
# TestEndExpr.jl
A package for the sake of testing the `test_end_expr` functionality of `ReTestItems.runtests`.
We want to emulate a situation where correct usage of a package requires users to uphold a certain invariant.
In this very simplified example, `Page` objects must be pinned via `pin!` when in use, and subse... |
package com.rbts.hrms.candidateonboarding.repository;
import com.rbts.hrms.candidateonboarding.entity.Employee;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Spring Da... |
import os
from PIL import Image
import numpy as np
def load_image(path):
""" Load image from path. Return a numpy array """
image = Image.open(path)
return np.asarray(image) / 255
def initialize_K_centroids(X, K):
""" Choose K points from X at random """
m = len(X)
return X[np.random.choice(m,... |
import { IUsersGateway } from 'domain/interfaces';
import { ApiRepository, PrimeRepository, CacheRepository } from '../repositories';
import { UserMap } from '../mappers';
import { IUserData, IUserFields } from 'domain/entities';
export class UsersGateway implements IUsersGateway {
constructor(
public cache: Cac... |
---
title: ToggleButton
---
# ToggleButton
A two-state button that can be either on or off.
```tsx preview
<Column gap="sm" cross="center">
<ToggleButton variant="flat">Toggle</ToggleButton>
</Column>
```
## Stateful
```tsx preview
() => {
const [bold, setBold] = React.useState(false);
return (
<ToggleBu... |
package mk.finki.emt.feedreader.sharedkernel.domain.events.subscriptions;
import lombok.Getter;
import mk.finki.emt.feedreader.sharedkernel.domain.config.TopicHolder;
import mk.finki.emt.feedreader.sharedkernel.domain.events.DomainEvent;
/**
* The event container published when the user unsubscribed from a feed
* i... |
<!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">
<link rel="stylesheet" href="css/main.css">
<title>Document</title>
</head>
<body>
<main>
<button @c... |
@extends('layouts.bungadavi')
@section('body')
<div class="content container-fluid">
<!-- Page Header -->
<div class="page-header">
<div class="row">
<div class="col">
<h3 class="page-title">{{ $title ?? '' }}</h3>
<ul class="breadcrumb">
... |
---
title: TLS Termination / Passthrough
type: how-to
purpose: |
How to do TLS Termination and TLS Passthrough with KIC and Kong Gateway
---
## Gateway API
The Gateway API supports both [TLS termination](
https://gateway-api.sigs.k8s.io/guides/migrating-from-ingress/#tls-termination) and TLS passthrough. TLS handl... |
import { getMonth, getYear } from "date-fns";
export class SearchPanelFilter {
searchPanel = null;
constructor(searchPanel) {
this.searchPanel = searchPanel;
}
getFormData() {
const formDataSchema = {
destinations: [],
dates: [],
ports: [],
adults: 0,
children: 0,
... |
<!doctype html>
<html lang="en">
<head>
<title>Coffee Blend</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS v5.2.1 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/d... |
USE `sakila`;
/* 1. Selecciona todos los nombres de las películas sin que aparezcan duplicados.*/
SELECT DISTINCT `title`
FROM `film`;
/* 2. Muestra los nombres de todas las películas que tengan una clasificación de "PG-13".*/
SELECT `title`
FROM `film`
WHERE `rating` = "PG-13";
/* 3. Encuentra el título y la... |
<script setup lang="ts">
import { onMounted, ref, watch, PropType, defineEmits } from 'vue'
import { SeriesVideoDetail } from '../lib/seriesVideoDetail'
import { LogFileDataHelper } from '../lib/logFileDataHelper'
import { MaskRenderer } from '../lib/maskRenderer'
import { VideoOptions } from '../lib/videoOptions'
c... |
<ui:composition template="/WEB-INF/template/layout2.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://pri... |
using LGameFramework.GameBase.Culling;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace LGameFramework.GameCore
{
/// <summary>
/// 轨道相机
/// </summary>
public class GMOrbitCamera : FrameworkModule
{
/// <summary>
/// 焦点
/// </summary>
[Serial... |
import os
import traceback
import gym
import numpy as np
import sys
from src.Misc.environment_util import setup_env, setup_spaces, reset_env, step_env
from src.Misc.logger import Logger
from src.Misc.plotting import Plotter
from src.Agents.a2c_mult_ag import A2C_Multiple_Agents as A2C_Multiple_Agents
from src.Misc.mem... |
import React from "react";
import { Route, Routes } from "react-router-dom";
import "./App.css";
import { GlobalStyles } from "./global.style.js";
import About from "./screens/About/About";
import CulturalEvents from "./screens/CulturalEvents/CulturalEvents";
import CulturalEventData from "./screens/EventData/CulturalE... |
package com.be4tech.b4carecollect.service;
import com.be4tech.b4carecollect.domain.*; // for static metamodels
import com.be4tech.b4carecollect.domain.ActiveMinutes;
import com.be4tech.b4carecollect.repository.ActiveMinutesRepository;
import com.be4tech.b4carecollect.service.criteria.ActiveMinutesCriteria;
import java... |
import '../pizzahit/botones.dart';
import '../pizzahit/temas.dart';
import '../pizzahit/utils.dart';
import '../pizzahit/widgets.dart';
import 'hawaiana.dart';
import 'menu.dart';
import 'pastor.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class MexicanaWidget extends... |
const express = require('express');
const multer = require('multer');
const RoomModel = require('../models/room-model.js')
const router = express.Router();
const myUploader = multer(
// 1 argument -> a settings object
{
dest: __dirname + '/../public/uploads/'
} //
// destination (where to put uploaded... |
import React, { useEffect, useRef } from 'react';
import classes from './Cockpit.css';
import AuthContext from '../../context/auth-context';
const cockpit = (props) => {
const toggleBtnRef = useRef(null);
useEffect(() => {
console.log('[useEffect] cockpit.js');
// setTimeout(() => {
//... |
# Проект 0. Угадай число
## Оглавление
[1. Описание проекта](.README.md#Описание-проекта)
[2. Какой кейс решаем?](.README.md#Какой-кейс-решаем)
[3. Краткая информация о данных](.README.md#Краткая-информация-о-данных)
[4. Этапы работы над проектом](.README.md#Этапы-работы-над-проектом)
[5. Результат](.README.... |
// Book objects to be stored in an array
const myLibrary = [];
function Book(title, author, nPages, readStatus="not read yet"){
this.title = title;
this.author = author
this.nPages = nPages;
this.readStatus = readStatus
this.info = function(){
return `${title} by ${author}, ${nPages} page... |
package study17;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
public class FileClassRun {
public static void main(String[] args) throws IOException {
String path = "C:\\Users\\kosmo\\eclipse-workspace\\javastudy\\src\\study17\\files";
File dir = new File(path);
if(!dir.ex... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.alanayala.entities;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import j... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="../images/bank-banking-finance-icon_112235.ico" type="image/x-icon">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstr... |
import { usersRepository } from "../data-access/repositories/user-repository"
import { groupRepository } from "../data-access/repositories/group-repository"
import usersMock from "./user-mocks.json"
import groupsMock from "./group-mocks.json"
import * as http from 'http'
import request, { SuperTest } from "supertest"
i... |
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { catchError, map, tap } from 'rxjs/operators';
import { Student } from './student';
import { Observable, of } from 'rxjs';
import { LogService } from './log.service';
const httpOptions = {
headers: ne... |
from abc import ABC, abstractclassmethod
import cv2
from datetime import datetime
from factories.AlertFactory import AlertDict, AlertEnum
from PyQt5.QtCore import pyqtSignal
import multiprocessing as mp
import queue
import yaml
from cameraFunc import YoloCamera, CombinedCamera, TestCamera
with open('config.yml', 'r')... |
## topological sorting
Key points:
this is a general appraoch to solve DAG problems, we can use both BFS and DFS to solve it
### BFS (Kahn's algorithm)
1. initialize a list to represents the indegree of each node
2. preserve a queue to store the nodes with 0 indegree, in python we can simply use a list to simulate a ... |
import express from "express";
const router = express.Router();
import service from "../services/servicePatients";
import toNewPatient from "../utils/utils_toNewPatient";
import toNewEntry from "../utils/utils_toNewEntry";
router.get("/", (_req, res) => {
console.log("Fetching all patients");
const data = ser... |
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
/**
* @title IController
* @author @InsureDAO
* @dev Defines the basic interface for an InsureDAO Controller.
* @notice Controller invests market deposited tokens on behalf of Vault contract.
* This contract gets utilized a vault assets then invests ... |
/* eslint no-use-before-define: 0 */
import { lazy, Suspense, useEffect } from 'react';
import { Outlet, Navigate, useRoutes, useNavigate } from 'react-router-dom';
import { useAuth } from 'src/useAuth/auth';
import ServicePage from 'src/pages/services';
import DashboardLayout from 'src/layouts/dashboard';
import Use... |
import React from 'react';
import './App.css';
import Home from './pages/home/Home';
import Footer from './components/footer/Footer';
import { Routes, Route } from 'react-router-dom';
import SearchPage from './pages/searchpage/SearchPage';
import PageNotFound from './pages/pagenotfound/PageNotFound';
import Login from... |
'jibba jabba - Physics Challenge Sep 2013
'Pendulum motion - 1st attempt
'x = cos(a) * r + offsetX y = sin(a) * r + offsetY. Offset is the origin
InitGW()
pendulumLength = 200 'radius of arc
bobRadius = 30
centreBobX = GraphicsWindow.Width / 2 - bobRadius
centreBobY = GraphicsWindow.... |
<?php
use App\Http\Controllers\SampahController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your applicat... |
<template>
<form-wizard color="rgba(var(--vs-primary), 1)" :start-index.sync="step" :hideButtons="true" :title="null" :subtitle="null" ref="wizardproc" @on-complete="formSubmitted">
<tab-content v-if="procurment" title="اطلاعات خریداری" class="mb-5">
<vs-row vs-w="12" class="mb-1">
<vs-row vs-w="12">
... |
## Study
# 12장. 타입스크립트 프로젝트 관리
> 타입스크립트 프로젝트에서 유용하게 활용할 수 있는 개념과 팁 알아보기
```html
<details>
<summary>목차</summary>
<ul markdown="1">
<li>
<a href="#121-앰비언트-타입-활용하기">12.1 앰비언트 타입 활용하기</a>
</li>
<li>
<a href="#122-스크립트와-설정-파일-활용하기"
>12.2 스크립트와 설정 파일 활용하기</a
>
</li>
<li>
... |
#include "main.h"
/**
* *leet - encode to 1337
* @str: address of string
* Return: pointer to the encoded string
*/
char *leet(char *str)
{
char s1[] = "aAeEoOtTlL";
char s2[] = "4433007711";
int i, j;
for (i = 0; str[i] != '\0'; i++)
{
for (j = 0; s1[j] != '\0'; j++)
{
if (str[i] == s1[j])
{
s... |
import React, { useEffect } from "react";
import "@glidejs/glide/src/assets/sass/glide.core.scss";
import Glide from "@glidejs/glide";
import { crew } from '../../../service/data.json';
import { imagesEmployees, getImageByIndex } from '../../../utils/GetIndexImages';
import {
BgImage,
GlideWrapper,
Cont... |
package com.sh.spring.log;
import org.apache.log4j.Logger;
/**
* loggingFramework
* - 모드별 출력가능
* - 개발-운영 변경 시,모드만 변경해서 성능저하문제해결
* - log4j, logback, javt.util.logging, apache-commons-loggin 등등
* - system.out.println()의 문제점 : 구분없이출력되어버려 서버 운영 효율을 떨어뜨림
* - 개발 - 운영 변경 시 출력코드 수정하다 처리되는코드도 주석되어 문제가 많이 발생
*... |
import { Component, OnInit } from '@angular/core';
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { CdQuestionService } from 'src/app/services/backend/cd-question.service';
import {NgbAccordionConfig} from '@ng-bootst... |
import { RouterModule } from '@angular/router';
import { Todo } from 'src/app/core/interfaces/todo.model';
import {
ComponentFixture,
inject,
TestBed,
waitForAsync,
} from '@angular/core/testing';
import { TodoService } from 'src/app/core/services/todo.service';
import { HttpClientTestingModule } from '@angular... |
import 'package:flutter/material.dart';
import 'package:provides/Screen/Rest-api.dart';
class MyHome extends StatelessWidget {
const MyHome({super.key});
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 4,
child: Scaffold(
appBar: AppBar(
... |
import Building from './5-building.js';
export default class SkyHighBuilding extends Building {
constructor(sqft, floors){
super(sqft);
if (!Number.isInteger(sqft)) throw new TypeError('sqft must be an Integer');
if (!Number.isInteger(floors)) throw new TypeError('floors must be an Integer'... |
<!-- @format -->
<template>
<div>
<system-bar class="mb-5" />
<drawer style="z-index: 9999999" v-if="drawer" />
<map-component />
<order-component
v-if="!orderProgress.status"
:carClasses="carClasses"
:demands="demands"
@demand-change... |
import { useState } from "react";
import { getCategoriesApi, addCategoryApi, updateCategoryApi, deleteCategoryApi } from "../api/category";
import { useAuth } from "./useAuth";
export function useCategory() {
const [loading, setLoading] = useState(true);
const [error, setError] = useState(false);
const [ca... |
<p>This documentation applies to the version 20.4.</p>
<div class="callout callout--info">
<p class="callout__title">
<strong><span class="wysiwyg-font-size-large">React Native Bridge is a successor to the React Native SDK</span></strong>
</p>
<p>
The React Native SDK, which was developed earlier, will so... |
import React from "react";
import { createBrowserRouter } from "react-router-dom";
import {
Batch,
Login,
Employees,
NotFound,
ChangePassword,
Orders,
} from "~/components/pages";
import MainLayout from "~/components/layouts/MainLayout";
import ErrorBoundary from "~/components/pages/ErrorBoundary";
const ... |
// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID "TMPL873aSK-z"
#define BLYNK_DEVICE_NAME "MULTIPARAMETER VOLTAGE SENSING DEVICE"
#define BLYNK_AUTH_TOKEN "CqbCjamxV35uHfayr02WDDWgKbCmfKPp"
// Comment this out to disabl... |
import numpy as np
import matplotlib.pyplot as plt
ITERATION = 100
show = 1 # 0 = None, 1 = plot, 2 = ani
def get_point_cloud_from_file():
pc = np.load('verts.npz')["verts"]
x = pc[:, 0]
y = pc[:, 1]
z = pc[:, 2]
for i in range(len(z)):
if z[i] <= 0.0:
x[i] = 0
... |
import os
from celery import Celery ,schedules
from celery.schedules import crontab
# Set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
app = Celery('backend')
# Using a string here means the worker doesn't have to serialize
# the co... |
import {
Grid,
Card,
Text,
Tooltip,
Button,
Table,
Badge,
Loading,
Switch,
} from "@nextui-org/react";
import { Form, Input, message, DatePicker, Progress, Space } from "antd";
import FetchApi from "../../../apis/FetchApi";
import { useNavigate } from "react-router-dom";
import { ManageTeacherApis } f... |
#include "sort.h"
/**
* merge - Merges two subarrays back into the original array.
*
* @array: The original array.
* @left: The left subarray.
* @right: The right subarray.
* @size: The size of the original array.
*/
void merge(int *array, int *left, int *right, size_t size)
{
int *temp;
size_t i = 0, j = 0, k... |
import { IOption } from 'ng-select'; // select option <option>
import { Component, OnInit, ViewChild, ElementRef, TemplateRef, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { environment } from '../../../../../environments/environment';
import { AppService } from '../../../../app... |
import React, { useCallback, useMemo } from 'react'
import { useBlockTypes } from '../hooks';
import { __ } from '@wordpress/i18n';
import {
PanelBody,
BaseControl,
SelectControl,
Spinner,
} from '@wordpress/components';
import type { ControlOptions } from '../types';
export type SettingsProps = {
data: Cont... |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class BuatTabelSales extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sales', function (B... |
<?php
namespace Tests\Unit\UserCases;
use App\Adapters\Presenters\Json\CalculateProductPriceJsonPresenter;
use App\Domain\Interfaces\Country\CountryFactory;
use App\Domain\Interfaces\Country\CountryRepository;
use App\Domain\Interfaces\Product\ProductFactory;
use App\Domain\Interfaces\Product\ProductRepository;
use A... |
@extends('master')
@section('title','Produit')
@section('content')
<a href="{{route('produits.index')}}" class="mb-3" style="font-size: xx-large; cursor:pointer;">
<span>
<i class="ti ti-arrow-left"></i>
Back
</span>
</a>
<div class="container-fluid">
<div class="container-fluid">
<... |
/*
This file is a part of MonaSolutions Copyright 2017
mathieu.poux[a]gmail.com
jammetthomas[a]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 o... |
import React, { useState } from "react";
import { Link } from "react-router-dom";
import { FaGithub } from 'react-icons/fa';
const ProjectCard = ({ name, description, image, urlGitHub, urlDeploy }) => {
const [showFullDescription, setShowFullDescription] = useState(false);
const toggleDescription = () => {
se... |
from abc import ABC, abstractmethod
class IShape:
@abstractmethod
def move(self, x, y):
pass
@abstractmethod
def draw(self):
pass
class Rectangle(IShape):
def __init__(self, x, y, l, b):
self.x = x
self.y = y
self.x = x
self.y = y
def move(... |
package org.nwpu.i_gua_da.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.nwpu.i_gua_da.entity.User;
import java.util.List;
@Mapper
public interface UserMapper {
int setUserAsAdmin(@Param("userId") Integer userId, @Param("adminCode") int adminCode, @Pa... |
import React, {
FC,
PropsWithChildren,
useCallback,
useEffect,
useMemo,
useState,
} from 'react';
import { t } from 'i18next';
import { nanoid } from 'nanoid';
import {
NotificationType,
OrderDirection,
OrderOptions,
Table,
} from '@sovryn/ui';
import { DEFAULT_HISTORY_FRAME_PAGE_SIZE } from '../... |
# Nutshell Installer
An installer for disposable, containerized applications.
For further information on how to use Nutshell Installer, visit our documentation page [here.](https://nutshell.me)
Nutshell Installer allows you to access your favourite apps - from web browsers, to office tools, to entire desktops - in a ... |
import { prisma } from "@/libs/prisma";
import { NextResponse } from 'next/server'
export async function GET(
request: Request,
{ params: { id, asistenciaId } }: { params: { id: string; asistenciaId: string } }
) {
try {
const miembro = await prisma.asistencia.findFirst({
where: {
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.