text
stringlengths
184
4.48M
from django.shortcuts import render,HttpResponseRedirect,HttpResponse from django.contrib import messages from .validators import * from django.contrib.auth import authenticate,login,logout from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from user_auth.models import...
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"; import guest from '~/middleware/guest'; import auth from '~/middleware/auth'; import { ActionTypes } from "~/store/modules/action-types"; import middlewarePipeline from "~/middleware/middlewarePipeline"; import store from '~/store'; impor...
--- // Assets Imports - info & Icons import { include } from '../constants/index' import { services } from '../constants/index' import { Home, Pizza, Dumbbell } from 'lucide-react' // Astro Imports - Components import TrainingCard from './TrainingCard.astro' import Header from './layout/Header.astro' // Translation I...
/********************************************************************* * * Software License Agreement * * Copyright (c) 2023, * TU Dortmund University, Institute of Control Theory and System Engineering * All rights reserved. * * This program is free software: you can redistribute it and/or modify * it u...
## 22. loops `while` ```java while(condition){ // statements } ``` `do-while` ```java do{ // statements }while(condition) ``` The only difference between the while and do-while loop is that do-while loop runs at least once even though the condition is not satisfied. `while` loop evaluates the condition an...
import json import pandas as pd class HostGuestPlanner: """ ReplicationPlanner class for generating chemspeed workflow instructions from screening experiment results. Args: - screening_data (str): Path to the JSON file containing screening experiment results. - predicted_ms (str): Path t...
主旨要求:传输层面(减少请求数,降低请求量)执行层面(减少重绘&回流) 传输层面的从来都是优化的核心点,而这个层面的优化要对浏览器有一个基本的认识,比如: ① 网页自上而下的解析渲染,边解析边渲染,页面内CSS文件会阻塞渲染,异步CSS文件会导致回流 ② 浏览器在document下载结束会检测静态资源,新开线程下载(有并发上限),在带宽限制的条件下,无序并发会导致主资源速度下降,从而影响首屏渲染 ③ 浏览器缓存可用时会使用缓存资源,这个时候可以避免请求体的传输,对性能有极大提高 衡量性能的重要指标为首屏载入速度(指页面可以看见,不一定可交互),影响首屏的最大因素为请求,所以请求是页面真正的杀手,一般来说我们会做这些优化: 减少请...
package com.aviary.android.feather.widget; import it.sephiroth.android.library.imagezoom.easing.Easing; import it.sephiroth.android.library.imagezoom.easing.Expo; import android.content.ContentResolver; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android...
describe('Post Moderation Tests', () => { beforeEach(() => { // Seed the database before each test cy.exec("node ../server/init.js"); }); afterEach(() => { // Clear the database after each test cy.exec("node ../server/destroy.js"); }); it('Show error page for n...
import React from 'react' import { screen, fireEvent } from '@testing-library/react' import { render } from '@/utils/helpers/testUtils' import '@testing-library/jest-dom' import ToastMessage, { ToastMessageProps } from '.' import theme from '@/styles/lightTheme' const mockOnRemoveMessage = jest.fn() const mockMessage...
import jwt from "jsonwebtoken"; import bcrypt from "bcrypt"; import User from "../models/users.js"; export const registerUser = async (req, res) => { const { email, password } = req.body; try { // Check if the user already exists const existingUser = await User.findOne({ email }); if (existingUser) {...
#BUTTONS /** * This is an example component. Extend inuitcss by building your own components * that make up your UI. Component classes are prefixed with a `c-`. */ /** * 1. Allow us to style box model properties. * 2. Line different sized buttons up a little nicer. * 3. Make buttons inherit font styles (often...
package com.bobking.leetcode.training; import java.util.ArrayList; import java.util.List; public class Number51 { List<List<String>> res = new ArrayList<List<String>>(); // 参考:https://leetcode-cn.com/problems/n-queens/solution/hui-su-suan-fa-xiang-jie-by-labuladong/ public List<List<String>> solveNQueen...
import { HttpCode, HttpStatus, Injectable, NotFoundException, BadRequestException, } from '@nestjs/common'; import { Track } from './track.interface'; const BASE_URL = 'http://localhost:3030/tracks/'; @Injectable() export class TrackService { async getTracks(): Promise<Track[]> { const res = await fetch...
/// <summary> /// Declarations and inline definitions for ReactionAttributed. /// </summary> #pragma once #include "Reaction.h" #include "EventMessageAttributed.h" namespace FIEAGameEngine { class ReactionAttributed : public Reaction { RTTI_DECLARATIONS(ReactionAttributed, Reaction); public: /// <summary> //...
<?php namespace App\Http\Controllers; use App\Models\BankCard; use Illuminate\Http\Request; class BankCardController extends Controller { public function index() { $cards = BankCard::all(); return response()->json($cards); } public function store(Request $request) { $validatedData...
import React, { useState } from 'react'; import "./AppicationForm.css"; import ReCAPTCHA from "react-google-recaptcha"; const Form = () => { const [image, setImage] = useState(null); const [fileName, setFilename] = useState("No selected file"); const [formData, setFormData] = useState({ firstName: '', ...
import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.Random; public class GamePanel extends JPanel implements ActionListener{ static final int SCREEN_WIDTH = 600; static final int SCREEN_HEIGHT = 600; static final int UNIT_SIZE = 25; static final int GAME_UNITS = (SCREEN...
# Copyright 2012 Red Hat, 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 applicable law or agre...
package dk.sdu.mmmi.cbse.main; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import dk.sdu.mmmi.cbse.common.data.Entity; import dk.sdu.mmmi.cbs...
<!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>Document</title> </head> <body> <h2>Arrays</h2> <script> console.error("일반적인 배열 사용"); ...
import { RecaptchaVerifier, signInWithPhoneNumber } from 'firebase/auth'; import { auth } from '../firebase'; import { Box, Input, Button ,Text,useToast, Stack, AlertDialog, AlertDialogBody, AlertDialogFooter, AlertDialogHeader, AlertDialogContent, AlertDialogOverlay, useDisclosure, } f...
# language ES6 JavaScript module for looking up [ISO 639-1 language code](https://en.wikipedia.org/wiki/ISO_639-1) info. ## Importing this library `import { Language } from "https://esm.sh/gh/doga/language@1.0.2/mod.mjs";` ## Usage _Tip: Run the following example by typing this in your terminal (requires [Deno](ht...
What's New ========== 1. Due to the active state of the ZoneMinder project, we now recommend granting ALL permission to the ZoneMinder mysql account. This change must be done manually before ZoneMinder will run. See the installation steps below. 2. This package uses the HTTPS protocol by default to access the w...
using Jobberwocky.GeometryAlgorithms.Source.Core; using Jobberwocky.GeometryAlgorithms.Source.Algorithms.Triangulation2D; using Jobberwocky.GeometryAlgorithms.Source.Algorithms.Triangulation3D; using UnityEngine; using System; using Jobberwocky.GeometryAlgorithms.Source.Parameters; namespace Jobberwocky.GeometryAlgor...
import XCTest @testable import Validation final class ValidateTests: XCTestCase { func testValidate_Valid() { let predicate1 = Predicate<String> { $0.contains("a") } let predicate2 = Predicate<String> { $0.count == 5 } let validate = Validate { predicate1 predicate2 } assertValid(val...
package cloudlogin.eats.estrategiamovilmx.cloudlogin; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.Button; ...
@extends('admin') @section('title', $viewData["title"]) @section('content') <!-- Form per inserire i prodotti --> <div class="card mb-4"> <div class="card-header">Crea Nuovo Prodotto</div> <div class="card-body"> @if ($errors->any()) <ul class="alert alert-danger list-unstyled"> ...
cd paradise_hotel py manage.py runserver venv\Scripts\activate.bat 5. pip freeze проверяем правильность установки 6. django-admin startproject mysite 7. py manage.py runserver 8. ctrl c закрыть сервер 9. py manage.py startapp и далее имя файла login admin Password: FytT75FbfF87 from django.db.models import Q from...
## CS412 Group Project: Predicting Homework Scores with ChatGPT This project consists of a ML model that tries to predict the homework scores of a student based on the ChatGPT history which they used while doing the homework. By analyzing the interactions between students and ChatGPT, we explore the potential correlat...
import get from 'lodash.get' import { AssetsTablePerYear } from 'types/index' import getDeltaPercentage from './getDeltaPercentage' import getDiff from './getDiff' type GetNetWorth = { data: AssetsTablePerYear } export default function getNetWorth({ data }: GetNetWorth): AssetsTablePerYear { return Object.keys(da...
/* Copyright (C) 2015-2019, Wazuh Inc. * Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public * License (version 2) as published by the FSF - Free Software * Foundation */ #ifndef VALID...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections; namespace StaticDelegate { class DBConnection { protected static int NextConnectionNbr = 1; protected string connectionName; public string Conn...
/*---------------------- Copyright (C): Henri Payno, Axel Delsol, Laboratoire de Physique de Clermont UMR 6533 CNRS-UCA This software is distributed under the terms of the GNU Lesser General Public Licence (LGPL) See LICENSE.md for further details ----------------------*/ #ifndef ELEMENT_MANAGER_HH #define ELEMENT_M...
use super::{ build_traits::SubContainer, dataflow::{DFGBuilder, DFGWrapper}, handle::BuildHandle, BasicBlockID, BuildError, CfgID, Container, Dataflow, HugrBuilder, Wire, }; use crate::ops::{self, handle::NodeHandle, DataflowBlock, DataflowParent, ExitBlock, OpType}; use crate::{ extension::{Extens...
# go-storage-like-redis like redis but written by me on Golang. Just Key-Value storage. ## Requirements 1) Go version 1.21 or above ## Install 1) Copy repository via `git clone` or other method 2) Install necessary modules via `go mod tidy` (inside project folder) ## Run ### 1) Via Docker 1) Set up configuration...
=== JGit (((jgit)))(((Java))) Če želite uporabljati Git znotraj programa Java, je na voljo lastnosti polna knjižnica Git imenovana JGit. JGit je relativno lastnosti polna implementacija Gita napisanega izvorno v Javi in je široko uporabljena v skupnosti Java. Projekt JGit je pod okriljem Eclipse in njegov dom je moč n...
import * as React from "react" import { State, pushNotification, NOTIFICATION_SUCCESS, NOTIFICATION_ERROR, NOTIFICATION_WARNING } from "../../store" import { connect } from "react-redux" import { trxPlaceBidMarket } from "../../utils/eos" import Modal from "../shared/Modal" import { MonsterProps } from "../monsters/mon...
/** * Name: MStop * Description: defines the MStop species and its related constantes, variables, and methods. * A MStop agent represents a location where buses can take or drop off people. * Authors: Laatabi * For the i-Maroc project. */ model MStop import "MLine.gaml" import "PDUZone.gaml" import "Individual.ga...
package lot.flightmanager; import lot.flightmanager.Models.Passenger; import lot.flightmanager.Models.PassengerRepository; import lot.flightmanager.Models.Status; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.orm.jpa...
import React, { useState } from "react"; import { useDispatch } from "react-redux"; import { addTodo } from "../features/todo/operation"; function AddTodo() { const dispatch = useDispatch(); const [Todo, setTodo] = useState({ sub: "", body: "" }); const onChange = (e) => { setTodo({ ...Todo, [e.target.name...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.initModels = exports.Restaurant = void 0; const sequelize_1 = require("sequelize"); class Restaurant extends sequelize_1.Model { } exports.Restaurant = Restaurant; const initModels = (sequelize) => { Restaurant.init({ id: {...
#include <iostream> using namespace std; class Player { int x, y; public: Player() { x = 0; y = 0; } Player(int xx, int yy) { cout << "Parametric Constructor!" << endl; x = xx; y = yy; } void setx(int xx) { x = xx; } int ge...
#! /usr/bin/python # -*- coding: utf-8 -*- """ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Title: loop Author: David Leclerc Version: 0.2 Date: 29.10.2018 License: GNU General Public License, Version 3 (http://www.gnu.org/licenses/g...
// 对于 axios进行二次封装 import axios from "axios"; //引入nprogress 进度条 import nprogress from "nprogress"; // //引入进度条样式 import 'nprogress/nprogress.css' //start 进度条开始 done 进度条结束 //1:利用axios对象的方法create,去创建一个axios实例 //2:request 就是axios 只不过稍微配置一下 const requests = axios.create({ //配置对象 //基础路径,发请求的时候。路径当前会出现api baseURL:...
import React, { useState } from 'react' import '../header/header.css' import { FaShoppingCart } from 'react-icons/fa' import Order from '../order/Order' const showOrders = (props) => { let summa = 0 props.orders.forEach(el => summa += Number.parseFloat(el.price)) return(<div> {props.orders.map(el =...
<!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"> <meta name="description" content=""> <meta name="author" content=""> <!-- CSRF Token --> <meta name="cs...
*this is the fourth entry in an n-part [series explaining the compilation techniques of Clojure](http://blog.fogus.me/tag/clj-compilation). translations: [[日本語](http://ykomatsu.akaumigame.org/compiling-clojure-to-javascript-pt-3-the-himera-model-ja.html)]* When [ClojureScript](http://github.com/clojure/clojurescript) ...
import React, { Suspense } from 'react'; import { BrowserRouter, Route, Routes } from 'react-router-dom'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; // Create a client const queryClient = new QueryClient({ defaultOpti...
<?php namespace App\Controller\Front; use App\Entity\User; use App\Entity\UserMessage; use App\Form\UserMessageType; use App\Security\Handler\UserConversationHandlerInterface; use App\Service\Paginator\ConversationPaginator; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpF...
package org.CCristian.Api_Stream.EJEMPLOS; import org.CCristian.Api_Stream.MODELS.Usuario; import java.util.ArrayList; import java.util.List; import java.util.stream.Stream; public class Ejemplo_Stream_ListToStream { public static void main(String[] args) { List<Usuario> lista_usuarios = new ArrayList<>...
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.18; import {IStrategy} from "@tokenized-strategy/interfaces/IStrategy.sol"; interface IStrategyInterface is IStrategy { struct Player { bool activated; bool payed; bool couped; } struct TicTacToe { address player1; ...
# 🎫 CBT - Crime Bound Token Track Criminal Records using Non transferrable ERC721 Tokens (Inspired By: SBT- Soul Bound Token) <p align="center"> Make Sure you have React installed for local setup of this project <br /> <a href="https://reactjs.org/"><strong>Learn more about React »</strong></a> <br />...
require "globals" require "utils" function open_nes_file(file) local bytes = open_file(file) if (bytes[1] ~= 78 or bytes[2] ~= 69 or bytes[3] ~= 83 or bytes[4] ~= 26) then error("file is not a .nes file") end return bytes end function get_chr_banks_start_index(bytes) local prg_size_kb = ...
# 图片预加载 ## 背景 大家有没有遇到这样的场景,有一个页面全部都是有图片组成,但有部分图片很关键,如果没有下载完成或者下载失败,这时候不应该显示页面内容,继续显示加载组件(比如蚂蚁庄园,就会有一个加载中的覆盖层),否则会带给用户不好的体验。这时候就需要对关键图片进行预加载,等图片下载完成后,再关闭加载组件,再对图片进行渲染。 ## 实现 针对图片预加载这个需求,可以封装一个图片预加载方法: ```javascript /** * 图片预加载,加载成功返回图片链接,失败返回 undefined * @param url 图片链接 */ export function prefetch(url: string): ...
<?php declare(strict_types=1); namespace Jikan\JikanPHP\Endpoint; use Jikan\JikanPHP\Exception\GetClubsSearchBadRequestException; use Jikan\JikanPHP\Model\ClubsSearch; use Jikan\JikanPHP\Runtime\Client\BaseEndpoint; use Jikan\JikanPHP\Runtime\Client\Endpoint; use Jikan\JikanPHP\Runtime\Client\EndpointTrait; use Symfo...
import { AriaComponent } from "../../../core/AriaComponent"; import { AriaVec3, AriaVec3C } from "../../../core/arithmetic/AriaVector"; export enum AriaPhyParticleIntegrator{ APP_INTEGRATOR_EUCLID = "eculid", APP_INTEGRATOR_VERLET = "verlet" } export class AriaPhyParticle extends AriaComponent{ protected ...
'use strict'; import { QueryInterface, BOOLEAN, Model, INTEGER } from "sequelize"; export default { up(queryInterface: QueryInterface) { return queryInterface.createTable<Model>('matches', { id: { type: INTEGER, allowNull: false, primaryKey: true, autoIncrement: true, ...
use std::ops::{Add, Div, Mul, Neg, Sub}; // todo: determine how to implement this without copy/clone (troubleshoot 'cannot move' error) #[derive(Copy, Clone)] struct Vec3 { x: f32, y: f32, z: f32, } impl Neg for Vec3 { type Output = Self; fn neg(self) -> Self::Output { self * -1.0 } }...
import React, { useState, useEffect } from 'react'; import { View, Text, StyleSheet, ActivityIndicator } from 'react-native'; import axios from 'axios'; import { auth } from './Firebase'; const Weather = () => { const [weatherData, setWeatherData] = useState(null); useEffect(() => { if (!auth.currentUs...
<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <title>single-products</title> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="style.css"> <link rel="preconnect" href="https://fonts.gst...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0 and the Server Side Public License, v 1; you may not use this file except * in compliance with, at your election, the Elastic License 2.0 or the Server...
// // Authentication.swift // ITunesOmega // // Created by Андрей Гавриков on 24.02.2022. // import Foundation import UIKit import CoreData class Authentication { static var shared = Authentication() static private var salt = 4 // choosen by fair dice roll private var container: NSPersistentContainer {...
/* * Created on Thu Feb 02 2023 * * This file is a part of Skytable * Skytable (formerly known as TerrabaseDB or Skybase) is a free and open-source * NoSQL database written by Sayan Nandan ("the Author") with the * vision to provide flexibility in data modelling without compromising * on performance, queryabilit...
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import {IERC20Upgradeable} from "@openzeppelin-contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import {MathUpgradeable} from "@openzeppelin-contracts-upgradeable/math/MathUpgradeable.sol"; import {SafeMathUpgradeable} ...
Name: ln Type: function Syntax: the ln of <number> Syntax: ln(<number>) Summary: <return|Returns> the natural logarithm of a number. Introduced: 1.0 OS: mac, windows, linux, ios, android Platforms: desktop, server, mobile Example: ln(1) -- returns zero Example: ln(0.15) -- returns -1.89712 Example: ln(10) -- ...
class Solution { /* o: int - how many distinct ways can climb to the top i: int - how many steps c: e: n = 0 -> 0 n = 1 -> 1 n = 2 -> 2 n = 3 -> dp[n] = dp[n - 1] + dp[n - 2]; */ public int climbStairs(int n) { if (n == 1) return 1; int[] dp = new int[n +...
package com.saartak.el.adapter; import android.content.Context; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview....
#pragma once /** @defgroup solverRK12 Solver.RK12 * Module for RK12 integration methods * @{ */ #include "FactoryExport.h" #include <Core/Solver/SolverDefaultImplementation.h> class IRK12Settings; /*****************************************************************************/ /** RK12 method for the solution of...
import { useState } from "react"; import { DepartmentUpdateReq, deleteDepartment, getDepartments, insertDepartment, updateDepartment } from "../../api"; import { useMutation, useQuery } from "@tanstack/react-query"; import { Container, Loader, Message, Table } from "semantic-ui-react"; import styles from "../Styles.mod...
=title Marpa for building parsers - a first look =timestamp 2017-10-13T13:41:01 =indexes Marpa, parser =status show =books marpa =author grandfather =comments_disqus_enable 1 =abstract start Parsers seem to be esoteric, hard and to lack much day to day application. Marpa lowers the bar to entry by hiding a lot of the...
#include "main.h" #include <stdlib.h> /** * create_file - creates a file * @filename: name of the file to create * @text_content: a pointer to the string to write to the file * * Return: -1 on failure of the function and 1 on success */ int create_file(const char *filename, char *text_content) { int fd, j, len...
import React, { useState, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; import axios from 'axios'; import './styles.css'; import 'bootstrap/dist/css/bootstrap.min.css'; import { BiSortAlt2 } from "react-icons/bi" const UserTable = () => { const [users, setUsers] = useState([]); const [...
########################### ## XMAS-ICETUBE FIRMWARE ## ########################### The xmas-icetube firmware is a complete reimplementation of the Adafruit Ice Tube Clock firmware and runs on *both* the Adafruit Ice Tube Clock v1.1 and the xmas-icetube hardware revision. Since most users will be using the xmas-icetu...
// Define a function to check if a given year is a leap year function isLeapYear(year: number): boolean { // Leap year is divisible by 4, but not by 100 unless it is also divisible by 400 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } // Test cases let year = 2020; console.log(year, "is a leap ...
package com.example.demo.service; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mail.SimpleMailMessage; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.mail.javamail.MimeMessageHelper; impor...
document.addEventListener('alpine:init', () => { Alpine.data('usersData',()=>({ mainUsers : [], users: [], pageUsers: [], isLoading: false, showAddModal: false, pageCount: 1, itemsCount: 4, currentPage: 1, newUserInfo: { name:"", ...
import cors from 'cors'; import express, { Application, NextFunction, Request, Response } from 'express'; import httpStatus from 'http-status'; import globalErrorHandler from './app/middlewares/globalErrorHandler'; import routes from './app/routes/index'; const app: Application = express(); app.use(cors()); // parse...
from flask import Flask, render_template, request, redirect, url_for, flash, jsonify from flask_mysql_connector import MySQL from config import DB_USERNAME, DB_PASSWORD, DB_NAME, DB_HOST, SECRET_KEY, MAIL_SERVER, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD, MAIL_USE_TLS, MAIL_USE_SSL, cloud_name, api_key, api_secret from f...
* { margin: 0; padding: 0; body { width: 100%; .nav-container { width: 100%; display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 10px; .icon-container { ...
+++ title = 'Crafting Robustness: Achieving 100% Test Coverage in Lexer Development' date = 2023-09-07T03:20:23+02:00 draft = false author = 'Denis Chevalier' description = 'Journey into testing a lexer.' tags = ['compiler','project','status','lexical analyzer', 'lexer', 'testing'] categories = ['status', 'blog'...
<template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px" :class="[formShow?'searchform':'searchform1']" > <i class="el-icon-d-arrow-right icon" @click="formShow = !formShow"></i> ...
package com.javarush.task.task17.task1714; /* Comparable */ public class Beach implements Comparable<Beach> { private String name; //название private float distance; //расстояние private int quality; //качество public Beach(String name, float distance, int quality) { this.name = na...
// Importing necessary dependencies and components import { IconCheck, IconTrash, IconX } from '@tabler/icons-react'; import { FC, useState } from 'react'; import { useTranslation } from 'next-i18next'; import { SidebarButton } from '@/components/Sidebar/SidebarButton'; // Props interface for ClearConversations comp...
import { ethers } from "ethers"; import * as dotenv from "dotenv"; import { Ballot__factory } from "../typechain-types"; dotenv.config(); async function main() { //receive address of ballot and voter as parameter from CLI const ballotAddress = process.argv[2]; const voter = process.argv[3]; //get a provider const pro...
import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; class HelpScreen extends StatefulWidget { const HelpScreen({super.key}); @override State<HelpScreen> createState() => _HelpScreenState(); } class _HelpScreenState extends State<HelpScreen> { @override Widget build(Buil...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* push_swap.h :+: :+: :+: ...
# Introduction There are two classes in this package: *GetSyllabus* and *ResultsCreator*. GetSyllabus downloads all syllabuses and creates "raw" data for each syllabus, while ResultsCreator performs further classification according to the specifications. **IMPORTANT!** To run any of the commands below, you need to b...
#include <filesystem> #include "gtest/gtest.h" #include "constants.hpp" #include "file.hpp" #include "wav_gen.hpp" const std::string kTestFileName = "test.wav"; const uint32_t kHeaderSize = 44; class WavGeneratorTest : public ::testing::Test { protected: void SetUp() override { // Delete the file if it exists...
############################################################################### # OpenVAS Vulnerability Test # # IBM Tivoli Storage Manager FastBack Server Multiple Buffer Overflow Vulnerabilities # # Authors: # Kashinath T <tkashinath@secpod.com> # # Copyright: # Copyright (C) 2016 Greenbone Networks GmbH, http://www....
// Pines utilizados #define LEDVERDE1 5 #define LEDAMARILLO1 6 #define LEDROJO1 7 #define LEDVERDE2 10 #define LEDAMARILLO2 9 #define LEDROJO2 8 #define PULSADOR1 12 #define PULSADOR2 2 // Variables bool activo1 = true; // Indica si el semáforo 1 está activo, de lo contrario será el semáforo 2 int tiempoCambio = 1500...
import { useQuery } from "react-query"; import { Link } from "react-router-dom"; import { Footer } from "../../modules/Footer/Footer"; import { MediaCarousel } from "../../modules/MediaCarousel/MediaCarousel"; import { TvSeriesHero } from "../../modules/TvSeriesHero/TvSeriesHero"; import { getRandomHeroMedia, getTv...
/* mycloudportal - Self Service Portal for the cloud. Copyright (C) 2012-2013 Mycloudportal Technologies Pvt Ltd This file is part of mycloudportal. mycloudportal 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 Software...
import React, { useState, FC } from 'react' import { Button, Form, Row, Typography } from 'antd' import { openNotification } from '../../utils/function/openNotification' import { FormInput } from './FormInput.Component'; import { Calendar } from './Calendar.Component'; import { connect } from 'react-redux'; import { ...
<template> <div class="q-pa-md" style="width: 100%"> <q-form @submit="onSubmit" class="q-gutter-md"> <q-input filled type="email" v-model="email" label="E-mail" lazy-rules :rules="[ (val) => (val !== null && val !== '') || 'Por favor info...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i,n) for(int i = 0; i < n; i++) #define rep_s(i,s,n) for(int i = s; i < n; i++) #define rep_r(i,n) for(int i = n-1; i >= 0; i--) #define rep_rs(i,s,e) for(int i = s-1; i >= e; i--) #define rep_b(bit,n) for (int bit =...
package com.tge.qqservice; import com.tge.qq.Message; import com.tge.qq.MessageType; import com.tge.qq.User; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.HashMap; import java.util.concurrent.Conc...
import { defaultAppActions, defaultAppState, } from "~/legacy/src/contexts/AppContext"; import { renderHook } from "~/legacy/src/utils/tests"; import { useLogout } from "./useLogout"; import { waitFor } from "@testing-library/react"; jest.mock("@firebase/auth", () => ({ getAuth: jest.fn(), signOut: jest.fn(), ...
@inject IHttpService _httpService @inject NavigationManager NavigationManager @inject IPopupService PopupService <MDCard Class=" pa-2" Style="flex-direction: row;justify-content: space-between;"> <CnGalWebSite.Shared.MasaComponent.Shared.Cards.Users.InfoCard Model="Model.UserInfor" Href="@("/examine?id="+Model.Id...
import { enqueueSnackbar } from 'notistack'; import axios, { AxiosError } from 'axios'; import { REVIEW_MESSAGE } from '../../../data/messages'; interface ModifyReviewParams { lendId: number; text: string; token?: string; } interface DeleteReviewParams { lendId: number; token?: string; } export async funct...