text
stringlengths
184
4.48M
Animation ========= ![](http://docwiki.hq.unity3d.com/uploads/Main/AnimationInspector35.png) _The Animation <span class=keyword>Inspector</span>_ Properties ---------- |**_Property:_** |**_Function:_** | |:---|:---| |<span class=component>Animation</span> |The default animation that will be played when Play A...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/Counters.sol"; interface OldTwitter { function getTweet( uint _id ) external view returns (string memory, string memory, address); } /** * # Features * - store the tweets in a mapping of address => Tweet ...
import OtherUsers from '../components/other-users'; import { getUserById } from '../services/get-user-by-id'; import { getUsers } from '../services/get-users'; export async function generateStaticParams() { const users = await getUsers(); const usersIds = users.map((user) => ({ userId: user.id.toString() })); r...
import { requester } from './NuQue.requester'; import { Options, Response } from './NuQue.types'; export class NuQue { constructor(public defaults: Options = {}) { // 어떤 props도 없다면 withCredentials 설정 if (Object.keys(this.defaults).length < 1) { this.defaults.withCredentials = true; } // 어떤 hea...
<!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> <script> class Person { constructor() { this.names = ['jiabin',...
from __future__ import annotations import time from pathlib import Path from typing import List from icecream import ic def read_input(input_file: Path) -> List[str]: with input_file.open("r") as f: lines = f.readlines() return [l.strip() for l in lines] def transpose_lines(lines: List[str] | List[L...
import { Component, importProvidersFrom } from '@angular/core'; import { CheckProjectFormService } from '../check-project-form.service'; import { ProjectService } from '../project.service'; import { ClientService } from '../client.service'; import { Router } from '@angular/router'; import { ClientListComponent } from '...
document.addEventListener("DOMContentLoaded", function () { // Create countdown element const countdownElement = document.createElement("div"); countdownElement.id = "countdown-element"; countdownElement.style.position = "absolute"; countdownElement.style.zIndex = "5"; countdownElement.style.ba...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="scss/normalize.css"> <link rel="stylesheet" href="scss/main.css"> <link rel="...
package br.erbatista.brpackstest; import br.erbatista.brpackstest.entity.ModEntityRegister; import br.erbatista.brpackstest.item.ModItems; import br.erbatista.brpackstest.render.ColheitadeiraRender; import net.minecraft.block.Blocks; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmark...
<template> <AppModal v-slot="{ close }" :title="$t('errors.logs')" no-padding header-border > <ol> <li v-for="(log, index) in $errors.logs" :key="index" class="flex justify-between max-w-prose border-b px-4 py-2 ...
### ---------------------------------------------- ### ### -------- Compute distance matrices ----------- ### ### ---------------------------------------------- ### # ____________________________ # date created: 29.04.22 # date last modified: 03.05.22 # Project: Evaluating European Broad River Types for Macroinverteb...
import { useState } from 'react'; import "./App.scss"; import classNames from 'classnames'; const options = { 'htmlcss': 40000, 'javascript': 50000, 'react': 60000, 'node': 65000 } export default function App() { const [users, setUsers] = useState([]); const [currentUserID, setcurrentUserID] = useState(nu...
import 'dart:convert'; class Product { Product({ this.id, required this.available, required this.name, this.picture, required this.price, }); String? id; bool available; String name; String? picture; double price; factory Product.fromJson(String str) => Product.fromMap(json.decode...
import React, { useEffect, useState } from 'react' import { Container, ContainerItems,ContainerTotal } from './style' import Button from '../Button' import formatCurrency from '../../utils/formatCurrency' import { useCard } from '../../hooks/CardContext' import api from '../../services/api' import { toast } from '...
/******************************************************************************* * Copyright (c) 2016 Cisco and/or its affiliates * @author Matt Day * * 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...
<template> <el-dialog class="user-settings-popup" title="Settings" v-model="isShowing"> <el-form v-model="settings"> <el-form-item label="Auto save"> <el-switch v-model="settings.autoSave"/> </el-form-item> <el-form-item label="Theme"> <el-...
package com.nur.command.commend.get; import builder.CommendDTOBuilder; import builder.CommendPersonDTOBuilder; import com.nur.dtos.CommendDTO; import com.nur.dtos.CommendPersonDTO; import com.nur.model.Commend; import com.nur.model.CommendPerson; import com.nur.repositories.ICommendPersonRepository; import com.nur.rep...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* philo.h :+: :+: :+: ...
<!-- GrantCard --> <template> <figure class="group cursor-pointer" @click=" pushRoute({ name: 'dgrants-id', params: { id: id.toString() }, query: roundAddress && roundName ? { roundAddress: roundAddress, roundName: roundName } : {}, }) " > <!--img--> <div cla...
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { NavBarComponent } from "./nav-bar.component"; describe(NavBarComponent.name, () => { let fixture!: ComponentFixture<NavBarComponent>; let component!: NavBarComponen...
const fs = require("fs"); const knex_mariaDB = require("../DB/config/mariaDB"); const knex_sqliteDB = require("../DB/config/sqliteDB"); class Contenedor { constructor(nombre, posicion, DB) { this._DB = DB; if (this._DB !== "JSON") { this.tablename = nombre; } else { this.pathname = `./public/d...
function Weight = calculate_baselineEmptyWeight(ACFT) % Function: % calculate_baselineEmptyWeight(ACFT) % % Description: % Calculates the empty weight of the aircraft without propulsion and fuel % system % Also calculates the fuelTankSystem weight for the baseline, parallel % and series hybrids % % Input: %...
package ru.mirea.shchukin.serviceapp; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.util.Log; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import android...
package ant_colony import graph.Node import kotlin.math.pow /** * Класс для описания муравья * @property id Уникальное строковое значение для каждого муравья */ data class Ant(val id: String) { /** * Функция для создания пути движения муравья * @param graph Граф, по рёбрам которого перемещается мурав...
<script> import toastr from "toastr"; toastr.options = { timeOut: "1000", progressBar: true, positionClass: "toast-bottom-right", }; import { db } from "./firebase"; let task = { name: "", description: "", }; let tasks = []; let editStatus = false; let currentId = ""; db.coll...
<template> <div class="pagination"> <button :disabled="pageNo === 1" @click="$emit('getPageNo', pageNo - 1)">上一页</button> <button v-if="startNumAndEndNum.start > 1" @click="$emit('getPageNo', 1)" :class="{ active: pageNo === 1 }">1</button> <button v-if="startNumAndEndNum.start > 2">···</button> <!--...
import 'package:cartoonizer/common/importFile.dart'; import 'package:cartoonizer/controller/effect_data_controller.dart'; import 'package:cartoonizer/config.dart'; import 'package:cartoonizer/files.dart'; import 'package:common_utils/common_utils.dart'; extension StringEx on String { avatar() { if (TextUtil.isEm...
#pragma once #include<iostream> #include<vector> #include<list> #include <utility> #include"BaseObject.h" #include"Sprite2D.h" #include"MapObject.h" #include"Mob.h" #include"CMath.h" #include"Define.h" enum class MapMode { MAP_INVALID = 0, MAP_VALLILA, MAP_MAZE }; enum class MTerrain { MTERRAIN_INVALID = 0, MTE...
package viewservice import "net" import "net/rpc" import "log" import "time" import "sync" import "fmt" import "os" import "sync/atomic" type ViewServer struct { mu sync.Mutex l net.Listener dead int32 // for testing rpccount int32 // for testing me string // Your declarations here. cur...
import { AutoValidator, IsDateAfterThan } from '@zro/common'; import { Retry, RetryEntity, RetryRepository } from '@zro/utils/domain'; import { IsDate, IsDefined, IsInt, IsString, IsUUID } from 'class-validator'; import { Logger } from 'winston'; import { DeleteRetryUseCase as UseCase } from '@zro/utils/application'; ...
import { fireEvent, render, screen } from '@testing-library/react'; import { App } from '../App'; describe('App', () => { it('renders a Mars Rover screen', () => { render(<App />); const gridElement = screen.getByTestId('mars-rover-grid'); expect(gridElement).toBeInTheDocument(); ...
//* This file is part of the MOOSE framework //* https://www.mooseframework.org //* //* All rights reserved, see COPYRIGHT for full restrictions //* https://github.com/idaholab/moose/blob/master/COPYRIGHT //* //* Licensed under LGPL 2.1, please see LICENSE for details //* https://www.gnu.org/licenses/lgpl-2.1.html #pr...
# [ Soriting Iterables ] # - sorted() 함수의 argument 는Seqeunce Type 이 아닌 Iterable 이면 지원 # - Iterable 객체 구현 후 sorted() Test import random class RandomInts: def __init__(self, length, *, seed=0, lower=0, upper=10): self.length = length self.seed = seed self.lower = lower self.upper = u...
package com.tecno.udemy.fernando.cityworld.adapters; import android.content.Context; import android.net.Uri; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseA...
import React, { useContext } from 'react'; import { MenuListItemType } from '../ContextMenu'; import DropdownWithIcon from '../Dropdown/WithIcon'; import { LocaleContext } from '../../context/localeContext'; const LanguageSelector = () => { const { locale, setLocale } = useContext(LocaleContext); return ( <Dro...
# Rustls development roadmap ## Future priorities In rough order of priority: * **FIPS Certification for Default Cryptographic Library**. Change the default cryptographic library to something with FIPS certification. rustls/rustls#1540 * **Add No-Allocation / Write-Through API**. Would make handshakes faster ...
//this for Notes Model to manage notes and rounting const express = require('express'); const router = express.Router(); const fetchuser = require('../middleware/fetchuser'); const Notes = require('../models/Notes'); const { body, validationResult } = require('express-validator'); //Route 1:- get all the notes using...
import React from 'react'; import PropTypes from 'prop-types'; import ImageGalleryItem from 'components/ImageGalleryItem/ImageGalleryItem'; import { ImagesList } from './ImageGallery.styled'; export function ImageGallery({ images }) { return ( <ImagesList> {images.map(image => ( <ImageGalleryItem ...
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./interfaces/IAstranoVestingWallet.sol"; /** * @title AstranoVestingWallet * @dev Handles the vesting of ERC20 token fees for Astrano * @custom:security-contact marcel.miro@astrano.io *...
import 'package:firebase_prac/screens/user_input.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import '../components/rounded_button.dart'; import '../constants.dart'; import 'package:firebase_auth/fire...
import { screen, render } from 'utils/testUtils' import GameDetails from '.' import mock from './mock' const props = mock describe('<GameDetails />', () => { it('should render the blocks', () => { render(<GameDetails {...props} />) expect( screen.getByRole('heading', { name: /developer/i }) ).toB...
import React, { useState, useEffect } from 'react'; import { useParams } from 'react-router'; import Page from '../components/Page'; import Text from '../components/Text'; import NavButton from '../components/NavButton'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faGenderless, faCirc...
import streamlit as st import os import time import pandas as pd from datetime import datetime import plotly.express as px import PIL.Image from docx2pdf import convert import platform #os.chdir(r'E:\projects\smartscan2_1') import utilities st.set_page_config(layout="wide") system = platform.system() import os de...
// $Id: UserRealm.java,v 1.16 2006/02/28 12:45:01 gregwilkins Exp $ // Copyright 1996-2004 Mort Bay Consulting Pty. Ltd. // ------------------------------------------------------------------------ // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with t...
import './bootstrap'; import Alpine from 'alpinejs'; import jQuery from 'jquery'; import 'jquery-validation'; import persist from '@alpinejs/persist'; import 'flowbite'; import { setupAjax, objectifyForm, closeModel, openModel, addHTMLForPut, checkCategoryValidation, handleSelectedCategory, requiredAndTrimmed } from '...
package br.com.azindustria.azsim.mbean; import br.com.azindustria.azsim.core.lazy.CustomLazyDataModel; import br.com.azindustria.azsim.entity.*; import br.com.azindustria.azsim.repository.ClienteRepository; import br.com.azindustria.azsim.service.ClienteService; import br.com.azindustria.azsim.type.NaturezaEnum; impor...
```python import pyqtgraph as pg from pyqtgraph.GraphItems import GraphItem from pyqtgraph.Qt import QtCore, QtGui class CustomGraphItem(GraphItem): def __init__(self, nodes, edges, **kwargs): super().__init__(**kwargs) self.nodes = nodes self.edges = edges self.data = {} se...
import { useContext } from "react" import { SocketContext } from "../../../context/Socket" import Highcharts from "highcharts" import HighchartsReact from "highcharts-react-official" import "../style.css" export default function AverageDuration() { const { dataAvgDuration } = useContext(SocketContext) const cardC...
import { Box, Stack, Card, CardContent, Typography } from "@mui/material"; type CardTextType = [string, string]; type CardsTextType = { expeditor: CardTextType[]; deliverer: CardTextType[]; }; type BottomCardsProps = { youAre: keyof CardsTextType; }; const cardsTxt: CardsTextType = { expeditor: [ [ ...
const express = require('express') const exphbs = require("express-handlebars") const conn = require('./db/conn') const User = require('./models/User') const Address = require('./models/Address') const app = express() app.use(express.urlencoded({extended:true})) app.use(express.json()) app.engine('handlebars', exph...
import styled from "styled-components"; import { Announcement } from "../components/Announcement"; import { Footer } from "../components/Footer"; import Header from "../components/Header"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faMinus, faPlus } from "@fortawesome/free-solid-svg-icon...
/* * Copyright © 2020 EUSTYLE LABORATORY - ALL RIGHTS RESERVED. * UNAUTHORIZED COPYING OF THIS FILE, VIA ANY MEDIUM IS STRICTLY PROHIBITED PROPRIETARY AND CONFIDENTIAL. */ import { Wrapper } from '@vue/test-utils' import Vue from 'vue' import { HttpStatusCode } from '~/models/http-status-code' import PasswordResetsC...
import React from "react"; import { useNavigate } from "react-router-dom"; function ProfileCardOneday({ onedayId, onedayTitle, onedayContent, onedayTag, onedayGroupSize, onedayLocation, imageUrlList, onedayAttendantsNum, thumbnailUrl }) { const navigate = useNavigate(); ...
package com.example.newsapp.News.Adapter import android.os.Build import android.view.LayoutInflater import android.view.ViewGroup import androidx.navigation.NavController import androidx.recyclerview.widget.AsyncListDiffer import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.RecyclerView im...
package vn.codegym.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import o...
// this page defines basic structure for the page that allows input of data for new product // imports for react and basic layout structure const React = require('react') const Layout = require('./Layouts/layout') class New extends React.Component { render() { return ( <Layout title="Add New Ma...
Konvektive Koordinaten Konvektive Koordinaten sind krummlinige Koordinatensysteme auf dem euklidischen Raum formula_1, die an einen Träger gebunden sind und von allen Transformationen, die der Träger erfährt, mitgeführt werden, daher die Bezeichnung konvektiv. In der Kontinuumsmechanik ergeben sich konvektive Koordina...
<template> <PostSkeleton v-if="loading"/> <div v-if="item" v-resize="onResize"> <v-card v-if="!loading" class="elevation-1 pa-2"> <v-btn v-if="item.image" icon="mdi-keyboard-backspace" color="orange-darken-4" @click="$router.push('/')" class="back-button" > ...
import {sessionActions} from "components/entities/session"; import orderFixture from '../fixtures/post-order.json' const test = it describe('Test burger-constructor', () => { beforeEach(() => { cy.clearCookies() cy.clearLocalStorage() cy.intercept("GET", 'https://norma.nomoreparties.spa...
import React from "react"; import {Redirect} from "react-router"; import {connect} from "react-redux"; let mapStateToProps = (state) => { return { isAuth: state.auth.isAuth } }; const withAuthRedirect = ( Component ) => { class RedirectComponent extends React.Component { render() { ...
import 'dart:math'; import 'package:someonetoview/models/available_times.dart'; import 'package:someonetoview/models/furniture_listing.dart'; import 'package:someonetoview/models/location.dart'; import 'package:someonetoview/models/property_listing.dart'; import 'package:someonetoview/models/vehicle_listing.dart'; imp...
package controllers import ( "errors" "regexp" "testing" "github.com/DATA-DOG/go-sqlmock" constants "github.com/Prashansa-K/serviceCatalog/internal" api "github.com/Prashansa-K/serviceCatalog/internal/api/structs" "github.com/stretchr/testify/assert" "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/lo...
import CheckIcon from "@mui/icons-material/Check"; import CloseIcon from "@mui/icons-material/Close"; import { Box, Grid, Typography } from "@mui/material"; import Button from "@mui/material/Button"; import Dialog from "@mui/material/Dialog"; import DialogContent from "@mui/material/DialogContent"; import DialogTitle f...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package com.facebook.react.uimanager import android.view.View import com.facebook.react.uimanager.annotations.ReactProp import c...
<?php session_start(); require_once 'db_connection.php'; $course_id = ""; $course_title = ""; $course_description = ""; $course_credits = ""; $instructor_ids = array(); $language_ids = array(); $errorMessage = ""; $successMessage = ""; // Check if the course ID is provided in the URL if (isset($_GET['id'])) { $ed...
use anyhow::Context; use roxmltree::{Document, Node}; use serde::Serialize; use std::io::{BufReader, Read, Seek}; use zip::ZipArchive; #[derive(Serialize)] pub struct Nuspec { /// The unique package identifier. pub id: String, /// The version of the package, following the major.minor.patch pattern. pub version...
import createHttpError from 'http-errors'; import httpStatus from 'http-status'; import { z } from 'zod'; import { validateReqBody } from '../../../middlewares/validateRequest.js'; import asyncHandler from '../../../utils/asyncHandler.js'; import controllerFactory from '../../../utils/controllerFactory.js'; import { Ht...
import { AfterViewInit, Component, HostListener, Input, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core'; import { Router } from '@angular/router'; import { NbDialogService, NbIconConfig, NbPopoverDirective, NbToastrService } from '@nebular/theme'; import { KeyboardModes, KeyboardNavigationService } fr...
import os from flask import Flask, request from flask_smorest import Api import uuid from resources.shop import blueprint as ShopBluePrint from resources.product import blueprint as ProductBluePrint from db import db import models app = Flask(__name__) app.config["PROPAGATE_EXCEPTIONS"] = True app.config["API_TITLE"]...
#ifndef _MAIN_H_ #define _MAIN_H_ /** * binary_to_uint - function that converts a binary number to an unsigned int * @b: pointer to a string of 0 and 1 chars * * Return: the binary representation or * 0 if b == NULL, or b contains a char not 0 or 1 */ unsigned int binary_to_uint(const char *b); /** * print_bin...
@file:Suppress("DEPRECATION") package io.esper.lenovolauncher.fragment import android.annotation.SuppressLint import android.content.Context import android.content.Intent import android.graphics.Bitmap import android.graphics.BitmapFactory import android.os.Build import android.os.Bundle import android.view.LayoutInf...
module BinomialSets export BinomialSet, order, binomials, reduction_tree, is_support_reducible, fourti2_form, sbinomial, minimal_basis!, reduced_basis!, auto_reduce_once!, is_minimization, change_ordering!, is_groebner_basis, is_truncated_groebner_basis using MIPMatrixTools.IPInstances using IPGBs.FastBi...
package view; import controller.GameController; import model.Chessboard; import model.PlayerColor; import javax.swing.*; import java.awt.*; import java.io.IOException; import java.io.InputStream; import java.net.ServerSocket; import java.net.Socket; public class BeginFrame extends JFrame { private final int WIDT...
import "./login.css"; import { faUser, faLock, faEye, faEyeSlash, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import React,{ useState } from "react"; import NotificationService from "../../services/notification_service/notification_service"; impo...
// Copyright (c) Mysten Labs, Inc. // SPDX-License-Identifier: Apache-2.0 import type { WalletWithFeatures, WalletWithRequiredFeatures } from '@mysten/wallet-standard'; import type { ReactNode } from 'react'; import { useRef } from 'react'; import type { StateStorage } from 'zustand/middleware'; import { DEFAULT_PRE...
/** * */ package auctionhouse; import java.util.ArrayList; import java.util.List; import java.util.HashMap; import java.util.SortedSet; import java.util.TreeSet; import java.util.Comparator; import java.util.logging.Logger; /** * @author pbj * */ public class AuctionHouseImp implements AuctionHouse { priva...
import Vue from 'vue' import Router from 'vue-router' import Layout from '@/layout' Vue.use(Router) /** * constantRoutes * a base page that does not have permission requirements * all roles can be accessed */ export const constantRoutes = [ { path: '/redirect', component: Layout, hidden: true, c...
import React, { useState, useEffect } from 'react' import { Link } from 'react-router-dom' import { styles } from "../style" import { navLinks } from '../constants' import { menu, close } from "../assets" const Navbar = () => { const [active, setActive] = useState("") const [toggle, setToggle] = useState(false) ...
# kingdom # ## Definition: ## A kingdom is a group of people ruled by a king. It also refers to the realm or political regions over which a king or other ruler has control and authority. * A kingdom can be of any geographical size. A king might govern a nation or country or only one city. * The term "kingdom" can al...
import java.util.Scanner; public class AbrindoContas { public static void main(String[] args) { // Lendo os dados de Entrada: Scanner scanner = new Scanner(System.in); int numeroConta = scanner.nextInt(); scanner.nextLine(); // Consome a quebra de linha após a entrada do número da c...
// Pegando dados do JSON: /* Usando o fetch: fetch('pessoas.json') .then(resposta => resposta.json()) .then(json => carregaElementosNaPagina(json)); */ // Usando o axios: axios('pessoas.json') .then(resposta => carregaElementosNaPagina(resposta.data)); function carregaElementosNaPagina(json) { co...
import React from 'react'; import { Line, ComposedChart, XAxis, YAxis, Tooltip, ResponsiveContainer, Bar, Area, } from 'recharts'; import Formatters from '../../data/modifiers/formatters'; import { WidgetDefinition } from '../../domain/widget'; const COLORS = ['var(--blue-500)', 'var(--green-300)', 'va...
package api; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONObject; public class ApiMain_review { public static void...
import { useContext, useEffect, useRef } from 'react' import { CourseContext } from '../../contexts/Courses/CourseContext' import { AuthContext } from '../../contexts/Users/AuthContext' import toastrNotificationsService from "../../services/toastrNotificationsService" import { ServicesHome } from './ServicesHome' imp...
''' 338. Counting Bits Easy Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1's in the binary representation of i. Example 1: Input: n = 2 Output: [0,1,1] Explanation: 0 --> 0 1 --> 1 2 --> 10 Example 2: Input: n = 5 Output: [0,1,1,2,1,2] Explanat...
import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda' import 'source-map-support/register' import * as AWS from 'aws-sdk' import * as middy from 'middy' import { cors } from 'middy/middlewares' const docClient = new AWS.DynamoDB.DocumentClient() const groupsTable = process.env.GROUPS_TABLE || 'Gro...
# Map, Filter, Reduce ```js const array = [1,2,3,4,5,6] let newArrayWithMaP = array.map((value, index, array)=>{ return value + 1 }) console.log(newArrayWithMaP) // map makes a new array by performing a certain function on the array and can take 3 argument number index and array ``` ```js let newArrayWithFilter = ...
//requiring the modules const express = require('express'); const cookieSession = require('cookie-session'); const passport = require('passport'); const authRoutes = require('./routes/auth-routes'); const profileRoutes=require('./routes/profile-routes'); const passportSetup = require('./config/passport-setup'); const m...
const { body, validationResult } = require("express-validator"); const Item = require("../models/item"); const Category = require("../models/category"); const asyncHandler = require("express-async-handler"); //index exports.index = asyncHandler(async (req, res, next) => { const [ numItems, numCat...
from sqlalchemy import Column, String, Integer, create_engine from sqlalchemy.orm import relationship from sqlalchemy import ForeignKey from sqlalchemy.orm import registry password = input("Enter you MYSQL password:") engine = create_engine(f'mysql+mysqlconnector://root:{password}@localhost:3306/Projects',echo=True...
# Импортируем необходимые модули import random import string from colorama import Fore # Модуль для окрашивания вывода в консоль # Например, вывода ошибок красного цвета или паролей зелёного цвета def generate_letters_password(length, quantity): """Функция для генерации паролей вида "Только буквы разного регист...
/* * 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 ...
#Hoppe Functions # DA ---------------------------------------------------------------------- # ACTUALS dp_close_actuals <- function(tw){ # cost_centers_data. ccdata <- openxlsx::read.xlsx("datacc_da.xlsx", "hist_raw") %>% as_tibble() %>% janitor::clean_names() samort <- openxlsx::read.xlsx("d...
import { forwardRef } from 'react'; import { getClassName } from '~utils/helpers'; import s from './Button.module.css'; interface ButtonProps extends React.ComponentProps<'button'> { variant: 'filled' | 'filledTonal' size: 'small' | 'large' active?: boolean } export const Button = forwardRef<HTMLButtonElement...
--- title: "Precall and Postcall" authors: ["Chengyu Song"] date: "2009-06-14" tags: - "qebek" - "sebek" - "qemu" - "windows" --- When using hooking technology to intercept system calls, there are two different places to collect information: before the original function is called (precall) and after the origi...
import { Injectable } from '@angular/core'; import { InMemoryDbService } from 'angular-in-memory-web-api'; import { chardetailInter } from './character-detail/chardetailInterface'; import { gadgetdetailinter } from './gadget-detail/gadgetdetailinter'; import { galleryInter } from './gallery/galleryInter'; @Injectable(...
package com.project.sbs.api.controllers.auth; import com.project.sbs.api.requests.LoginRequest; import com.project.sbs.api.requests.RegisterRequest; import com.project.sbs.api.requests.VerifyEmailRequest; import com.project.sbs.api.responses.ErrorResponse; import com.project.sbs.api.responses.LoginSuccessfulResponse; ...
import { expect } from 'chai'; import sinon from 'sinon'; import { Kinesis } from '@aws-sdk/client-kinesis'; import logger from '../../services/external/Logger.service'; import { IKinesisService, KinesisService } from '../../services/external/Kinesis.service'; describe('KinesisService', () => { let kinesisService: I...
module decode #(parameter DWIDTH = 32) ( input [DWIDTH-1:0] instr, // Input instruction. output reg [2 : 0] jump_type, output reg [DWIDTH-7:0] jump_addr, output reg we_regfile, output reg we_dmem, re_dmem, output reg [3 : 0] op, // Operation code for the ALU. output reg ...