text stringlengths 184 4.48M |
|---|
import * as React from "react";
import * as Styled from "./NavbarStyles";
import * as types from "./NavbarTypes";
import { isAuth } from '../../redux/reducers/userReducer';
import { useSelector } from 'react-redux';
import NavbarUserData from './NavbarUserData';
const routes: types.RouteTypes = {
HOME: "/posts",
R... |
package com.example.duolingo.service.impl;
import com.example.duolingo.controller.payload.request.LoginDto;
import com.example.duolingo.controller.payload.request.RegisterDto;
import com.example.duolingo.domain.entities.User;
import com.example.duolingo.mapper.RegisterDtoToUser;
import com.example.duolingo.repository.... |
const express = require('express')
const path = require('path')
const http = require('http')
const Filter = require('bad-words')
const socketio = require('socket.io')
const moment = require('moment')
const{generateMessage, generateLocationMessage} = require('./utils/messages')
const{addUser, removeUser, getUser, getUse... |
//
// TutorDetail.swift
// Simple TableView App Swift UI
//
// Created by Jeffrey Almonte on 6/3/20.
// Copyright © 2020 Jeffrey Almonte. All rights reserved.
//
import SwiftUI
struct TutorDetail: View {
var name: String
var headline: String
var bio: String
var body: some View {
VStack {
... |
//
// LessonListViewModel.swift
// Nanuri
//
// Created by Park Gyurim on 2022/01/30.
//
import Foundation
import Combine
import Alamofire
final class LessonListViewModel : ObservableObject {
@Published var LessonList : [Lesson] = []
@Published var selectedLesson : Lesson = Lesson(
... |
package org.smartregister.fhir.structuremaptool
import ca.uhn.fhir.context.FhirContext
import ca.uhn.fhir.context.FhirVersionEnum
import org.apache.poi.ss.usermodel.Row
import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext
import org.hl7.fhir.r4.model.Enumeration
import org.hl7.fhir.r4.model.Questionnaire
import org.hl7.f... |
let numeroSecreto = gerarNumeroAleatorio();
let tentativas = 1;
function exibirTextoNaTela(tag, texto) {
let campo = document.querySelector(tag);
campo.innerHTML = texto;
};
function mensagemInicial() {
exibirTextoNaTela('h1', 'Jogo do Número Secreto');
exibirTextoNaTela('p', 'Escolha um número entre 1 e ... |
using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
namespace VRUIP
{
public class TextController : A_ColorController
{
// Settings.
[SerializeField] [Tooltip("If enabled, text will be empty on start and will be waiting for the function call to start typing.")]
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ver Reservas</title>
<!-- Incluye los estilos de Tailwind CSS utilizando una CDN -->
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.... |
import { motion } from "framer-motion";
import { useEffect, useState } from "react";
import { kataSemangat } from "../data/constant/PositiveWord";
export default function PositiveWordComponent() {
const [currentIndex, setCurrentIndex] = useState(0);
useEffect(() => {
const intervalId = setInterval(() => {
... |
import { Card, Col, Row } from "antd";
import { useContext } from "react";
import FavoritesContext from "../../context/favoritesCotext";
import { CiHeart } from "react-icons/ci";
import { Link } from "react-router-dom";
const { Meta } = Card;
const FavoritesPage = () => {
const { favs, setFavs } = useContext(Favorite... |
import React, { FC, ChangeEvent } from "react";
interface TextAreaProps {
id: string;
label: string;
value: string;
onChange: (event: ChangeEvent<HTMLTextAreaElement>) => void;
placeholder?: string;
rows?: number;
cols?: number;
required?: boolean;
}
const TextArea: FC<TextAreaProps> = ({
id,
labe... |
Me:
Generate a data model, incorporating what data needs to be stored and how it needs to be linked as Django file.
At a high level here are all the entities that you have:
Users (of type either instructor or students)
Courses (instructors teach these and students take these)
Lectures (particular days for each course... |
/* eslint-disable no-unused-expressions */
/* eslint-disable camelcase */
/* eslint-disable react-hooks/rules-of-hooks */
import { useState } from 'react';
import { useQueryClient } from 'react-query';
import {
Container,
ContentContainer,
FooterContainer
} from './styles';
import ActionHeader from '../../compon... |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Theatre.Data.Models.Enums;
namespace Theatre.Data.Models
{
public class Play
{
public Play()
{
this.Casts = new ... |
<?php
//Início: Classe usuário
class Usuario {
private $idusuario;
private $deslogin;
private $dessenha;
private $dtcadastro;
//Get's and Set's idUsuario
public function getIdusuario(){return $this->idusuario;}
public function setIdusuario($value){$this->idusuario = $value;}
//Get's and Set's desLogin
pub... |
#pragma warning(disable : 4996)
#pragma once
#define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING
#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
#include <thread>
#include <condition_variable>
#include <iterator>
#include <functional>
#include <vector>
#include <queue>
#include <mutex>
#include <future>
#inc... |
'use client'
import { Repository, RepositoryArray } from '@/app/interfaces/Interfaces';
import React, { ReactNode, useEffect, useState, createContext, useContext } from 'react';
export const dataContext = createContext<RepositoryArray| undefined>(undefined);
export const DataContextProvider = ({ children } : {childr... |
---
import SearchWidget from './SearchWidget.astro';
import Search from './SearchWidget.astro';
---
<nav id="navbar">
<div
class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<a href="/" class="flex items-center">
<img
src="https://res.cloudinary.com/dgakih33l/image... |
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import sinon from 'sinon';
module('Unit | Service | console', function (hooks) {
setupTest(hooks);
hooks.beforeEach(function () {});
hooks.afterEach(functi... |
---
id: 660f47afe4c98536715d5fa4
title: Step 91
challengeType: 1
dashedName: step-91
---
# --description--
<dfn>严格不等式</dfn>运算符 `!==` 允许你检查两个值是否不相等,或者是否不具有相同的类型。 语法类似于相等运算符:`value !== 4`。
更新 `while` 循环条件以检查 `done` 是否不等于 `count`。
# --hints--
你的 `while` 循环应检查 `done` 和 `count` 是否不相等。
```js
assert.match(__helpers.remo... |
package Javaders.Javaders.day25varargsinheritance;
import com.sun.security.jgss.GSSUtil;
public class Vehicle {
/* 1) Javada Object Class tum java classlarinin ortak parentidir
2) Javada Object Class haric tum classlarin parent i vardir.
3) Javada Parent tan child a olan iliskilere HAS A Relation Sh... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlcat.c :+: :+: :+: ... |
# Examples for UAT Testing
User Acceptance Testing (UAT) focuses on validating that the system meets the business requirements and is ready for use by end-users.
## UAT Test Cases:
1. ### User Authentication:
Objective: Ensure users can successfully log in.
<br>Test Steps:
- Navigate to the login page.
-... |
"use client";
import Button from "@/app/components/Button";
import Input from "@/app/components/input/Input";
import Modal from "@/app/components/Modal";
import Select from "@/app/components/input/Select";
import { User } from "@prisma/client";
import axios from "axios";
import { useRouter } from "next/navigation";
im... |
using JokesApp.DataLayer;
using JokesApp.Shared.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions... |
#pragma once
#include "Observable.h"
#include "Point.h"
#include "Target.h"
using net::draconia::util::Observable;
namespace net
{
namespace draconia
{
namespace games
{
namespace bane
{
namespace model
{
class Charac... |
import React from 'react';
import '../style/SignUp.css';
import {useNavigate} from "react-router-dom";
import logo from "../icons/MovieTube-logo.png";
import { auth } from'../utils/firebase-config';
import { useForm, SubmitHandler } from "react-hook-form";
import { createUserWithEmailAndPassword } from 'firebase/auth';... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.i... |
$(function () {
// Prepare demo data
var data = [
{
"hc-key": "us-ky-01",
"value": 0
},
{
"hc-key": "us-ky-03",
"value": 1
},
{
"hc-key": "us-ky-05",
"value": 2
},
{
"hc-k... |
import Stack from "@mui/material/Stack";
import TextField from "@mui/material/TextField";
import Styles from "./AddressModal.module.css";
import MenuItem from "@mui/material/MenuItem";
import Radio from "@mui/material/Radio";
import RadioGroup from "@mui/material/RadioGroup";
import FormControlLabel from "@mui/material... |
<?php
namespace Bytes\DiscordCommandsBundle\Commands;
use Bytes\DiscordClientBundle\Slash\SlashCommandInterface;
use Bytes\DiscordResponseBundle\Enums\ApplicationCommandOptionType as ACOT;
use Bytes\DiscordResponseBundle\Enums\Permissions;
use Bytes\DiscordResponseBundle\Objects\Application\Command\ChatInputCommand... |
#include "procgen/PlanetGenerator.h"
// Generates all the resources necessary to render the planet
// - vertex attributes
// - later on materials ??
void PlanetGenerator::generatePlanetData(
std::vector<VertexAttributes> &vertexData,
std::vector<uint32_t> &indices,
GUISettings settings) {
// settings o... |
import { Field, InputType, PartialType } from '@nestjs/graphql';
import { StatusShop } from '../entities/shop.entity';
import { CreateShopInput } from './create-shop.input';
@InputType({ description: 'Datos para actualizar la tienda' })
export class UpdateShopInput extends PartialType(CreateShopInput) {
@Field(() =>... |
import Git, { TreeEntry } from 'nodegit';
import indexFiles from '../utils/indexFiles';
// import validateRepo from '../utils/validateRepo';
import { Arguments } from 'yargs';
import { cacheData } from '../utils/config';
import { isLoggedIn } from '../utils/authToken';
import { getGitRepo, getBranchFromRef } from '../u... |
package com.wt.algorithm.leetCode;
import java.util.*;
import java.util.stream.Collectors;
public class LeetCode {
/**
* 有多少小于当前数字的数字
*
* @param nums
* @return
*/
public int[] smallerNumbersThanCurrent(int[] nums) {
int[] numsCount = new int[nums.length];
for (int i = ... |
package com.cz.enrol.configure;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import com.cz.... |
import React from "react";
import Header from "../components/landing_page/Header";
import BlocDemo from "../components/landing_page/BlocDemo";
import Features from "../components/landing_page/Features";
import VidoSec from "../components/landing_page/VideoSec";
import Bottom from "../components/landing_page/Bottom";
c... |
# Information Disclosure 🕵️
Information Disclousure, ou traduzindo diretamente para o português Divulgação e Informação, é uma vulnerabilidade encontrada predominantemente em aplicações WEB e consiste no vazamento de informações confidenciais do sistema.
Os danos causados por esta vulnerabilidade são diversos , já q... |
<script setup lang="ts">
import CardProduct from "@/components/CardProduct.vue";
import { onMounted, ref, watch } from "vue";
interface Product {
_id: string;
title: string;
description: string;
picture: string;
category: string;
}
const allProducts = ref<Product[]>([]);
const filteredProducts = ref<Product... |
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:UShealthcare/apps/common/bottom_button_view.dart';
import 'package:UShealthcare/apps/view/address/add_address_page/add_address_page.dart';
import 'package:UShealthcare/apps/view/my_order/order_successful_page.dart';
import 'package:UShealthca... |
{% extends "layout.html" %}
{% block content %}
<div class="content-section col-xs-12 col-sm-12 col-md-9 col-lg-6 col-xl-4 container-fluid padding">
<form action="" method="POST" novalidate>
{{ form.hidden_tag()}}
<fieldset class="form.group">
<le... |
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Blogeasy
*/
?>
<!doctype html>
<html <?php language_attributes(... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.box1{
height:200px;
background-color: #ccc;
position: relative;
padding:5px;
}
.box2{
width: 100px;
height: 100px;
... |
// SCSS variables are information about icon's compiled state, stored under its original file name
//
// .icon-home {
// width: $icon-home-width;
// }
//
// The large array-like variables contain all information about a single icon
// $icon-home: x y offset_x offset_y width height total_width total_height image_path;... |
package com.byd.dct.iddm.common.swagger.config;
import com.byd.dct.iddm.common.swagger.annotation.EnableIddmDoc;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ImportBeanDefin... |
import { AnimatePresence, motion } from "framer-motion";
import { FC, useState } from "react";
import { FaRocket } from "react-icons/fa";
import AppTemplate, { Splitter } from "../../components/AppTemplate";
import { IPageElement } from "../../components/Pages";
import { post } from "../../lib/post";
import { useCore }... |
<?php declare(strict_types=1);
/*
* This file is part of sebastian/type.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SebastianBergmann\Type;
use function strtolower;
... |
import { FC, ReactNode } from 'react'
import { QueryClient, QueryClientProvider } from 'react-query'
import { Provider } from 'react-redux'
import { Layout } from '../components/layout/Layout'
import { ReduxToast } from './ReduxToast'
import { store } from '../store/store'
import { HeadProvider } from './HeaderProvide... |
import React from 'react'
import { formatDistanceToNow } from 'date-fns'
import PropTypes from 'prop-types'
import {NewTaskForm} from '../NewTaskForm'
export default class Task extends React.Component {
static defaultProps = {
label: 'Your text',
date: new Date(),
onDestroyed: () => {},
onToggleDone:... |
# <img width=28 style="margin-bottom: -2px" src="https://github.githubassets.com/favicons/favicon.png"> GitHub Widescreen 🖥️ [](https://twitter.com/intent/tweet?text=Hide%20the%20annoying%20sidebars%20from%20new%20GitHub%20UI%20with%20this%2... |
"""
Base adapter test class that can be reused across all adapters
"""
from typing import cast
import textwrap
from select import select
from sqlglot import select
from sqlglot.expressions import Identifier, Select, alias_
from featurebyte import AggFunc
from featurebyte.enum import DBVarType
from featurebyte.query... |
STIA1113
Quiz 1
1. In the Java programming language, all source code is first written in plain text files ending with the ______ extension.
a..javac
b..java
c..class
d..txt
Answer: ____b__
2. The Java compiler generates
a.machine code
b.source code
c.byte code
d.HTML
Answer: __c____
3. JVM stands for
a.Java Var... |
const mongoose = require("mongoose");
const validator = require("validator");
// const validator = require("mongoose-validator");
const bcrypt = require("bcryptjs");
const jwt = require("jsonwebtoken");
const crypto = require("crypto");
const userSchema = new mongoose.Schema({
name: {
type: String,
required:... |
import { useAuth } from "../../hooks/auth"
// o Context específico que se pretende utilizar
import { useState } from "react"
// pra criar estados que armazenam infos. (no caso, o "email" e "password" digitados nos inputs)
import { FiLogIn, FiMail, FiLock } from "react-icons/fi"
import { Link } from "react-router-... |
<!DOCTYPE html>
<html lang="en">
<head>
<title>HappyBio</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="styles.css... |
1. Create a project ASP.NET platform Windows, target Web
{ASP.NET Core Web Application => Web Application (Model-View-Controller)}
Authentification : change : Individual User Accounts
2. Make a changes in Views/Home/Index.cshtml as you want
3. Add a class in Models folder e.g. Joke.cs
add properties ( prop + 2 x T... |
import { window } from "vscode";
import { TokenCredential } from "@azure/identity";
import {
AzureResource,
Subscription,
CosmosAccount,
CosmosDatabase,
CosmosContainer,
AzureResourceProvider
} from "../provider/azure-resource-tree-provider";
const SUBSCRIPTION_CHECK_MESSAGE: string = "... |
import { json } from '@sveltejs/kit';
import { parse } from 'node-html-parser';
export async function GET({ params }) {
const api = `https://github.com/users/${params.user}/contributions?from=${params.year}-12-01&to=${params.year}-12-31`;
const res = await fetch(api);
if (!res.ok) {
throw new Error(`Failed to fet... |
import React, { useState } from 'react';
import { StyleSheet, Text, View, Image, FlatList, TextInput, ScrollView, Dimensions, TouchableOpacity } from 'react-native';
import { FontAwesome, Feather } from '@expo/vector-icons'; // Importe os ícones desejados
const data = [
{
id: '1',
username: 'Filipe Deschamps... |
import 'dart:convert';
DetailAproval detailAprovalFromJson(String str) =>
DetailAproval.fromJson(json.decode(str));
String detailAprovalToJson(DetailAproval data) => json.encode(data.toJson());
class DetailAproval {
DetailAproval({
this.data,
this.pesan,
this.status,
});
Data? data;
String? ... |
<?php
namespace MDMasudSikdar\Geezsms\Tests;
use GuzzleHttp\Client;
use MDMasudSikdar\Geezsms\GeezSmsClient;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\TestCase;
class GeezSmsClientTest extends TestCase
{
private GeezSmsClient $smsClient;
/**
* Set up the GeezSmsClient instance f... |
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Mandriva Linux Security Advisory MDVSA-2015:133.
# The text itself is copyright (C) Mandriva S.A.
#
include("compat.inc");
if (description)
{
script_id(82386);
script_version("$Revision: 1.1 ... |
JIRA.VersionModel = JIRA.RestfulTable.EntryModel.extend({
// rest resources
RELATED_ISSUES_PATH: "/relatedIssueCounts",
UNRESOLVED_ISSUES_PATH: "/unresolvedIssueCount",
addExpand: function (changed) {
changed.expand = "operations";
},
/**
* Destroys the model on the server. We nee... |
import { v4 } from "uuid";
import { OrmType } from "../db/orm";
import { generateMnemonic } from "bip39";
import { Room } from "~/common/types";
import { cardRepo } from "./card-repo";
export const roomRepo = (orm: OrmType) => {
const format = (room: any) => {
if (!room) { return null; }
const cards = JSON.... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="./vue.js"></script>
<title>Vue.js</title>
</head>
<body>
<!--
1) Você possui o nome e sobrenome do usuá... |
import WpApiClient, { DefaultEndpoint } from 'wordpress-api-client'
import {
FeaturedMedia,
ModelPostType,
PageSlugsByTemplate,
ProductPostType,
RepPostType,
SeriesPostType,
StatePostType,
WordPressImage,
WordPressMenu
} from './types'
const HEADER_DESKTOP_MENU_PATH = 'wp-api-menus/v2/menus/7'
const ... |
.output "clock.go"
.ignorecase = 0
package clockgsl
import (
"time"
"fmt"
"math"
)
type supplier interface {
FractionOfDayPassed() float64
}
func floatingModulo(fractionOfDayPassed float64, resetFraction float64) float64 {
division := math.Floor(fractionOfDayPassed / resetFraction )
return (fractionOfDayPass... |
import { Injectable } from '@angular/core';
import {
HttpClient,
HttpErrorResponse,
} from '@angular/common/http';
import { BehaviorSubject, Observable, map, catchError, throwError } from 'rxjs';
import { PathRest } from '../enviroments/path-rest';
import { endpoint } from '../enviroments/endpoints';
import { JwtHe... |
import FontAwesome from "@expo/vector-icons/FontAwesome"
import Ionicons from "@expo/vector-icons/Ionicons"
import { Link, Tabs } from "expo-router"
import { Pressable, useColorScheme } from "react-native"
import Colors from "../../constants/Colors"
import { Strings } from "../../constants/Strings"
/**
* You can expl... |
// import replaceTemplate from "./modules/replaceTemplate";
const fs = require('fs')
const http = require('http')
const url = require('url')
const slugify = require('slugify')
const replaceTemplate = require('./modules/replaceTemplate')
// Files
// // Blocking, synchronous
//
// const textIn = fs.readFileSync('./t... |
/**
* Copyright 2008 The University of North Carolina at Chapel Hill
*
* 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... |
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="jakarta.tags.core" prefix="c"%>
<%@ taglib prefix="fmt" uri="jakarta.tags.fmt"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/... |
import {createAction, props} from '@ngrx/store';
import {Product} from './product.model';
import {HttpErrorResponse} from "@angular/common/http";
import {Update} from "@ngrx/entity";
export const loadProducts = createAction(
'[Product/API] Load Products',
);
export const loadProductsSuccess = createAction(
'[Pro... |
import './style.scss';
import { useMemo } from 'react';
import { useLocation } from 'react-router';
import { useI18nContext } from '../../../../i18n/i18n-react';
import SvgDefguadNavLogoCollapsed from '../../../../shared/components/svg/DefguadNavLogoCollapsed';
import SvgIconNavHamburger from '../../../../shared/comp... |
<link rel='stylesheet' href='../style.css'>
<script src='../script.js'></script>
<h1>NAME</h1>
<p>pam-auth-update - manage PAM configuration using packaged
profiles</p>
<h1>SYNOPSIS</h1>
<p><strong>pam-auth-update</strong> [<strong>--package</strong>
[<strong>--remove</strong> <em>profile</em> [<em>profile...</em>]]]
[... |
//
// VocabularyBoxTableViewCell.swift
// Cool Eng
//
// Created by Ivan Chernetskiy on 05.06.2020.
// Copyright © 2020 Ivan Chernetskiy. All rights reserved.
//
import UIKit
import AVFoundation
class VocabularyBoxTableViewCell: UITableViewCell {
@IBOutlet weak var originalWord: UILabel!
@IBOutlet w... |
Quick introduction to web development.
Separation of Concerns: separate styling (CSS) from rendering (HTML) and logic (javaScript) into at least three separate files.
Progressive Enhancement: The latest and greatest is delivered to those who have the latest technologies installed and can view it, but a simpler versio... |
import { Component, OnInit } from "@angular/core";
import { Router } from "@angular/router";
import { CommonService } from "src/service/commonservice";
import { SocialSharing } from "@ionic-native/social-sharing/ngx";
import { Clipboard } from "@ionic-native/clipboard/ngx";
import {
AlertController,
ActionSheetCon... |
'use client';
import UpdateButton from '@/components/UpdateButton';
import { Flex, Heading } from '@radix-ui/themes';
import { useParams, useRouter } from 'next/navigation';
import AnecdotalNotes from '@/components/AnecdotalNotes';
import { useStudent } from '@/hooks/useStudent';
const StudentPage = () => {
const... |
#ifndef NETWORK_H
#define NETWORK_H
#include <string>
#include "utils.h"
namespace tk { namespace dnn {
/**
Data representation between layers
n = batch size
c = channels
h = height (lines)
w = width (rows)
l = length (3rd dimension)
*/
struct dataDim_t {
int n, c, h, w, l;
dataDim... |
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href=".\style.css">
<script src=".\d3.v3.js"></script>
</head>
<body>
<div id="scatterPlot" >
</div>
<script type="text/javascript">
async function timed() {
... |
import React, { useState, useContext } from "react";
import { useNavigate, useParams } from "react-router-dom";
import { AuthContext } from "../context/auth-context";
const Item = () => {
const [tag, setTag] = useState("");
const [description, setDescription] = useState("");
const [lastSeenLocation, setLastSeen... |
## RabbitMQ基本知识
### RabbitMQ几个基本名词:
- 消息:有效载荷(payload)+标签(label)
- 有效载荷:就是想要传输的数据
- 标签:可以用来表述这条消息(一个交换器的名称和可选的主题标记)【不会传输给消费者】
- 消费者:消息队列中消费消息
- 生产者:消息队列中生成消息
- 代理:代理服务器(即MQ) 起到一个路由作用
- 交换器:【消息投递到队列前,通过绑定在交换器上确定的规则(路由键)后将他们投递到对应的队列中】
- 队列:消息最终到达的地方,并且给消费者接收的地方
- 绑定:规则(路由键)绑定到交换机上
- 虚拟主机(vhost):一个消息队列可以创建多个虚拟主机(虚拟主机之间... |
"""
Search index (main) view.
URLs include:
/
"""
import threading
import heapq
import search
import requests
import flask
@search.app.route('/', methods=['GET'])
def get_results():
"""Docstring for app route."""
# print("entered get results")
# parse parameters
query = flask.request.args.get("q")
... |
import React, { useState } from "react";
import { View, Text, TouchableOpacity, Image, StyleSheet, ImageBackground } from "react-native";
const questions = [
{
id: 1,
name: "octopus",
image: require("../assets/images/quizimages/octopus.png"),
options: ["o", "b", "d"],
correctOption: "... |
package com.ohgiraffers.section03.overriding;
public class SubClass extends SuperClass{
/*설명 0. 부모 메소드와 이름, 반환형, 매개변수, 접근 제어자 모두 동일한 경우에 오버라이딩 성립*/
// @Override
// public void method(int num) {}
/*설명 1. 메소드 이름 변경(에러 발생)*/
// @Override
// public void method1(int num) {}
/*설명 2. 메소드 리턴 타입 변경(에러... |
import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';
import {CrudService} from '../../crud.service';
import {MatSnackBar} from '@angular/material';
import {AuthService} from '../../auth.service';
import {Subscription} from 'rxjs';
@Component({
selector: 'app-basket-order-item',
... |
import { createSlice } from "@reduxjs/toolkit";
import type { PayloadAction } from "@reduxjs/toolkit";
import { menuBaguettes } from "./products";
interface Baguette {
name: string;
description: string;
ingredients: string[];
cost: number;
img: string;
stock: number;
isTopSell: boolean;
id: number;
}
i... |
/*
* SPDX-FileCopyrightText: 2019 Anna Medonosova <anna.medonosova@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KISMIRRORAXISCONFIG_H
#define KISMIRRORAXISCONFIG_H
#include <QScopedPointer>
#include "kritaui_export.h"
#include <boost/operators.hpp>
class QDomElement;
class QDomDocument... |
<?php
/**
* The template for displaying product category thumbnails within loops
*
* This template can be overridden by copying it to yourtheme/woocommerce/content-product-cat.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new fil... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>La Hot Fast Food</title>
<!-- Link for the icon -->
<link rel="icon" href="images/egusi 2.png">
<!-- Google Fonts API -->
<style>
@import url('https://fonts.go... |
package com.example.FileWizard.controller;
import com.example.FileWizard.model.User;
import com.example.FileWizard.model.UserFile;
import com.example.FileWizard.service.FileService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.anno... |
use actix_identity::Identity;
use actix_web::{web, Responder, Result};
use chrono::{DateTime, Days, Utc};
use lettre::message::header::ContentType;
use log::error;
use surrealdb::sql::Thing;
use super::response::Response;
use crate::{
mail::{
mailing::{build_mail, send_mail}, utils::{load_template, Mailer}... |
from queue import PriorityQueue
class Problem:
"""Transportation problem.
Args:
sources (int): Number of sources.
destinations (int): Number of destinations.
costs (list[list[int]]): Costs of transportation from source to destination.
supply (list[int]): Supply of each source.... |
my_set = set()
my_other_set = {}
print(type(my_set))
print(type(my_other_set))
my_other_set = {"Lua", "Cuello", 23}
print(type(my_other_set))
my_other_set.add("Luana")
print(my_other_set)
print("Luana" in my_other_set)
print("Luani" in my_other_set)
my_other_set.clear()
print(len(my_other_set))
my_set = {"Lua", "... |
Basic Input Output System (BIOS)
- older version
- only supports 32-bit processors and motherboards
- program that a CPU uses to start the computer system after being turned on
- method for configuring the motherboard using a text-based interface
- stored as firmware on the motherboard
- Power-on self-test
- test a... |
#ifndef __THREAD_THREAD_H
#define __THREAD_THREAD_H
#include "stdint.h"
#include "kernel/list.h"
#include "memory.h"
#include "kernel/bitmap.h"
#define TASK_NAME_LEN 16
#define MAX_FILES_OPEN_PER_PROC 8
/* 用来指定在线程中运行的函数类型 */
typedef void thread_func(void*);
typedef int16_t pid_t;
/* 进程或线程的状态, 区别在于是否拥有页表 */
enum t... |
class ItemsController < ApplicationController
before_action :set_item, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!, only: [:new, :edit, :destroy]
def index
@items = Item.order(created_at: :desc)
end
def new
@item = Item.new
end
def create
@item = Item... |
from django.http import HttpResponse, JsonResponse
from django.shortcuts import render, get_object_or_404
from django.urls import reverse
from places.models import PlaceName
def serialize_post(location):
redirect_url = reverse('get_details_json', args=[location.pk])
return {
"type": "Feature",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.