text
stringlengths
184
4.48M
package sistemaNotas.examen.modelo.entidad; import sistemaNotas.categoria.entidad.Categoria; import sistemaNotas.dominio.ValidadorArgumento; import sistemaNotas.pregunta.modelo.entidad.Pregunta; import java.util.HashSet; import java.util.Set; public class Examen { private Long examenId; private Categoria categor...
import { config } from '@repo/configs'; import { cors } from 'hono/cors'; import { csrf } from 'hono/csrf'; import { secureHeaders } from 'hono/secure-headers'; import { CustomHono } from '../types/common'; import { logEvent } from './logger/log-event'; import { logger } from './logger/logger'; const middlewares = ne...
class object(): def __init__(self, val = 0, next = None, prev = None): self.val = val self.next = next self.prev = prev class MyLinkedList(object): def __init__(self): self.head = None self.tail = None self.length = 0 def getNode(self, index): ...
<!doctype html> {% load static %} <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="styles...
import Container from "@mui/material/Container"; import Box from "@mui/material/Box"; import Button from "@mui/material/Button"; import { useEffect, useState } from "react" import AddTodo from "../Components/AddTodo"; import { useHistory } from "react-router-dom"; const Todo = () => { const history = useHistory();...
/********************************************************************************************************************** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * ...
// -*- mode: outline ; coding: utf-8-unix -*- ** HOW TO HELP IF YOUR WATCH'S PROTOCOL IS NOT PROPERLY HANDLED BY ANT+minus * In this case your device talks a different dialect of ANT/ANT+/ANT-FS that we've seen so far. * To solve this, we'll need a dump of the USB communication between your watch (USB2ANT stick) and a...
#include "chain.h" Chain::Chain() {} Chain::Chain(std::string entry_chain) { for (unsigned int i = 0; i < entry_chain.size(); i++) { Symbol symbol(entry_chain[i]); chain_.push_back(symbol); } } void Chain::set_alphabet(Alphabet& entry_alphabet) { alphabet_ = entry_alphabet; } void Chain::set_chain(std...
## LeetCode Problem: Reverse Words in a String ### Problem Description Given an input string `s`, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in `s` will be separated by at least one space. Return a string of the words in reverse order concatenated by a single sp...
import { View, Text, ScrollView } from "react-native"; import React, { useContext, useState } from "react"; import { ClickContext } from "../context/ClickContext.js"; import { styles } from "../styles/MainScreenStyles.js"; import KeyPad from "../components/KeyPad.jsx"; import { ThemeContext } from "../context/ThemeCo...
import { Component, OnInit } from '@angular/core'; import { ScoresService } from 'src/app/services/scores.service'; @Component({ selector: 'app-ahorcado', templateUrl: './ahorcado.component.html', styleUrls: ['./ahorcado.component.scss'] }) export class AhorcadoComponent implements OnInit { LETRAS:Array<strin...
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:novanest/APIS/apis.dart'; import 'package:novanest/Screens/authentication/login_screen.dart'; import 'package:novanest/Screens/home_screen.dart'...
import React from 'react'; import {DataGrid, GridRenderCellParams} from '@mui/x-data-grid'; import {useTheme, Theme} from '@mui/material/styles'; import {Contact, contactData} from "../../data/contactData"; const columns = (theme: Theme) => [ { field: 'name', headerName: 'Name', minWidth: 150, render...
import folium from folium import Choropleth # Function to create a Folium choropleth map def create_map(geo_data, key_on, columns, fill_color = "YlOrRd", fill_opacity = 0.7, line_opacity = 0.7, legend_name = "", base_location = [40.7128, -74.0060], base_zoom_start = 11, tiles = "CartoDB P...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateCustomerInvestmentsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('cus...
import { createBrowserRouter } from "react-router-dom"; import Main from "../layout/Main"; import Home from "../pages/home/Home"; import Login from "../login/Login"; import Signup from "../resister/Signup"; import Checkout from "../pages/checkout/Checkout"; import Booking from "../pages/booking/Booking"; import Private...
from typing import Union import numpy as np from app.cypher.query_cypher import * from app.handler.neo4j_handler import Neo4jHandler class QueryHandler(Neo4jHandler): def query_node_ids(self, category: str, sub_class_level: int, context: str, meaning: str): if not category: raise ValueError(...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const express_1 = __importDefault(require("express")); const user_controller_1 = require("../Controller/...
import React, { useState, useEffect } from 'react' import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import Typography from '@mui/material/Typography'; import Modal from '@mui/material/Modal'; import toast from 'react-hot-toast'; import axios from 'axios'; import UserBadgeItem from '../Use...
using Content.Application.Common.Interfaces.Repositories; using FluentValidation; namespace Content.Application.Tags.Commands.AddTag; public class AddTagCommandValidator : AbstractValidator<AddTagCommand> { public AddTagCommandValidator(ITagRepository repository) { RuleFor(p => p.Name) .No...
# Constants initialization import time import pandas as pd from EEE.utils.constants import * from EEE.utils.helpers.genetic_algorithm import GeneticAlgorithm import math class Factory: def __init__(self, name: str, wind_power_list: list[float] = None, solar_power_list: list[float] = None, powe...
@inject postMortemWorker Worker @foreach (Post post in _PostsInView) { <postMortem.Web.Components.PostElement Post="post" /> <br /> } <br /> <Pagination TotalPages="@TotalPages" PageChanged="OnPageChanged" /> @code { /// <summary> /// Total amount of pages that should be shown on a page. /// </s...
import React from 'react'; import axios from 'axios'; export default class Comment extends React.Component { constructor(props) { super(props) this.state = { currentPage: 0, comment: '', errorMess: [], comment:[] } this.handleCurrentPag...
import { state } from './state.js' import * as utilMethods from './utils.js'; import { flashNumOne, flashNumTwo, flashOpOne } from './domElements.js'; import { mcNumOne, mcNumTwo, mcOpOne } from './domElements.js'; import { mcQuizNumOne, mcQuizNumTwo, mcQuizOpOne, } from './domElements.js'; import { quizNumOne, quizNu...
<template> <div name="弹出窗口" v-show="changeTalker"> 请选择你的角色: <v-chip-group active-class="primary-text" color="primary" column v-model="chipSelectID" :readonly="true"> <v-chip prepend-icon="mdi-account-circle" v-for="(people, i) in data.slice(1)" @click="changeTalkerId(i + 1)" :value="i"> ...
// ------------------------- // projects/life/RunLife.c++ // Copyright (C) 2013 // Glenn P. Downing // ------------------------- /* To run the program: % g++ -pedantic -std=c++0x -Wall AbstractCell.c++ Cell.c++ ConwayCell.c++ FredkinCell.c++ -o RunLife % valgrind RunLife > RunLife.out To configure Doxygen: ...
fun main() { val pyramid = Pyramid(8) val invertedPyramid = InvertedPyramid(8) val diamond = Diamond(8) val xShape = XShape(16) val hollowPyramid = HollowPyramid(6) println("Piramida Bintang:") pyramid.draw() println("\nPiramida Terbalik Bintang:") invertedPyramid.draw() print...
/** Libraries */ import { render, screen, fireEvent } from '@testing-library/react'; import '@testing-library/jest-dom/extend-expect'; import user from '@testing-library/user-event'; /** Components */ import { Search } from '..'; describe('Search component', () => { const props = { query: 'query', type: 'search',...
\documentclass{article} % if you need to pass options to natbib, use, e.g.: % \PassOptionsToPackage{numbers, compress}{natbib} % before loading neurips_2020 % ready for submission \usepackage{neurips_2020} % to compile a preprint version, e.g., for submission to arXiv, add add the % [preprint] option: % \us...
<h3>Create New</h3> <div class="container"> <div class="col-12"> <form [formGroup]="reactiveForm" (ngSubmit)="onSubmit(reactiveForm)" novalidate> <div class="row"> <div class="col-6 create-col"> <label for="title">Title </label> <input type...
package com.route.todo.ui.home.addTask import android.app.DatePickerDialog import android.app.TimePickerDialog import android.icu.util.Calendar import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.google.android.material.bottomsheet.BottomSheetDi...
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>管道小鸟</title> <link rel="shortcut icon" href="img/bird.gif" type="image/x-icon"> <link rel="stylesheet" href="index.css"> <script src="js/vue.min.js"></script> </head> <body> <div id="app"> <div class="bird-game"> <div class="bird-box"> ...
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs'; import { Prisma, Employee } from '@prisma/client'; import { EmployeeRepository } from '../employee.repository'; /** * Remove employee command */ export class RemoveEmployeeCommand { /** * Constructor * @param {string} id ID of removed employee ...
package com.kts.unittestexample; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito.*; import org.mockito.runners.MockitoJUnitRunner; import static org.junit.Assert.*; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; /** * Example local unit test, whi...
import React, { useState, useEffect } from 'react'; import axios from 'axios'; import { Link } from 'react-router-dom'; import { Modal, Button } from 'react-bootstrap'; // Import Bootstrap modal components export default function AllStudents() { const [users, setUsers] = useState([]); const [showDeleteModal, setSh...
<template> <div class="container"> <h2>게시글 작성</h2> <form @submit.prevent="onSubmit" class="mb-2"> <div class="mb-3 input-element"> <label for="title" class="form-label">제목</label> <input type="text" v-model="article.title" class="form-control" id="title" placeholder="게시글 제목을 입력해주세요"> ...
import { configureStore } from "@reduxjs/toolkit"; import loadingReducer from "./reducers/loadingReducer"; import clientReducer from "./reducers/clientReducer"; import listReducer from "./reducers/listReducer"; import modalReducer from "./reducers/modalReducer"; import refetchReducer from "./reducers/refetchReducer"; i...
# 🖍️ ColorWiz: An AI Powered Coloring Book Generator This is a group capstone project that was done for the completion of a bachelors degree in Information Technology. # 🌟 Features * **User-friendly GUI:** easy-to-use and simple graphical user interface built with Tkinter, enhancing the user experience. * **Image Ge...
package com.gardenbk.mygarden.sec.filters; import com.auth0.jwt.JWT; import com.auth0.jwt.algorithms.Algorithm; import com.fasterxml.jackson.databind.ObjectMapper; import com.gardenbk.mygarden.sec.web.JwtUtil; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security...
package com.tigeriot.iotapp.ui.page.nfc import android.app.Application import androidx.compose.animation.core.FastOutSlowInEasing import androidx.compose.animation.core.RepeatMode import androidx.compose.animation.core.animateFloat import androidx.compose.animation.core.infiniteRepeatable import androidx.compose.anim...
function [x,y,it] = PowerT2(A,x0,a,b,tol) % POWERT2 power method for 3rd order tensors % [X,Y,IT] = POWERT2(A,X0,a,b,tol) % % Computes the node and layer centrality vectors obtained when the power % method is applied to a three order tensor as described in % "Node and layer eigenvector centralities for multiplex ne...
# This script was run with grf version 1.2.0. rm(list = ls()) library(grf) data = read.csv('angev80_recode_run1_line525.csv.xz') FEATURES=data.frame(data$twoa.agem, data$twoa.agefstm, data$twoa.educm, as.numeric(data$twoa.blackm), as.numeric(data$twoa.hispm), as.numeric(data$twoa.othracem...
import { Component, OnInit } from '@angular/core'; import { Storage } from '@ionic/storage'; interface MenuItem { label: string; id: string; icon: string; disabled: boolean; checked?: Promise<any>; } @Component({ selector: 'app-config', templateUrl: './config.page.html', styleUrls: ['./config.page.scs...
import SwiftUI // MARK: - View public struct ImageViewer: View { let image: Image let config: Config let onCloseTap: () -> Void public init(image: Image, onCloseTap: @escaping () -> Void, config: Config = .default) { self.image = image self.onCloseTap = onCloseTap self.config...
import React, { useState, useEffect } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; import questions from '../data/questions'; import './Quiz.css'; const Quiz = ({ onQuizSubmit }) => { const { category } = useParams(); const navigate = useNavigate(); const [quizQuestions, setQuizQuesti...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MyLogger = void 0; const chalk = require("chalk"); const dayjs = require("dayjs"); const winston_1 = require("winston"); class MyLogger { constructor() { this.logger = (0, winston_1.createLogger)({ level: 'debug...
import React, { useState, useEffect } from 'react' import './Breakdown.css' import { useNavigate } from 'react-router-dom' import axios from 'axios' import Select from './../forms/select/Select' export default function BreakDown() { const [usernos, setUsers] = useState([]) const [selectedUserId, setSelectedUserId]...
/** 获取指定长度的随机数 */ export const generateRandomId = (length: number) => { const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let id = ''; for (let i = 0; i < length; i++) { let randomIndex = Math.floor(Math.random() * chars.length); id += chars[randomIndex]; } return id; } ...
package a3interface import ( "reflect" "testing" ) func TestNewRegistration(t *testing.T) { type args struct { command string } tests := []struct { name string args args want *RVExtensionRegistration }{ { name: "test", args: args{ command: "test", }, want: &RVExtensionRegistration{ ...
export class Page { openUrl(url: string | undefined = "/"): void { cy.visit(url); } includeUrl(url: string): void { cy.url().should("include", url); } equalUrl(url: string): void { cy.url().should("eq", url); } refresh(): void { cy.reload(); this.wait(1000); } wait(milliseconds...
import { useToast } from "@/components/ui/use-toast"; import { updateColumnIndexes } from "@/queries/columns"; import { TypedSupabaseClient, ColumnType } from "@/utils/types"; import { useQueryClient, useMutation } from "@tanstack/react-query"; export default function useUpdateColumnIndexesMutation( client: TypedSup...
import numpy as np import matplotlib.pyplot as plt class ForwardEuler_v1: # kopierer inn classen fra en bok def __init__(self, f, U0, T, N): # konstruktør self.f, self.U0, self.T, self.N = f, U0, T, N # attributter self.dt = T/N self.u = np.zeros(self.N+1) # ...
import { Box, Button, Flex, Text, Tooltip, useColorMode, useColorModeValue, } from "@chakra-ui/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faGithub, faLinkedin } from "@fortawesome/free-brands-svg-icons"; import React from "react"; const Navbar: React.FC = () => { ...
package service import ( "context" "github.com/LXJ0000/go-rpc/app/user/internal/domain" pb "github.com/LXJ0000/go-rpc/idl/pb/user" "golang.org/x/crypto/bcrypt" "net/http" ) type UserServiceServer struct { pb.UnimplementedUserServiceServer userRepo domain.UserRepository } func NewUserServiceServer(userRepo do...
import { AuthGuard } from './guards/auth.guard'; import { MessagesComponent } from './messages/messages.component'; import { UserComponent } from './user/user.component'; import { AboutComponent } from './about/about.component'; import { SignupComponent } from './signup/signup.component'; import { LoginComponent } from...
package de.cotto.lndmanagej.controller; import de.cotto.lndmanagej.model.ChannelIdParser; import de.cotto.lndmanagej.model.ChannelIdResolver; import de.cotto.lndmanagej.model.PubkeyAndFeeRate; import de.cotto.lndmanagej.service.ChannelService; import de.cotto.lndmanagej.service.GraphService; import de.cotto.lndmanagej...
import { ApiError } from "../utils/ApiError.js"; import { asyncHandler } from "../utils/asyncHandler.js" import { User } from "../models/user.model.js" import { Message } from "../models/messages.model.js"; import { DirectMessage } from "../models/directMessage.model.js"; import { ApiResponse } from "../utils/ApiRespon...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device --> <link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png"> <link rel="stylesheet" href="fontawe...
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.m...
#include <stdio.h> #include <stdlib.h> typedef struct { char name[100]; int age; int phonenumber; float salary; } Employee; int main() { int i, n=20; Employee employees[n]; //Taking each employee detail as input printf("Enter %d Employee Details \n \n",n); for(i=0; i<n; i...
--- id: Application launcher section: components subsection: menus cssPrefix: pf-v5-c-app-launcher deprecated: true ---import './application-launcher.css' ## Examples ### Collapsed ```html <nav class="pf-v5-c-app-launcher" aria-label="Application launcher" id="application-launcher-collapsed" > <button cl...
(*--------------------------------------------------------------------------- Copyright (c) 2023 The zipc programmers. All rights reserved. SPDX-License-Identifier: CC0-1.0 ---------------------------------------------------------------------------*) let read_file file = let read file ic = try Ok (In_channel...
import React, { useEffect, useState } from "react"; import Content from "../../layout/content/Content"; import Head from "../../layout/head/Head"; import { Nav, NavItem, NavLink, Card, TabContent, TabPane, Badge, Form, Col, FormGroup, Row } from "reactstrap"; import { Button, Block, BlockBetween, BlockDes, B...
//package com.ewp.examples.service.impl; // //import com.baomidou.mybatisplus.core.conditions.Wrapper; //import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; //import com.baomidou.mybatisplus.extension.plugins.pagination.Page; //import com.ewp.core.common.util.LocalDateUtil; //import com.ewp.exampl...
package com.sx.controller; import com.sx.pojo.Admin; import com.sx.pojo.Result; import com.sx.service.IAdminService; import com.sx.service.impl.AdminServiceImpl; import com.sx.vo.AdminVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; import org.springframework.beans.factory.annota...
#include <iostream> #include <cstdlib> using namespace std; typedef struct Node { int value; Node* next; } Node; class Stack { public: Node* head; Stack() { this->head = NULL; } Node* createNode(int value) { Node* node = (Node*) malloc(sizeof(Node)); node->next ...
<?php /** * File containing the {@see \AppUtils\FileHelper\FileFinder} class. * * @package Application Utils * @subpackage FileHelper * @see \AppUtils\FileHelper\FileFinder */ declare(strict_types = 1); namespace AppUtils\FileHelper; use AppUtils\FileHelper; use AppUtils\FileHelper_Exception; use AppUtils\Int...
import React, { createContext, useEffect } from "react"; import { Emulator } from '../emulator/emulator'; import useFile from "../hooks/useFile"; import { EventMap } from "../emulator/types"; export type LCD = { data: Uint8ClampedArray; width: number; height: number; } interface EmulatorContextType { emulator...
# Approach 1: BFS Traversal # Time: O(n) # Space: O(n) # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right import collections class Solution: def widthOfBinaryTree(self, ro...
import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:provider/provider.dart'; import 'package:pustok/pages/cart/add_to_cart_page.dart'; import 'package:pustok/providers/books_provider/books_provider.dart'; import 'package:pustok/providers/wishlist/wishlist_provi...
## Big Data Analytics team – Technical interview As part of interview with Mobile Eye, this is a task involves usage of S3, Athena, Glue, and python. ## Table of Contents - [Overview](#overview) - [Getting Started](#getting-started) - [Usage](#usage) - [AWS Links](#aws-links) - [Files and Structure](#files-and-stru...
import { Post } from "@/interfaces/posts.interface"; const API_URL = process.env.WORDPRESS_API_URL as string; export async function fetchApi( query: string, { variables }: { variables?: any } = {} ) { const headers = new Headers(); headers.append("Content-Type", "application/json"); headers.append("crossDom...
import { FormEvent, useContext, useEffect, useState } from "react" import { UserContext } from "../App" import TopicRoom from "./TopicRoom" import TopicsList from "./TopicsList" export type Topic = { _id: string title: string } const Home = () =>{ const { user, logout } = useContext(UserContext) const...
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <h:head> <title>Login</title> <!-- Bootstrap CDN Link/s --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="st...
# Building *Recommended Linux OS: Ubuntu 22.04.3 LTS* *Or use the docker method* ## If using docker method ### Step 1: First of you need the sourcecode to compile a UEFI Image. <br /> Clone the Repo by using: ``` git clone https://github.com/Robotix22/Mu-Qcom.git --recursive cd Mu-Qcom ``` You need to have `git` in...
<?php namespace App\Livewire; use GuzzleHttp\Client; use Illuminate\Support\Facades\Http; use Livewire\Component; use Livewire\WithFileUploads; use function Laravel\Prompts\error; use Barryvdh\Debugbar\Facades\Debugbar as FacadesDebugbar; class EditRequest extends Component { use WithFileUploads; public $i...
import * as fs from 'fs'; import * as path from 'path'; import * as os from 'os'; import { AmplifyGraphqlDefinition } from '../amplify-graphql-definition'; const TEST_SCHEMA = /* GraphQL */ ` type Todo @model { id: ID! content: String! } `; describe('AmplifyGraphqlDefinition', () => { describe('fromStri...
<script lang="ts"> import { createEventDispatcher } from "svelte"; import { trans } from "../text/translations"; import { auth } from "../auth"; import { sendJson } from "../requests/authRequests"; const dispatch = createEventDispatcher(); let name = ""; let email = ""; let password = ""; let confir...
<!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> <script src="../js/vue.js"></script> <script src="../js/dayjs.min.js"></scri...
""" Type annotations for wellarchitected service type definitions. [Open documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_wellarchitected/type_defs.html) Usage:: ```python from mypy_boto3_wellarchitected.type_defs import AdditionalResourcesTypeDef data: AdditionalResourcesTypeDef = {.....
using System; #if NETCORE using Microsoft.AspNetCore.Http; #endif #if NETFRAMEWORK using System.Web; #endif namespace QoDL.Toolkit.Module.EndpointControl.Models; /// <summary> /// Contains details about a request. /// </summary> public class EndpointControlEndpointRequestData { /// <summary> /// Time of the r...
package com.example.driver.controller; import com.example.driver.dto.DriverDTO; import com.example.driver.dto.DriverListDTO; import com.example.driver.service.DriverService; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.s...
#include "declare.h" /** * addNode - Add a new node to the start of the list. * * @head: A pointer to the address of the head node. * @str: The string to be stored in the new node. * @num: The index used by history. * Return: A pointer to the newly created node. */ list_t *addNode(list_t **head, const char *s...
#include <stddef.h> #include <stdbool.h> #include "cl_node.h" #ifndef CL_LINKED_LIST_H #define CL_LINKED_LIST_H /* // TODO: generic advance and retreat functions to allow customizable navigation with modifications for doubly linked adding NEXT attribute to LInkedList data structure LinkedList_set_NEXT(LinkedList * ll...
namespace Arinc424.Attributes; /// <summary> /// Specifies the range of a field within an ARINC-424 string. Must come before <see cref="FieldAttribute{TRecord}"/>. /// </summary> /// <inheritdoc/> [AttributeUsage(AttributeTargets.Property)] internal class FieldAttribute(int start, int end) : RangeAttribute(start, end)...
# hijacking main objective is privelige escalation. now first when we `ls` we get a blank output because our file is hidden, so we use `ls -al` and we find a python file called server.py that has root priviliges to edit only ``` picoctf@challenge:~$ ls -al -rw-r--r-- 1 root root 375 Mar 16 2023 .server.py ```...
package com.cookandroid.movie; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import java.util.List; public class MovieAdapter extends RecyclerView.Adap...
import * as React from 'react' import * as yup from 'yup' import { FormikHelpers } from 'formik' import { action } from '@storybook/addon-actions' import { text } from '@storybook/addon-knobs' import { Story, Meta } from '@storybook/react/types-6-0' import { image, internet, lorem } from 'faker' import Subreddit, { Va...
const { Order } = require("../models/Order"); const { OrderItem } = require("../models/Orderitem"); const User = require("../models/User"); exports.GetOrders = async (req, res) => { const orderList = await Order.find() .populate("user", "name") .sort({ dateOrdered: -1 }); if (!orderList) { res.status(...
import React, {useState} from 'react' function HookWithObject() { const [user, setUser] = useState({firstName: '', lastName: ''}) return ( <div> <h1>Form using Hooks</h1> <form> <div> <label>FirstName</label> <input type="text" ...
import mongoose, { isValidObjectId } from "mongoose" import { Video } from "../models/video.model.js" import { User } from "../models/user.model.js" import { ApiError } from "../utils/ApiError.js" import { ApiResponse } from "../utils/ApiResponse.js" import { asyncHandler } from "../utils/asyncHandler.js" import { dele...
<?php namespace App\Http\Controllers; use App\Models\Unit; use App\Models\User; use App\Models\Lokasi; use Illuminate\Http\Request; use Illuminate\Validation\ValidationException; use Illuminate\Database\QueryException; use Illuminate\Validation\Rule; class ManageUserController extends Controller { public functio...
#### RUN K SWEEP (SERVER) #### library(rliger) library(parallel) library(cluster) library(liger) library(stats) library(RANN) library(matrixStats) library(parallel) library(mixtools) library(rlist) ##### separate script ##### args=commandArgs(trailingOnly=T) cell_type=args[1] K.MIN=2 K.MAX=40 #conda activate R4.0LM...
use alloc::collections::BTreeMap; use core::fmt::{Debug, Formatter, Result}; use axerrno::{AxError, AxResult}; use axhal::paging::{PageSize, PagingIfImpl}; use axvm::{AxNestedPageTable, GuestPhysAddr, HostPhysAddr}; use memory_addr::{is_aligned_4k, VirtAddr, PAGE_SIZE_4K as PAGE_SIZE}; use page_table_entry::MappingFla...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> @import url(./assets/root.css); .search-container { height: 10vh; display: flex; justify-content: space-between; ...
import { createSlice } from '@reduxjs/toolkit'; const initialState = { items: [], totalQuantity: 0, totalPrice: 0, }; export const cartSlice = createSlice({ name: 'cart', initialState, reducers: { addItemToCart: (state, action) => { const { id, name, price, image } = action.payload...
import { Injectable } from '@angular/core'; import {Item} from '../model/item'; import {items} from '../model/items.json' import {Observable, of, throwError} from 'rxjs'; import {HttpClient, HttpRequest, HttpEvent} from '@angular/common/http'; @Injectable({ providedIn: 'root' }) export class ItemService { pri...
import time from copy import deepcopy from operator import attrgetter from functools import wraps import numpy as np import pandas as pd import torch import dgl import random import torch.nn.functional as F from ffreed.utils import lmap, dmap def log_time(method): @wraps(method) def wrapper(sac, *args, **kwa...
<!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> // function Robot(name, year, owner){ // thi...
package main import ( "context" _ "embed" "encoding/json" "fmt" "regexp" "strings" "time" "os" "os/signal" "syscall" "github.com/bwmarrin/discordgo" "github.com/cosmos/btcutil/bech32" cosmostypes "github.com/cosmos/cosmos-sdk/types" log "github.com/sirupsen/logrus" chain "github.com/umee-network/fonzi...