text
stringlengths
184
4.48M
/****************************************************************************** * JBoss, a division of Red Hat * * Copyright 2006, Red Hat Middleware, LLC, and individual * * contributors as indicated by the @authors tag. See the * ...
% Brooks Law and the Mythic Man Month % Benjamin Roberts % 6th April 2014 # Brooks Law _"Adding manpower to a late project makes it later" - Fred Brooks_ # Fred Brooks - Ph.D from Harvard in 1953. - Joined IBM in 1956. - Managed the development of System/360 mainframe and OS/360 system. - 1999 winner of the Tur...
import { useEffect, useState } from "react"; import dayjs from "utils/dates/dayjsex"; import getLdBootstrap from "utils/launch-darkly/getLdBootstrap"; const POLLING_INTERVAL = dayjs.duration({ seconds: getLdBootstrap()?.defaultPollingIntervalSeconds ?? 15, }); export default function usePollingFetchKey(duration = P...
import { Link, NavLink } from "react-router-dom"; const NavBar = () => { return ( <nav className="navbar navbar-expand-sm navbar-light bg-light shadow-sm"> <div className="container"> <Link to="/" className="navbar-brand"> Real<i className="bi bi-geo-fill"></i>App </Link> ...
import React, { useState } from 'react' import { List, ListItem, ListItemText } from '@material-ui/core' import Input from './Input' import Button from './Button' function InputRow({ addTodoItem }) { const [input, setInput] = useState('') function addTodo() { addTodoItem(input) setInput('') } return...
<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Paw Finder - Users List</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap....
import { UserDB } from './../../../database/entity/user.entity'; import { ResStatus } from './../../../shared/enum/res-status.enum'; import { UpdateFoodTypeDTO, UpdateFoodTypeReqDTO } from './../dto/update-food-type.dto'; import { HttpException, HttpStatus, Inject, Injectable, OnApplicationBootstrap } from '@nestjs/co...
<div class="dialog-header-bar"> <h1 mat-dialog-title>Applicant editing form</h1> <mat-dialog-actions> <mat-icon mat-dialog-close>close</mat-icon> </mat-dialog-actions> </div> <form class="applicant-form" [formGroup]="validationGroup!" novalidate> <!-- First Name --> <p class="required-fiel...
class User < ActiveRecord::Base authenticates_with_sorcery! has_many :authentications, dependent: :destroy validates :password, length: { minimum: 3 } validates :password, confirmation: true validates :password_confirmation, presence: true validates :email, uniqueness: true def apply_omniauth(omniauth)...
package Ecom.Controller; import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springf...
import { Arg, Authorized, Ctx, FieldResolver, Mutation, Query, Resolver, ResolverInterface, Root } from 'type-graphql' import { Excuse } from '../entity/Excuse' import { Context } from '../types' import { ExcuseCreateInput, ExcuseCreateResponse, createExcuse } from './excuse/create' import { ExcuseDeleteResponse,...
from stringprep import in_table_d2 from lxml import etree import re import pandas as pd from transformers import AutoTokenizer from datasets import Dataset from sklearn.model_selection import train_test_split, StratifiedGroupKFold ELEMENT_TAG = 'IIM' with open('data/Tagged ST VW 1927.xml', 'r', encoding='ISO-8859-1'...
package cn.minih.web.core import cn.minih.common.exception.MinihErrorCode import cn.minih.common.exception.MinihException import cn.minih.common.util.* import cn.minih.core.annotation.Service import cn.minih.core.beans.BeanFactory import cn.minih.web.annotation.Delete import cn.minih.web.annotation.Get import cn.minih...
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; contract multiSigWallet{ // Events to be emitted while proforming the function in the multisigwallet event Deposit(address indexed sender, uint amount); event Submit(uint indexed txId); event Approve(address indexed owner, uint indexed ...
<template> <div class="app"> <TheHeader></TheHeader> <TheBalance :transactions="transactions"></TheBalance> <IncomeExpenses :transactions="transactions"></IncomeExpenses> <TransactionList @on-remove-transaction="removeTransaction" :transactions="transactions" ></TransactionList> <A...
# Log Level My solution to the log levels exercise. [My profile Exercism](https://exercism.org/profiles/stefanilima) [Exercism Link](https://exercism.org/tracks/csharp/exercises/log-levels) ## Instructions In this exercise you'll be processing log-lines. Each log line is a string formatted as follows: ` "[<LEVE...
import os import logging import time from datetime import datetime, timedelta from tkinter import * from tkinter import messagebox import shutil import glob # For file pattern matching import subprocess # For file opening import win32com.client # For detecting if file is open and then closing it import pandas as pd imp...
// Copyright 2022 ByteDance and/or its affiliates. // // 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...
from collections import Counter from enum import Enum import pytest from cardpicker.integrations.integrations import get_configured_game_integration from cardpicker.integrations.mtg import MTG class TestGetIntegration: @pytest.mark.parametrize("environment_variable, integration_class", [("MTG", MTG)]) def t...
<!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>portfolio</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/modern-no...
.. _module_becke_numerical_grid: .. program:: becke_numerical_grid .. default-role:: option becke_numerical_grid This module contains all quantities needed to build Becke's grid used in general for DFT integration. Note that it can be used for whatever integration in R^3 as long as the functions to be int...
// https://practice.geeksforgeeks.org/problems/prerequisite-tasks/1 package Graph; import java.util.List; import java.util.ArrayList; public class PrerequisiteTasks_DFS { public static void main(String[] args) { int N = 4; int[][] prerequisites = {{1, 0}, {2, 1}, {3, 2}}; System.out.print...
<?xml version='1.0' encoding='ISO-8859-1'?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" > <!-- Layout borrowed from Doug's smartmontools_scsi.xml. The following text is also from his file. This is DocBook XML that can be rendered into a ...
/******************************************************************** created: 2012/02/04 created: 4:2:2012 11:24 filename: IDataSourceStatus.h author: Mateusz Janiak purpose: Obiekty pozwalające określić status danych - ich dostępnośc i użycie ******************************************...
# string data type # literal assignment import math first = 'Dave' last = "Mark" # print(type(first)) # print(type(first) == str) # print(isinstance(first, str)) # constructor function # pizza = str("Pepperoni") # print(type(pizza)) # print(type(pizza) == str) # print(isinstance(pizza, str)) # concatanation fullna...
package day03_review.demo03_面向对象.面向对象中.继承.继承性.作业2; public class Cylinder extends Circle { private double length; public Cylinder(double radius, double length) { super(radius); this.length = length; } public double getLength() { return length; } public void setLength(d...
import { readFileIntoLines } from "../../utils/readFile"; describe("Day 7: Handy Haversacks", () => { describe("How many bag colors can eventually contain at least one shiny gold bag?", () => { test("Example", () => { const example = readFileIntoLines(`${__dirname}/fixtures/example.txt`); expect(coun...
package pl.lodz.p.it.ssbd2023.ssbd02.web.selenide; import static com.codeborne.selenide.Condition.attribute; import static com.codeborne.selenide.Condition.text; import static com.codeborne.selenide.Selenide.$; import static com.codeborne.selenide.Selenide.$$; import static com.codeborne.selenide.Selenide.localStorage...
import { Button, MantineProvider } from '@mantine/core' import { useColorScheme } from '@mantine/hooks' import type { ReactNode } from 'react' import React, { Suspense, useEffect, useState } from 'react' import { isDisconnectError } from '../../common/isDisconnectError' import { onBackgroundDisconnection } from '../bac...
import * as React from 'react'; import Button from '@mui/material/Button'; import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; import DialogContent from '@mui/material/DialogContent'; // import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle f...
import 'package:flutter/material.dart'; import 'package:skinsavvy/core/routes.dart'; import 'package:skinsavvy/presentation/pages/skincare_rec/models/skincare_rec_model.dart'; import 'package:skinsavvy/presentation/widgets/app_bar.dart'; import 'package:skinsavvy/presentation/widgets/button.dart'; import 'package:skins...
import Sortable from "../../node_modules/sortablejs/modular/sortable.complete.esm.js"; import { baseUrl, renderError, sendAPI } from "../../config.js"; class App { #data = { Shandilya: { currentTasks: [], savedForLaterTasks: [], completedTasks: [], }, Aaditya: { currentTasks: [], ...
/************ 1 - SITIO OFICIAL DE JAVASCRIPT ************/ /* Podría decirse que, como standard (ECMAScript) el sitio oficial del lenguaje es: http://www.ecmascript.org/ Sin embargo, este sitio solo se ocupa de la estandarización. Las especificaciones del lenguaje para desarrolladores se encuentra en el siguiente url:...
package tableau._014_Longest_Common_Prefix; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertEquals; /** * @author jacka * @version 1.0 on 2/17/2020 */ class SolutionITest...
package com.cydeo.tests.day15_data_driven_testing; import com.cydeo.utils.ConfigurationReader; import io.restassured.http.ContentType; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import static io.restassured.RestAssure...
# coding: utf-8 """ This module provides command-line access to pystache. Run this script using the -h option for command-line help. """ try: import json except: # The json module is new in Python 2.6, whereas simplejson is # compatible with earlier versions. try: import simplejson as json ...
import 'package:drift/drift.dart'; import 'package:expense_kit/model/database/database.dart'; import 'package:expense_kit/model/entity/expense_entity.dart'; class Expense extends Table { IntColumn get id => integer().autoIncrement()(); TextColumn get description => text().nullable()(); RealColumn get amount =>...
import React from 'react' import { Checkbox, FormControlLabel, makeStyles, Theme, } from '@material-ui/core/' const useStyles = makeStyles((theme: Theme) => ({ label: { ...theme.typography.caption, marginBottom: '-0.5em', }, })) interface Props { name: string label: string value: boolean ...
library IEEE; use IEEE.Std_logic_1164.all; use IEEE.Numeric_Std.all; entity decode_tb is end; architecture bench of decode_tb is component decode Port ( instruction : in std_logic_vector (31 downto 0); pc : in std_logic_vector (31 downto 0); write_data : in std_logic_vector (31 downto 0); write_enable :...
import PropTypes from 'prop-types'; export const Contacts = ({ contacts, onContactDelete }) => { if (contacts.length === 0) { return <h4>No contacts avaliable</h4>; } return ( <ul> {contacts.map(({ name, number, id }) => ( <li key={id}> {name}: {number}{' '} <button typ...
// SPDX-License-Identifier: ISC pragma solidity >=0.8.19; import { BaseScript } from "frax-std/BaseScript.sol"; import { console } from "frax-std/FraxTest.sol"; import "src/Constants.sol" as Constants; import { ArbitrumDualOracle, ConstructorParams as ArbitrumDualOracleParams } from "src/ArbitrumDualOracle.sol"; func...
package ru.sladkkov.service; import java.math.BigDecimal; import java.time.LocalDate; import java.time.Period; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import ru.sladkkov.dto.ScoringDataDto; import ru.sladkkov.enums.Empl...
<?php declare(strict_types=1); require_once dirname(__FILE__) . '/functions.php'; try { if (!isset($_GET['title']) || trim($_GET['title']) === '') { return; } $pdo = connect(); $statement = $pdo->prepare("SELECT * FROM books WHERE title LIKE :title ESCAPE '#' ORDER BY published DESC"); $s...
"use client" import DogForm from './dog-form'; import DogList from './dog-list'; import DogData from './dogs.json'; import { useState } from 'react'; export default function DogPage() { const [dogList, setDogList] = useState( DogData.map( (dog) => ({...dog}) ) ); const handleCreateDog = (newDog)...
// // UserPermissions.swift // // // Created by Stuart A. Malone on 3/22/23. // import Foundation /// UserPermissions control which parts of the user interface are enabled, /// and which server operations the user can perform. /// /// UserPermissions are not stored in the database so they can evolve over time ///...
import sys import zmq import time import asyncio import zmq.asyncio import threading import argparse import logging import numpy as np from datetime import datetime from collections import deque import aioconsole ctx = zmq.asyncio.Context() async def receive_data(writer, addr, port): zmq_socket = ctx.socket(zmq....
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
import 'package:flutter/material.dart'; class PasswordInput extends StatefulWidget { final String password; final Function(String) onPasswordChange; const PasswordInput( {Key? key, required this.password, required this.onPasswordChange}) : super(key: key); @override State<PasswordInput> createS...
import React from "react"; // Redux import { useSelector, useDispatch } from "react-redux"; import { Icon as LegacyIcon } from "@ant-design/compatible"; // Design import { Layout } from "antd"; import "./header.css"; // Views import AccountMenu from "./views/AccountMenu"; import Notifications from "./views/Notifica...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } interface INFT { function transferFrom(address from, address to, uint256 tokenId) external; } contract fourthSector { address publ...
const mongoose = require('mongoose'); const _ = require('underscore'); const setName = (name) => _.escape(name).trim(); const TeamSchema = new mongoose.Schema({ name: { type: String, required: true, trim: true, set: setName, }, team: { member1: { species: { type: String, ...
// src/pages/CharacterDetailsPage.jsx import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; import axios from 'axios'; import { useDispatch, useSelector } from 'react-redux'; import { addFavorite, removeFavorite, selectFavorites } from '../store/favoritesSlice'; const Charac...
import { Component } from 'react'; import pdfMake from 'pdfmake/build/pdfmake'; import dayjs from 'dayjs'; import { vfs } from './vfs_fonts.js'; import * as tableStructures from './columns'; import { tableLayout, fonts } from './settings'; import { getTaskTotalPriceHelper } from 'helpers'; class ListExport extends Com...
<!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="bootstrap/css/bootstrap.css"> <link rel="stylesheet" href="css/style.css"> <tit...
module Blogging class HomeHandler < Marten::Handlers::Template include NavBarActiveable @following_users : Bool? nav_bar_item :home template_name "blogging/home.html" before_render :add_user_data_to_context before_render :add_articles_to_context before_render :add_popular_tags_to_contex...
package com.example.busManagement.controller; import com.example.busManagement.domain.Luggage; import com.example.busManagement.domain.Passenger; import com.example.busManagement.domain.PassengerDTO; import com.example.busManagement.exception.PassengerNotFoundException; import com.example.busManagement.repository.IRep...
const async = require('async'); const helpers = require('../../../helpers/azure'); module.exports = { title: 'Connection Throttling Enabled', category: 'PostgreSQL Server', description: 'Ensures connection throttling is enabled for PostgreSQL servers', more_info: 'Connection throttling slows the amount...
import React from 'react'; import { IndexRoute, Router, Route, Redirect, browserHistory } from 'react-router'; import i18n from 'meteor/universe:i18n'; import injectTapEventPlugin from 'react-tap-event-plugin'; import { Meteor } from 'meteor/meteor'; import { Tracker } from 'meteor/tracker'; import { PrintBuddy } from ...
/****************************************************************************** * * timer.hpp * * @author Copyright (C) 2015 Kotone Itaya * @version 2.1.0 * @created 2015/11/02 Kotone Itaya -- Created! * @@ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreement...
from flask import Blueprint, request, jsonify from flask_jwt_extended import create_access_token, jwt_required, get_jwt_identity, create_refresh_token from app.models.user_model import User from app.database import db auth_blueprint = Blueprint('auth', __name__) @auth_blueprint.route('/register', methods=['POST']) ...
import 'react-app-polyfill/ie11'; import * as React from 'react'; import * as ReactDOM from 'react-dom'; import ProductCard, {ProductTitle, ProductImage, ProductButtons} from 'adlb-product-card'; const product = { id: '1', title: 'Coffee Mug - Card', img: './coffee-mug.png' } const App = () => { return ( ...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Enums/EnemyState.h" #include "Characters/BaseCharacter.h" #include "BaseEnemy.generated.h" class UBehaviorTree; class APlayerCharacter; DECLARE_DYNAMIC_MULTICAST_DELEGATE(FEnemyDeadDelegate...
# Wzorzec projektowy Fasada (Facade) jest używany do zapewnienia uproszczonego interfejsu do # skomplikowanego zestawu klas, biblioteki lub frameworka. # Zalety: # 1. Uproszczenie interfejsu: Klienci korzystają z jednego uproszczonego interfejsu zamiast bezpośrednio # z skomplikowanego systemu klas. # 2. Rozdzielen...
# Lookups primarily make use of hashing and dictionaries # If you are interested in how these work under the hood # Check out our hashing article here: https://schulichignite.com/blog/verifying-quickly from __future__ import annotations import uuid from dataclasses import dataclass database = dict() # Stores users wit...
package jdbc0922; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; public class Test02_selectOne { public static void main(String[] args) { // sungjuk 테이블에서 한 행 가져오기 int sno=61; Connection con = null; PreparedStatement pstmt = null; ...
import numpy as np from scipy.spatial.distance import cdist from collections import namedtuple, deque import random class FrameStacker: def __init__(self, num_frames, frame_shape): self.num_frames = num_frames self.frame_shape = frame_shape self.frames_buffer = deque(maxlen=num_frames) ...
package com.cydeo.step_definitions; import com.cydeo.pages.WikiResultPage; import com.cydeo.pages.WikiSearchPage; import com.cydeo.utilities.BrowserUtils; import com.cydeo.utilities.Driver; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; import io.cucumber.java.sl.In...
import React from 'react'; import { HEROBANNER_SIZE, IMAGE_BASE_URL, POSTER_SIZE } from "../config"; import { Button } from "./Button"; import { Grid } from "./Grid"; import { Herobanner } from "./HeroBanner"; import { Searchbar } from "./Searchbar"; import NoImage from '../images/no_image.jpg' import { useHomeSeriesFe...
import React, {useRef, useCallback} from 'react'; import {WebView, WebViewMessageEvent} from 'react-native-webview'; import {styles} from './styles'; import {injectedJavaScript} from './injection'; type MainWebViewProps = { uri: string; setInformationGrab: (data: string) => void; }; export const MainWebView = ({u...
# OpenAD [![PyPI version](https://img.shields.io/pypi/v/openad)](https://pypi.org/project/openad/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/openad)](https://pypi.org/project/openad/) [![License MIT](https://img.shields.io/github/license/acceleratedscience/open-ad-toolkit)](https://opensource.org...
<?php namespace Drupal\Tests\jsonapi\Kernel\Query; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Http\Exception\CacheableBadRequestHttpException; use Drupal\jsonapi\Context\FieldResolver; use Drupal\jsonapi\Query\Filter; use Drupal\jsonapi\ResourceType\ResourceType; use Drupal\node\Entity\Nod...
"use client"; import Link from "next/link"; import React, { useEffect } from "react"; import { useRouter } from "next/navigation"; import axios from "axios"; import toast from "react-hot-toast"; export default function LoginPage() { const router = useRouter(); const [user, setUser] = React.useState({ e...
<?php namespace Drupal\{{ machine_name }}\Plugin\Validation\Constraint; use Symfony\Component\Validator\Constraint; /** * Provides {{ plugin_label|article }} constraint. * * @Constraint( * id = "{{ plugin_id }}", * label = @Translation("{{ plugin_label }}", context = "Validation"), * ) {% if input_type == ...
using MediatR; using Microsoft.Extensions.Localization; using Taqm.Core.Bases; using Taqm.Core.Features.Authentication.Commands.Models; using Taqm.Core.Features.Users.Commands.Models; using Taqm.Core.Resources; using Taqm.Data.Responses; using Taqm.Service.Abstracts; namespace Taqm.Core.Features.Authentication.Comman...
// // IconView.swift // ICNS // // Created by John Notaris on 7/5/24. // import SwiftUI import UniformTypeIdentifiers struct IconView: View { @Binding var icon: Icon @State private var showAlert = false @State private var alertMessage = "" @State private var alertTitle = "Success" @State privat...
import React, { useEffect } from 'react'; import { Box, Stack, Typography } from '@mui/material'; import CustomButton from './CustomButton'; import UserContext from '../Context/GlobalContext'; import Cookies from 'js-cookie'; import Axios from '../AxiosInstance'; const Navbar = ({ handleOpen = () => {}, user, setUser ...
<?php namespace App\Http\Controllers; use App\Http\Requests\StoreSocialWelfareRequest; use App\Http\Requests\UpdateSocialWelfareRequest; use App\SocialWelfare; use Illuminate\Http\Request; use Session; class SocialWelfareController extends Controller { /** * Display a listing of the resource. * * @...
import { PROD, fetchCookies } from "../util/consts"; import { ApiResponse } from "./api.types"; export const url = (path: string, params?: {[key: string]: string})=>{ // remove all slashes at end of path path = path.trim().replace(/(\/)*$/, ""); const strParams = params ? Object.entries(params).reduce((pre...
/* * Copyright (c) 2021 Nicholas Valenti. All rights reserved. * This project is supplied as-is with no warranty or guarantees. * * Licensed under GPLv3. */ #ifndef CONTEXTMENU_H #define CONTEXTMENU_H #include <QMenu> #include <QMap> #include <QString> #include <QActionGroup> #include "card.h" #include "carddispl...
package wres.testing; import java.io.IOException; import java.net.URI; import java.time.Duration; import java.util.Collections; import java.util.List; import java.util.Objects; import javax.net.ssl.SSLContext; import javax.net.ssl.X509TrustManager; import com.fasterxml.jackson.databind.DeserializationFeature; import c...
import mongoose from "mongoose"; import bcrypt from "bcryptjs"; import jwt from "jsonwebtoken"; const userSchema = mongoose.Schema( { firstName: { type: String, requre: true, }, lastName: { type: String, requre: true, }, phone: { type: Number, require: true, ...
import MD5 from 'js-md5'; export type FetchImageResult = { width: number; height: number; file: File; uuid: string; url: string; }; export type BaseImageSize = { width: number; height: number; }; export const getImageSize = (imageInnerSize: BaseImageSize): BaseImageSize => { const windowSize: BaseIma...
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/03/b/RAM16K.hdl /** * Memory of 16K registers, each 16 bit-wide. Out holds the value * stored at the memory location specified by address. If load==1, then * t...
const express = require("express"); const bodyParser = require("body-parser"); const Blockchain = require("../blockchain"); // const HTTP_PORT = process.env.HTTP_PORT || 3000; const HTTP_PORT = process.env.HTTP_PORT || 3000; const P2pServer = require("./p2pServer"); const app = express(); const bc = new Blockchai...
import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "./globals.css"; import {ThemeProvider} from "../components/providers/theme-provider"; import { Toaster } from "sonner" import ConvexClientProvider from "../components/providers/ConvexClientProvider.tsx"; import {ModalProvider} from ...
package dev.gnomebot.app.server.handler; import dev.gnomebot.app.App; import dev.gnomebot.app.Assets; import dev.gnomebot.app.server.HTTPResponseCode; import dev.gnomebot.app.server.ServerRequest; import dev.gnomebot.app.util.SnowFlake; import dev.gnomebot.app.util.URLRequest; import dev.latvian.apps.webutils.ImageUti...
import 'package:flutter/material.dart'; import 'package:supabase_flutter/supabase_flutter.dart'; import 'package:go_router/go_router.dart'; import 'package:sae_mobile/utils/supabaseService.dart'; class CreateAccountPage extends StatefulWidget { const CreateAccountPage({Key? key}) : super(key: key); @override _C...
// Copyright 2023 Intrinsic Innovation LLC // Intrinsic Proprietary and Confidential // Provided subject to written agreement between the parties. #ifndef INTRINSIC_PLATFORM_COMMON_BUFFERS_RT_QUEUE_BUFFER_H_ #define INTRINSIC_PLATFORM_COMMON_BUFFERS_RT_QUEUE_BUFFER_H_ #include <atomic> #include <cstddef> #include <me...
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <fcntl.h> #include <tuple> #include <unistd.h> #include <vector> #include "../syscall.h" std::tuple<int, char*, size_t> MapFile(const char* filepath){ SyscallResult res = SyscallOpenFile(filepath, O_RDONLY); if (res.error) { ...
import { useState, useEffect } from 'react'; import { useParams } from 'react-router-dom'; import ItemList from './ItemList'; import Spinner from '../spinner/Spinner'; import Error from '../404'; import { getProducts, getProductsByCategory } from '../../firebase'; const ItemListContainer = () => { const [products, ...
import useNav from "@/hooks/useNav" import { forwardRef } from "react" import Container from "./Container" import H2 from "./H2" import H3 from "./H3" import Supertitle from "./Supertitle" const Ownership = forwardRef<HTMLDivElement, {}>(props => { const ref = useNav('ownership') return ( <div ref={re...
#include <iostream> using namespace std; class NodeCL{ public: int data; NodeCL*next; NodeCL(int d){ this->data=d; next=NULL; } ~NodeCL(){ int value=this->data; if(this->next!=NULL){ delete next; next=NULL; } cout<<"Memory is free for node with data "<<value<<endl; }...
<%@ page import="com.liferay.portal.kernel.model.User" %> <%@ page import="java.util.List" %> <%@ page import="djh.learn.builder.easyLiferay.service.PersonServiceUtil" %> <%@ page import="djh.learn.builder.easyLiferay.model.Person" %> <%@ include file="/init.jsp" %> <%@ taglib uri = "http://java.sun.com/jsp/jstl/core"...
/* * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
import React, { useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { getRockets, cancelReservation, reserveRocket } from '../redux/RocketSlice'; const Rockets = () => { const dispatch = useDispatch(); const rockets = useSelector((state) => state.rockets.rockets); useEffect(...
""" Methods to handle date-strings and datetime objects. The UTC timezone should be used in db by default. Thus, all the methods return the dates relative to UTC. """ from typing import Union, Optional from datetime import datetime, timedelta import pytz def get_today_utc_date_in_timezone(timezone: str) -> str: ...
import React from "react"; import { Link, NavLink, Outlet } from "react-router-dom"; import useAdmin from "../hooks/useAdmin"; import useInstructor from "../hooks/useInstructor"; import useStudent from "../hooks/useStudent"; import logo from "../assets/logo.png"; import { FaListUl, FaBookMedical, FaFileInvoiceDol...
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.WebUtilities; using System; using System.Collections.Generic; using System.Collect...
import 'dart:convert'; import 'package:dexter_mobile/app/shared/app_colors/app_colors.dart'; import 'package:dexter_mobile/app/shared/widgets/progress_indicator.dart'; import 'package:dexter_mobile/data/address/add_address_response_model.dart'; import 'package:dexter_mobile/data/address/address_model_responsible.dart'...
/* roadmap_nmea.h - Decode a NMEA sentence. * * LICENSE: * * Copyright 2002 Pascal F. Martin * * This file is part of RoadMap. * * RoadMap 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...