text
stringlengths
184
4.48M
(ns swarmpit.component.service.form-labels (:require [material.component :as comp] [material.component.form :as form] [material.component.list-table-form :as list] [swarmpit.component.state :as state] [swarmpit.component.handler :as handler] [swarmpit.routes...
<!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="./assets/css/bootstrap.min.css"> <link rel="stylesheet" href="./assets/css/style.css"> <title>Document</title> </head> <body> <header...
# CIPHOGRAM - when a Cipher meets an Anagram 🤪 [![Angular](https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white)](https://angular.io/) [![Bulma](https://img.shields.io/badge/Bulma-00D1B2?style=for-the-badge&logo=bulma&logoColor=white)](https://bulma.io/) [![Firebase](https://im...
Números primos -- Criar uma função em sua linguagem preferida. A função deve receber um numero N > 1 (validar o input), e retornar todos os números primos até o numero N. EX. p(2) = [2]; p(3) = [2, 3]; p(10) = [2, 3, 5, 7]; def primos(n): if n < 2: return "Entrada inválida. Insira um número maior que 1...
<template> <main> <!-- MVP --> <article id="mvp"> <Table :title="'BEST PLAYERS'" :area="'mvp'" :column="'Rating'" :list="mvp" :format="identity" /> </article> <!-- Activity stats --> <article id="activity"> <Table :title="'MOST ACT...
// #define RH_TEST_NETWORK 1 // activate Forced Topology #include <RHMesh.h> #include <RH_RF95.h> #include <SPI.h> // #include <esp_task_wdt.h> #include <string.h> #define RF95_FREQ 433.0 #define WDT_TIMEOUT 15 #define SENDING_MODE 0 #define RECEIVING_MODE 1 #define ENDNODE_ADDRESS 2 // purposefully using the last...
import 'package:formapp/app/data/models/user_model.dart'; import 'package:formapp/app/data/provider/user_provider.dart'; class UserRepository { final UserApiClient apiClient = UserApiClient(); getAll(String token) async { List<User> list = <User>[]; var response = await apiClient.getAll(token); if (...
package net.ukr.dreamsicle.validation.currencyCode; import javax.validation.Constraint; import javax.validation.Payload; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.FIELD; import static java.lang.anno...
import duplicates_cli as dc import pytest def test_get_hash_md5(): import hash_functions filename = 'files/test.txt' with open(filename, 'rb') as fin: message = fin.read() assert dc.get_hash(filename) == hash_functions.hashmd5(message) def test_no_args_passed(capsys): expected_out_parts =...
<!doctype html> <meta charset ="utf-8"> <html> <script src="http://d3js.org/d3.v3.min.js"></script> <body> <script> var margin = {top : 20, right : 400, bottom : 40, left : 90}, width = 1400 - margin.left - margin.right, height = 680 - margin.top - (margin.bottom - 20); var x = d3.scale.linear().ra...
import Footer from "@/components/Footer"; import User from "@/components/user"; import { Title } from "@/styles/styled.about"; interface User { name: string; email: string; id: number; } export default function About({ users }: { users: User[] }) { return ( <> <Title>About page</Title> {users?...
import { useEffect, useState } from "react" import AutoAwesomeIcon from "@mui/icons-material/AutoAwesome" import Box from "@mui/material/Box" import Button from "@mui/material/Button" import CircleIcon from "@mui/icons-material/Circle" import ListItemText from "@mui/material/ListItemText" import Stack from "@mui/materi...
document.addEventListener("DOMContentLoaded", function() { let popup = document.getElementById("popup"); // Function to open the modal function openModal() { popup.classList.add("open-popup"); } // Function to close the modal function closeModal() { popup.classList.remove("open...
<script setup> import { onMounted, ref } from 'vue' import {useAuthStore} from '../../stores/Auth.js' import useProfile from '../../composables/profile' const authStore = useAuthStore() const formData = new FormData(); const {updateUser, updatePasswordUser, loading} = useProfile(); const userId = ref('') const name ...
from django.forms import ModelForm from django import forms from .models import User from .models import Doctor from .models import DoctorAppointment from .models import DoctorSpecialization from .models import Medicine from .models import Message from .models import Nurse from .models import NurseAppointment from .mo...
/** * WizardMC API Source Code. * * @license GPLv3 * @copyright EvoWide - Valentin Kaelin & Quentin Fialon */ import Env from '@ioc:Adonis/Core/Env' import got from 'got' import CacheService from '../CacheService' import { DateTime } from 'luxon' import Database from '@ioc:Adonis/Lucid/Database' import User from ...
## 给定一个二叉树,按高度由高到低依次打印从右侧视角看到的节点 ## 思路:大方向属于二叉树的层次遍历,只不过每次只关注每一层的最后一个(最右)节点,数据结构考虑使用队列,因为队列是先进先出的。, 首先取到并打印每一层的最后一个节点(最后入队),然后将队列中的每一个节点出队,并将其左右子节点按序入队,直至该层的最后一个 节点,随后递归,开始下层循环。 class TreeNode { int val; TreeNode left; TreeNode right; } void scanRightSide(TreeNode Root) { if (root == null) { ...
import 'package:chatapp_1/components/my_button.dart'; import 'package:chatapp_1/components/my_text_field.dart'; import 'package:chatapp_1/services/auth/auth_services.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class LoginPage extends StatefulWidget { final void Function()?...
import styled from "styled-components"; import Box from "./Box"; import Loader from "./Loader"; import ErrorMessage from "./ErrorMessage"; import MovieList from "../features/movie/MovieList"; import MovieDetails from "../features/movie/MovieDetails"; import WatchedMoviesSummary from "../features/movie/WatchedMoviesSum...
// create component for chars of characters import React from "react"; import Highcharts from "highcharts"; import HighchartsReact from "highcharts-react-official"; import { ListCharactersContextInterface } from "../../interfaces/charactersList.Interfaces"; import { ListCharactersContext } from "../../contexts/characte...
<script setup lang="ts"> // dependencies import { ref } from 'vue'; import { generateFakeData } from '@/fakes/generate'; import type { Character } from '@/fakes/models'; import { useCharacterStore } from '@/stores/character'; // composables import { usePagination } from '@/composables/pagination'; // components impor...
import {Component, OnInit, ViewChild} from '@angular/core'; import {MatSidenav} from '@angular/material/sidenav'; import {Student} from './student/student.model'; import {MatTable, MatTableDataSource, MatTableModule} from '@angular/material/table'; import {SelectionModel} from '@angular/cdk/collections'; import {Observ...
#include "main.h" /** * multiply_digit - multiplies two numbers * @num1: first number * @num2: second number * * Retun: the result of the multiplication */ int multiply_digit(char num1, char num2) { return ((num1 - '0') * (num2 - '0')); } /** * print_number - prints a number * @num: a pointer to the number * Return:...
# summary 1. Form merupakan widget untuk menampung data inputtan user dan dapat memuat beberapa komponen lain seperti TextFormField/TextField dan juga ElevatedButton untuk megolah data inputannya. Form digunakan melalui stateful widget dan state/keadaan form disimpan melalui ```GlobalKey<FormState>```. - Contoh pengg...
import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; @Injectable() export class CartService { private cartItemsSubject = new BehaviorSubject<any[]>([]); cartItems$ = this.cartItemsSubject.asObservable(); private localStorageKey = 'cartItems'; constructor() { const storedCar...
package gov.gsa.sst.util.data; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FilenameFilter; import java.io.IOException; import java.io.OutputStreamWriter; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import ...
# MNIST-classification-using-CNN The repository contains the code for classifying the Images of handwritten digits using the Convolutional Neural Network(CNN) and Dropouts approach. ## Dataset Loading the MNIST data set directly using TensorFlow API. ```python mnist = tf.keras.datasets.mnist (x_train, y_train), (x...
<template> <el-container class="home-container"> <!-- 头部区域 --> <el-header> <div> <el-avatar v-bind:src="this.avatar"></el-avatar> <span>博客后台管理</span> </div> <el-button type="info" @click="returnHome">退出</el-button> </el-header> <!-- 页面主体区域 --> <el-cont...
"use client"; import React, { useEffect, useState, ChangeEvent, lazy, Suspense } from "react"; import { useUser } from "@clerk/clerk-react"; import LoadingSpinner from "@/components/ui/LoadingSpinner"; import Alert from "@/components/ui/Alert"; const VideoConferencingRoom = lazy(() => import("./VideoConferencingRoom")...
package com.atguigu.case3; import org.apache.curator.RetryPolicy; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.framework.recipes.locks.InterProcessMutex; import org.apache.curator.retry.ExponentialBackoffRetry; /** * @aut...
import React, { Suspense } from 'react'; import { StyledMain } from './styles'; import { Routes, Route } from 'react-router-dom'; import { NavBar } from '../../pages/nav_bar/NavBar'; import { Preloader } from '../../ui/preloader/Preloader'; import { Navigate } from 'react-router-dom'; const MessagesContainer = React.l...
// // SwiftUIWebview.swift // AncestralWatch // // Created by Jakob Hartman on 12/20/22. // import Foundation import SwiftUI import WebKit struct SwiftUIWebView: UIViewRepresentable { typealias UIViewType = WKWebView let webView: WKWebView init(url: String, callback: @escaping () -> Void) { ...
from abc import ABC, abstractmethod from datetime import datetime class Szoba(ABC): def __init__(self, ar, szobaszam): self.ar = ar self.szobaszam = szobaszam @abstractmethod def leiras(self): pass class EgyagyasSzoba(Szoba): def __init__(self, szobaszam, meret):...
// Fill out your copyright notice in the Description page of Project Settings. #include "Grabber.h" #include "Engine/World.h" #include "DrawDebugHelpers.h" // Sets default values for this component's properties UGrabber::UGrabber() { // Set this component to be initialized when the game starts, and to be ticked ev...
from abc import ABC, abstractmethod class Notification(ABC): def __init__(self, notification_id, creation_date, content): self.__notification_id = notification_id self.__creation_date = creation_date self.__content = content def send_notification(self): None class PostalNotification(Notification)...
%This work is licensed under the Creative Commons License Attribution 4.0 International (CC-BY 4.0) %https://creativecommons.org/licenses/by/4.0/legalcode \documentclass[rgb]{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{patchplots} \definecolor{myorange}{hsb}{0.0833, 1, 0.8} \definecolor{mygr...
const API_KEY = "API KEY"; const url = "https://newsapi.org/v2/everything?q="; window.addEventListener('load', () => fetchNews("India")); // Reload / Refresh function reload(){ window.location.reload(); } // Fetch News async function fetchNews(query) { const res = await fetch(`${url}${query}&apiKey=${API_KEY...
import { createSlice } from '@reduxjs/toolkit' import anecdoteService from '../services/anecdotes' const initialState = [] const anecdoteSlice = createSlice({ name: 'anecdote', initialState, reducers: { refreshAnecdote(state, action) { const anecdoteToVote = action.payload return state.map(a => ...
using Zack.DomainCommons.Models; namespace Listening.Domain.Entities; /// <summary> /// 分类 /// </summary> public record Category : AggregateRootEntity, IAggregateRoot { private Category() { Name = new MultilingualString(string.Empty, string.Empty); CoverUrl = new Uri("https://img-s-msn-com.ak...
// refactoring adalah sebuah proses mengubah kode agar menjadi lebih 'baik' tanpa mengubah fungsionalitasnya // kenapa harus refactoring // a. readability // b. dry(dont repeat yourself) // c. testability // d. performance // e. maintainability // dari ini // function kubus2(a, b) { // let kubusA = a * a * a; // ...
import { connectDB } from '@/helper/db'; import { getErrorResponseMessage } from '@/helper/errorResponseMessage'; import { Task } from '@/models/task'; import { endOfDay, startOfDay } from 'date-fns'; import mongoose from 'mongoose'; import { NextResponse } from 'next/server'; import nodemailer from 'nodemailer'; conn...
package com.arsiu.eduhub.course.infrastructure.persistence.mongo import com.arsiu.eduhub.course.application.port.CoursePersistenceRepository import com.arsiu.eduhub.course.domain.Course import com.arsiu.eduhub.course.infrastructure.mapper.CourseToEntityMapper import com.arsiu.eduhub.course.infrastructure.persistence.e...
import com.codeborne.selenide.Configuration; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import static com.codeborne.selenide.Condition.*; import static com.codeborne.selenide.Selectors.byText; import static com.codeborne.selenide.Selenide.*; public class SelenideTests { @BeforeAl...
/* * Copyright (C) 2017 The Android Open Source Project * * 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 app...
<?php namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; class StoreProductRequest extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validati...
import { Component, OnInit } from "@angular/core"; import { FormControl, FormGroup, Validators } from "@angular/forms"; import { MatSnackBar } from "@angular/material/snack-bar"; import { Login } from "src/app/class/login"; import { TipoEnum } from "src/app/enum/tipoEnum"; import { UsuarioService } from "src/app/servic...
import 'dart:async'; import 'dart:io'; import 'package:bot_toast/bot_toast.dart'; import 'package:famedlysdk/famedlysdk.dart'; import 'package:fluffychat/provider/situaciones_provider.dart'; import 'package:fluffychat/views/homeserver_picker.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/mate...
<div class="standard-form-wrapper registration-wrapper"> <fieldset class="standard-form-set"> <legend class="legend">РЕГИСТРАЦИЯ</legend> <form (ngSubmit)="signUp()" #registerForm="ngForm"> <div class="form-group"> <label for="name" class="label">Потребителско име</label> <input id="name...
import { UserDocument } from "@/types/user"; import UsFirbaseAuth from "@/hooks/use-firebase-auth"; import { createContext, useContext } from "react"; const init = { uid: "", email: "", displayName: "", emailVerified: false, phoneNumber: "", photoURL: "", userDocument: {} as UserDocument, }; const auth...
/* eslint-disable @typescript-eslint/no-explicit-any */ import { LoggingLevel, NetworkerEvents } from "./types"; export interface IEvent { get_name(): string; get_args(): any[]; } export class CharEvent implements IEvent { public character: string = ""; public get_name() { return "char"; } public get_a...
wav2cdr - convert wav sound files to CD-ROM format and/or do some editing Copyright (C) 1997, 1998, 1999, 2000, 2006 Volker Kuhlmann 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; ei...
// this is how hoisting works in function declarations event though the function is defined afterwards var result = add(5, 5); console.log('result:', result) function add(num1, num2) { return num1 + num2; } // because function is a function expression it doesnt have hoisting so this expression will return an error /...
import Util from '@services/util.js'; import Content from './content.js'; import './row.scss'; export default class Row { /** * @class * @param {object} [params] Parameters. * @param {string} [params.colorBackground] Background color. * @param {number} [params.contentId] Content id. * @param {object[]...
package com.fxDeals.progresSoft.progresSoftApplication.handler; import com.fxDeals.progresSoft.progresSoftApplication.exception.DealAlreadyExistException; import com.fxDeals.progresSoft.progresSoftApplication.exception.DealNotFoundException; import com.fxDeals.progresSoft.progresSoftApplication.exception.InvalidDealDe...
class UsersController < ApplicationController def index @users=User.all end def show @user =User.find(params[:id]) end def new @user = User.new end def create @user =User.new(params.require(:user).permit(:name, :email)) if @user.valid? redirect_to users_path else ...
/* 总结: 1.在哪个路由组件中嵌套子路由组件,就在哪个路由中配置子路由 2.使用children属性配置,且子路由的 路径不用加 / 3.调用子路由时,需要把父级路径一并带上 */ // 导入vue import Vue from 'vue' // 导入app.vue import App from './App.vue' // 导入vue-router框架 import Vuerouter from 'vue-router' // 导入路由文件 import route from './router/index' // 使用Vue-router框架 Vue.u...
export const Table = ({ columns, rows, }: { columns: string[]; rows: any[]; }) => { return ( <div className="relative overflow-auto shadow-md sm:rounded-lg max-h-96"> <table className="w-full text-sm text-left dark:text-slate-800"> <thead className="text-xs uppercase bg-blue-500 dark:text-wh...
package ink.champ.models; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import javax.persistence; import java.util.Collection; import java.util.Set; @Entity(name = "us...
@extends('frontend.layouts.master') @section('content') <!-- Header End --> <div class="container-xxl py-5 bg-dark page-header mb-5"> <div class="container my-5 pt-5 pb-4"> <h1 class="display-3 text-white mb-3 animated slideInDown">Job List</h1> <nav aria-label="breadcrumb"> ...
//! 문제: 게임 캐릭터 스킬 시뮬레이터 // 목적: 함수의 정의, 매개변수와 인자의 이해, 반환값의 활용을 복습 // 기본 데이터 타입만을 사용하여 게임 캐릭터의 스킬을 시뮬레이션하는 간단한 프로그램 //? 게임 설명 // RPG 게임의 캐릭터를 제어하는 코드를 작성 // 캐릭터는 여러 스킬 사용 가능, 각 스킬은 다양한 효과를 보유 // 스킬을 사용할 때마다 캐릭터의 상태 변화 // => 함수를 통해 구현 //? 캐릭터 상태(데이터) // 체력 (HP) // 마력 (MP) // 스킬 //? 스킬(기술) // 힐(Heal): 체력을 일정량 회복 / 사용할...
import Image from 'next/image' import { Container } from '@components/Container' import { Shortcut } from '@components/Shortcut' export const Presentation = ({ locale }: { locale?: string }) => { return ( <header> <Container> <div className="flex flex-col md:flex-row py-14 gap-6 md:gap-12 md:py-28...
// Section 19 // Challenge 1 // Formatting output #include <iostream> #include <iomanip> #include <vector> #include <string> struct City { std::string name; long population; double cost; }; // Assume each country has at least 1 city struct Country { std::string name; std::vector<City> cities; }; ...
import "./style.scss"; document.querySelector("#app").innerHTML = ` <main class="main-container"> <nav class="nav-container"> <img src="/logo.webp" class="logo" alt=""> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="mobile-nav"> ...
clc clear // Ejercicio 10 // f(x) = e^x en [-1,1] // Funcion que calcula los nodos de raices segun el grado. function r = Chev(n) for k=0:n-1 r(k+1) = cos(%pi/2*(1+2*k)/n) end endfunction function y = Lk(x, k) [Xn,Xm] = size(x) // Se genera un vector con las raices del polinomio Lk r =...
import React, { useEffect, useState } from 'react' import EditModal from './EditModal' import {RiDeleteBin6Fill} from 'react-icons/ri' // import Exp from './Expenses.json' import CreateModal from './CreateModal' import ReactPaginate from "react-paginate"; function ViewExpense() { const getLocalItems = () => { ...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { WelcomeComponent } from './page/welcome/welcome.component'; import { PageNotFoundComponent } from './page/page-not-found/page-not-found.component'; import { MainComponent } from './page/main/main.component'; impor...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { addToCart, addQuantityWithNumber } from '../../store/actions/cartActions'; import { ToastContainer, toast } from 'react-toastify'; class MainContent extends Component { state = { qty: 1, max: 10, min:...
import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import '../../../resources/resources.dart'; import '../../domain/blocs/auth_bloc/auth_bloc.dart'; import '../../domain/blocs/auth_bloc/auth_event....
<template> <div class="codemirror-demo"> <MarkdownEditor v-model="value" @toolbarItemAction="toolbarItemAction" :beforeInitToolbars="beforeInitToolbars" /> </div> </template> <script lang="ts"> import { defineComponent, ref } from 'vue' import MarkdownEditor from '../components/editor/markdow...
# John Rexpearl Tumlos # Hash Exercise #02 # Sales Data Merge # # You have two hashes representing sales data from two different sources. Each hash contains sales data for the same products, but the keys may not match exactly. Write a Ruby program that merges the two sales data hashes into a single hash, combining the ...
import React, { useState } from 'react' import Logo from '../img/logo.png' import Avatar from '../img/avatar.png' import { HiShoppingCart } from 'react-icons/hi' import { MdAdd, MdLogout } from 'react-icons/md' import { motion } from 'framer-motion' import { Link } from 'react-router-dom' import { getAuth, signInWithP...
import 'package:conditional_builder_rec/conditional_builder_rec.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:social_app/const/constant.dart'; import 'package:social_app/register/register_cubit.dart'; impo...
import { Service } from "typedi"; import FARM_ABI from "../constants/farm_abi"; import { Logger } from "winston"; import { FARM_ADDRESS, PAIR_CONTRACT_ABI, RPC_URL, BLOCKS_PER_YEAR} from "../constants"; import TokenListSelector from "../constants/tokenAddress"; import Web3 from "web3"; @Service() export default class ...
package com.ohgiraffers.section01; import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManagerFactory; import jakarta.persistence.Persistence; import org.junit.jupiter.api.*; public class A_EntityManagerLifeCycleTests { /* 필기. * entity manager factory 란? * 1. entity manager 를 ...
//// |metadata| { "name": "wingrid-using-different-editors-in-individual-cells", "controlName": ["WinGrid"], "tags": ["Application Scenarios","Extending","Grids"], "guid": "{CF4C213D-092A-4CC0-A2FC-87B43B64B28E}", "buildFlags": [], "createdOn": "0001-01-01T00:00:00Z" } |metadata| //// = Usi...
<!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"> <meta name="description" content="Pooches and Pints, social meet ups for people and their dogs in manchester"> ...
#include <pso/particle_swarm_optimization.h> #include <common/random.h> namespace core { ParticleSwarmOptimization::ParticleSwarmOptimization(const FunctionApproximation& fa, const SearchSpace& searchSpace, const Parameter& parameter) : m_fa{ fa }, m_searchSpace{ searchSpace }, m_parameter{ parameter } ...
import { IssueType } from '../../../types/type'; import * as S from './IssueListItem.styled'; interface IssueListItemProps { issue: IssueType; } const IssueListItem = ({ issue }: IssueListItemProps) => { const formattedDate = new Date(issue.created_at).toLocaleDateString('ko-KR', { year: 'numeric', month...
/** * Author: Kulikov Pavel (Crystal2033) * Date: 10.01.2024 */ package org.crystal.qrserviceinventarization.controller; import io.swagger.v3.oas.annotations.parameters.RequestBody; import org.crystal.qrserviceinventarization.database.dto.OrganizationDTO; import org.crystal.qrserviceinventarization.service.impl.Or...
<script setup lang="ts"> import hljs from 'highlight.js/lib/core'; import 'highlight.js/styles/panda-syntax-dark.css'; import javascript from 'highlight.js/lib/languages/javascript'; import json from 'highlight.js/lib/languages/json'; import { onMounted, ref, Ref } from 'vue'; import Lienzo from '../componentes/Lienzo....
import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Todo } from 'src/app/welcome/welcome.component'; import { API_URL } from 'src/app/app.constants'; @Injectable({ providedIn: 'root' }) export class TodoDataService { constructor(private http: HttpCl...
<!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>CSS Grid</title> <style> .container { display: grid; grid-gap: 21px; ...
import React, { useCallback, useEffect, useState } from "react"; import { SettingsEvents, SettingsState, useSettingsMutation, } from "../../../../store/modules"; import { MAX_HEIGHT, MAX_WIDTH, MIN_HEIGHT, MIN_WIDTH, } from "../../../../shared/constants"; import { useStoreon } from "storeon/react"; import...
# Playwright https://playwright.dev/docs/writing-tests ### Tests `tests/e2e/example.spec.js` ```javascript // @ts-check const {test, expect} = require('@playwright/test'); test.beforeEach(async ({page}) => { /** * navigate to the login screen */ await page.goto('/redaxo/index.php'); /** * check if ...
#pragma once #include <functional> #include "SoundEngine.h" struct SoundEventInstanceHandle; typedef enum SERESULT { OK, ERR_BADCOMMAND, ERR_CHANNEL_ALLOC, ERR_CHANNEL_STOLEN, ERR_DMA, ERR_DSP_CONNECTION, ERR_DSP_DONTPROCESS, ERR_DSP_FORMAT, ERR_DSP_INUSE, ERR_DSP_NOTFOUND, ...
<?php use App\Http\Controllers\ProfileController; use App\Http\Controllers\Auth\GoogleController; use App\Http\Controllers\AccountController; use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | Web Routes |---------------------------------------------...
package com.whut.community.controller; import com.qiniu.util.Auth; import com.qiniu.util.StringMap; import com.whut.community.annotation.LoginRequired; import com.whut.community.entity.Comment; import com.whut.community.entity.DiscussPost; import com.whut.community.entity.Page; import com.whut.community.entity.User; i...
import { Component, OnDestroy, OnInit } from '@angular/core'; import { delay, filter, forkJoin, from, interval, map, mergeMap, Observable, of, scan, Subscription, tap } from 'rxjs'; import { RxjsService } from './services/rxjs.service'; @Component({ selector: 'app-root', templateUrl: './app.component.html', style...
/* eslint-disable max-len */ import { createSlice } from '@reduxjs/toolkit'; interface InitialStateType { profilePhoto: string; id: string, username: string, email: string, } const initialState: InitialStateType = { id: '', username: '', email: '', profilePhoto: '', }; const userSlice = createSlice({...
import 'package:real_estate_app/model/properties_list.dart'; import 'package:real_estate_app/screens/home/PropertiesCard/properties_card_widget.dart'; import 'package:real_estate_app/util/config.dart'; import '../../../ShimmerLayout/Home/property_card_layout.dart'; import '../../../constants/constants.dart'; class Pr...
// ContactForm.js import React, { Component } from 'react'; class ContactForm extends Component { state = { name: '', number: '', }; handleInputChange = (e) => { const { name, value } = e.target; this.setState({ [name]: value }); }; handleAddContact = () => { const { name, number } = th...
import { PermissionsContext, usePermission, } from "../../utils/contexts/PermissionsContext"; import { PERMISSIONS } from "../../utils/constants"; import { Error } from "../"; import { Button } from "antd"; import styles from "./Roles.module.scss"; import { Link } from "react-router-dom"; import member from "../../...
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Show Even...
import os restaurantes = [{'nome':'Praça', 'categoria': 'Japonesa', 'ativo': False}, {'nome':'Pizza Suprema', 'categoria': 'Italiana', 'ativo': True}, {'nome':'Cantina', 'categoria':'Italiana', 'ativo':False}] def exibir_mome_do_programa(): '''Essa função exibe o nome estilizado do...
import { useEffect, useState } from "react"; import { Box, CardMedia, Card, CardHeader, CardContent, Typography, Button, CardActions, } from "@mui/material"; import { useDispatch, useSelector } from "react-redux"; import { updateAppbar } from "../store/slices/meta"; import { InnerPageLayout } from "../c...
import java.util.*; LifeType life_type; GameState game_state; void setup() { fullScreen(); colorMode(HSB, 1.0); background(1.0, 0.0, 0.1); life_type = new LifeType("3", "23"); game_state = new GameState(displayWidth, displayHeight, 12, life_type); } void draw() { if (mousePressed && mouseX >= 0 && ...
/* gpx-parser.vala * * Copyright (C) 2010 Tomaž Vajngerl * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later versi...
import { CodeProblemsEntity } from '@entities/code_problems.entity'; import { Challenge } from '@interfaces/challange.interface'; import { CodeProblem } from '@interfaces/code_problem.interface'; import { Difficulty } from '@interfaces/course.interface'; import { IsNotEmpty } from 'class-validator'; import { BaseEntity...
/** * e2e runner */ import Api from "./api"; import Launch from "./launch"; import { ChildProcess } from "child_process"; import { Event, Phase, DispatchError } from "@polkadot/types/interfaces"; import { ApiPromise } from "@polkadot/api"; import BN from "bn.js"; const OCW = "filecoindot"; const OCW_PREPARED = "have...
<template> <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @cancel="handleCancel" > <a-spin :spinning="confirmLoading"> <a-form :form="form" :class="[['show'].includes(operateType) ? 'view-form' : null]"> <a-row :gutter="16"> <...