text stringlengths 184 4.48M |
|---|
# Copyright 2021-2023 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { RegulatoryReportingFilingService } from '../services/regulatory-reporting-filing.service';
import { RegulatoryReportingFilingComponent } from './regulatory-... |
import React from 'react';
import {NavLink} from 'react-router-dom';
import styles from './Header.module.css';
import {connect} from 'react-redux';
import {authLogOut} from '../../actions/users';
import {history} from '../../utils/history';
const Header = (props) => {
const logOut = () => {
props.authLogO... |
import 'package:flutter/material.dart';
import 'package:greentrack/Screens/main/main_screen.dart';
import 'package:nb_utils/nb_utils.dart';
import '../../../components/already_have_an_account_acheck.dart';
import '../../../components/button.dart';
import '../../../constants.dart';
import '../../Signup/signup_screen.da... |
import { fireEvent, render, screen } from "@testing-library/react";
import { describe, vi } from "vitest";
import Button from "../../components/Button";
describe("Render the button and trigger the onclick event", () => {
const onClick = vi.fn();
test("Render the button ", async () => {
render(<Button onClick... |
<%@page language="java" contentType="text/html; charset=utf-8"%>
<%String rootPath=request.getContextPath();
String panelId=request.getParameter("panelId");
%>
<script type="text/javascript">
/*!
* Ext JS Library 3.1.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com... |
import dash
from dash import dcc, html
from dash.dependencies import Input, Output, State
from flask import request
from main import main_
app = dash.Dash(__name__)
server = app.server
app.layout = html.Div([
html.H1("Text Similarity Calculator"),
html.Div([
html.Label("Text 1 "),
dcc.Input(i... |
//
// JNS_StatusItemController.h
// MenuApp
//
// Created by Jonathan Nathan, JNSoftware LLC on 1/12/11.
// Copyright 2011 JNSoftware LLC. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to ... |
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:idute_app/components/constants/colors.dart';
import 'package:idute_app/components/constants/size_config.dart';
import 'package:idute_app/components/widgets/normal_text_widget.dart';
class ShareBottomSheet extends Sta... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';
import { CityComponent } from './city/city.component';
import { CityFormComponent } from './city-form/city-fo... |
package com.example.travelplanner;
import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.view.LayoutInflater;
import ... |
//
// RandomColorChar.swift
// modal
//
// Created by Patrick Fuller on 3/8/22.
//
import Foundation
import SwiftUI
class RandomColorChar: ObservableObject {
@Published var randomRed: CGFloat = 0
@Published var randomGreen: CGFloat = 0
@Published var randomBlue: CGFloat = 0
@Published var rand... |
import React, { useState } from 'react'
import "./style.css"
import Menu from "./menuApi"
import MenuCard from './MenuCard'
import Navbar from './Navbar'
const uniqueList =[
... new Set(
Menu.map((currElem)=>{
return currElem.category
})
), "All"
]
console.log(uniqueList)
const Restaurant = () => {
const [men... |
using System.Collections.Generic;
using Telegram.Bot.Types.ReplyMarkups;
using TelegramBot.Commands;
namespace TelegramBot
{
/// <summary>
/// Класс анализатор команд.
/// </summary>
public class CommandParser
{
/// <summary>
/// Список объектов команд бота.
/// </summary>
... |
<!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>
<h1>Lectura de JSON simple</h1>
... |
<script setup>
import { ref } from 'vue'
defineProps({
languages: {
type: Object,
required: true,
},
})
const isOpen = ref([])
function toggleAccordion(index) {
if (isOpen.value.includes(index)) {
isOpen.value = isOpen.value.filter((i) => i !== index)
return
}
isOpen.value.push(index)
}
</s... |
import pandas as pd
import sqlalchemy
import threading
from sqlalchemy import inspect
from sqlalchemy import text
from backtest_engine.database.borsdata.constants import API_KEY
from backtest_engine.database.borsdata.borsdata_client import BorsdataClient
from backtest_engine.database.borsdata.borsdata_api import Bors... |
package com.shcoding.routes
import com.shcoding.domain.repository.HeroRepository
import com.shcoding.domain.util.ServerResponse
import com.shcoding.routes.util.EndPoints
import io.ktor.http.*
import io.ktor.server.application.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
import org.koin.ktor.ext.i... |
import {
Body,
Controller,
Delete,
ForbiddenException,
Get,
Patch,
Post,
UseGuards,
} from '@nestjs/common';
import { JwtAuthGuard } from 'src/auth/guards/jwt-auth-guard';
import { PageRolesGuard } from 'src/page/guards/page-roles.guard';
import { GetTodo } from 'src/todo/get-todo.decorator';
import { T... |
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PWA web2-lab5</title>
<link rel="manifest" href="./manifest.json" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
crossorigin="anonymous">
<lin... |
import invariant from 'tiny-invariant';
import { BaseCurrency } from './base-currency';
import { Currency } from './currency';
import { Address } from 'viem';
import { checkValidAddress, validateAndParseAddress } from '../utils/validate-and-parse-address';
export interface SerializedToken {
chainId: number;
ad... |
import type { Metadata } from "next";
import { GeistSans } from "geist/font/sans";
import "./globals.css";
export const metadata: Metadata = {
metadataBase: new URL("https://ahmedshahlassicenter.vercel.app"),
title: "Ahmed Shah Lassi Center",
description:
"Tabdeeli ke Zaiqe, Shake ki Baat - Har Sip mein Chhu... |
#include "PicturaPCH.h"
#include "Console.h"
namespace Pictura
{
Mutex Console::m_ConsoleMutex;
bool Console::Initialized;
Console::Console()
{
}
Console::~Console()
{
}
bool Console::Init()
{
if (Initialized) { return true; }
#ifdef PLATFORM_WINDOWS
Initialized = CreateNewConsole(1024);
return In... |
import { createHash } from 'crypto';
/**
* Récupère les données de l'endpoint en utilisant les identifiants
* particuliers developer.marvels.com
* @param url l'end-point
* @return {Promise<json>}
*/
export const getData = async (url) => {
const publicKey = "561ece8f131e029a49cfc0bf7db1672e";
const private... |
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Login } from '../Models/login';
import { Register } from '../Models/register';
import { Observable, throwError, Subject } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { environm... |
import ChatBody from "components/ChatBody";
import Contact from "components/Contact";
import Head from "next/head";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import { getUserName, socket } from "socket";
import { User } from "types";
function Chatroom() {
if (!socket.user)... |
import getRandomId, { ID } from "src/utils/getRandomId";
export class WeightCollection {
_id: ID;
_weights: Weight[];
_goal: number;
_duration: Duration;
constructor(weights: Weight[] = [], id = getRandomId(), goal = 0, duration = { months: 0, weeks: 0, days: 0, hours: 0, minutes: 0, seconds: 0 }) {
thi... |
<?php
use PHPUnit\Framework\TestCase;
use function PHPUnit\Framework\assertEquals;
class RegexTest extends TestCase
{
public function testRegexRoute(): void
{
$routePath = "/home/detail/{id}";
preg_match_all('/\{(.*?)\}/', $routePath, $match);
assertEquals($match[1], ['id']);
}
... |
#!/usr/bin/env -S deno run -A
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { $, Repo } from "./deps.ts";
import { Repos } from "./repos.ts";
const repos = await Repos.load();
const denoRepo = repos.get("deno");
const deno_ast = repos.getCrate("deno_ast");
const nonDenoRepos = repo... |
#!/usr/bin/python3
"""
This class represents.
"""
class Square:
"""
This class represents.
"""
def __init__(self, size=0, position=(0, 0)):
"""
Initializes a new square with a given size and position.
"""
self.size = size
self.position = position
@prope... |
#Name: Robert King
#Prog Purpose: This program computes grades for students using a
# Python LIST of data in Python DICTIONARIES (as student records)
# Each student has 3 graded items: Homework, Midterm exam, and Final exam.
# Each item is worth 100 points.
# The student's final grade is the average of the thre... |
import React, { useCallback, useEffect, useState } from "react";
import { Button, Modal } from "react-bootstrap";
import { getFoodContract, acceptFoodContract } from "../../utils/foodshare";
const AcceptContract = ({ contractId, receiverId }) => {
const [contract, setContract] = useState({});
const { postId, donor... |
import React, { memo } from 'react';
import { Switch, Route } from 'react-router-dom';
import { NotAuthGuard } from '../guards/NotAuthGuard/index';
import { SplitView } from '../../layouts/SplitView/index';
import { NotFoundPage } from '../../pages/NotFoundPage/index';
import { Signup } from '../../pages/auth/Signup/L... |
// Import required libraries
const express = require('express');
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const mongoose = require('mongoose');
const passport = require('passport');
const GoogleStrategy = require('passport-google-oauth20').Strategy;
// Initialize Express app
const app = e... |
class Solution:
"""
Can use a map to quickly switch the value that we are comparing to. Need to
check both for when starting with 1 and starting with 0.
Time: O(n)
Space: O(1)
"""
def minOperations(self, s: str) -> int:
mapp = {"1": "0", "0": "1"}
def changes(val):
... |
import React from 'react'
import { shell } from 'electron'
import { getThemeInput, getThemePrimary } from '../../utils/index'
const { dialog } = require('electron').remote
const { app } = window.require('electron').remote
export class SettingsModal extends React.Component {
constructor (props) {
super(props)
... |
import matrix as mx
def _bfs(maze, path=""):
for x, pos in enumerate(maze[0]):
print(f'{x, pos = }')
if pos == 'O':
start = x
break
else:
raise ValueError('coulf not find "O" in the first row')
def find_maze_start(maze, start_char='S'):
R, C = len(maze), len... |
const nodemailer = require('nodemailer')
const { google } = require('googleapis')
const OAuth2 = google.auth.OAuth2
const getTransporter = () => {
const oauth2Client = new OAuth2(
process.env.GMAIL_CLIENT_ID,
process.env.GMAIL_CLIENT_SECRET,
'https://developers.google.com/oauthplayground' /... |
class Team
#インスタンス変数の作成
attr_accessor :name, :win, :lose, :draw
def initialize(name, win, lose, draw)
self.name = name
self.win = win
self.lose = lose
self.draw = draw
end
#勝率の計算
def calc_win_rate
win_rate = self.win.to_f / (self.win.to_f + self.lose.to_f)
end
#勝率の表示
de... |
<div class="container">
<h3>Angular2 Forms</h3>
<form novalidate autocomplete="off" #f="ngForm">
<div class="form-group">
<label for="empNo">Employee No.</label>
<input type="text" class="form-control" name="empNo" [(ngModel)]="empNo" required minlength="3">
</div>
<div cl... |
package com.github.shepherdxie.jocker.executor;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.shepherdxie.jocker.ResponseReader;
import com.github.shepherdxie.utils.FileUtil;
import com.github.shepherdxie.utils.HttpsUtils;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Resp... |
package com.example.giphy.gif.data.local.storage
import androidx.paging.PagingSource
import androidx.room.Dao
import androidx.room.Query
import androidx.room.Transaction
import androidx.room.Upsert
import com.example.giphy.gif.data.local.models.GifLocalModel
@Dao
interface GifsDao {
@Upsert
suspend fun upser... |
package ru.kozlovv.MyFirstTest1AppSpringBoot.hello;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
impor... |
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions ... |
package lab5.client.commands;
import java.io.IOException;
import lab5.client.exceptions.IncorrectDataOfFileException;
import lab5.client.utility.AskMarine;
import lab5.client.utility.IOManager;
import lab5.client.utility.SpaceMarineCollection;
/**
* Command 'remove_lower'. Removes elements lower than user entered.... |
"use client";
import { getBalanceStats } from "@/actions/user/get";
import SkeletonWrapper from "@/components/SkeletonWrapper";
import { Card } from "@/components/ui/card";
import { dateToUTCDate, formatter } from "@/lib/constants";
import { cn } from "@/lib/utils";
import { TOverviewSchema } from "@/lib/zodSchema";
i... |
import React, { useState, useEffect } from 'react';
const ApiDataExample = () => {
const [data, setData] = useState([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
const fetchData = async () => {
try {
// Set loading state to tru... |
//
// ViewController.swift
// AutoLayoutStarter
//
// Created by Derrick Park on 2019-04-17.
// Copyright © 2019 Derrick Park. All rights reserved.
//
import UIKit
// custom hex color
extension UIColor {
convenience init(red: Int, green: Int, blue: Int) {
assert(red >= 0 && red <= 233, "Invalid red co... |
# Information
This is a simple blog project made with react.js php and mysql
Go to the bottom to see how to run manually [without docker](#without-docker)
# The repo is a monorepo containing front-end at the root and backend in the /backend folder
# To run the project
# * Check the line endings in /backend/db_migra... |
import React, { useState } from "react";
export const cartContext = React.createContext();
export const CartContextProvider = ({ children }) => {
const [totalAmount, setTotalAmount] = useState(0);
const [cartCount, setCartCount] = useState(0);
const [cartItems, setCartItems] = useState([]);
const [cartOpen, s... |
import React from 'react'
import Header from './components/header/Header'
import Nav from './components/nav/Nav'
import About from './components/about/About'
import Experience from './components/experience/Experience'
import Portfolio from './components/portfolio/Portfolio'
import Contact from './components/contact/... |
<?php
namespace ArtARTs36\MergeRequestLinter\Application\Rule\Rules;
use ArtARTs36\MergeRequestLinter\Application\Rule\Definition\Definition;
use ArtARTs36\MergeRequestLinter\Domain\Request\MergeRequest;
use ArtARTs36\MergeRequestLinter\Domain\Rule\RuleDefinition;
use ArtARTs36\MergeRequestLinter\Shared\Attributes\De... |
package com.sist.main2;
class Common
{
int a=10;
int b=20;
public void display()
{
System.out.println("Common:display call...");
}
}
class Child extends Common //is-a
{
// a,b 들어와있음
public void display()
{
System.out.println("Child:display call...");
}
}
class Child2
{
// 상속없이 오버라이딩 => 익명의 클래스
Common c=n... |
<!doctype html>
<html lang="en"
xmlns:th="http://thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
layout:decorate="~{page_layout/layout}">
<head>
<meta charset="UTF-8">
<title>Vehicles</title>
</head>
<bod... |
package fr.esprit.usermanagement.controllers;
import fr.esprit.usermanagement.docx.DocService;
import fr.esprit.usermanagement.dtos.Role;
import fr.esprit.usermanagement.dtos.UserDto;
import fr.esprit.usermanagement.exceptions.EntityAlreadyExistException;
import fr.esprit.usermanagement.exceptions.EntityNotFoundExcept... |
import * as React from 'react'
import {
IconButton,
Paper,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TablePagination,
TableRow,
Tooltip
} from '@mui/material'
import { DeleteIcon, EditIcon } from '@/components/icon'
import { Article, Recruitment } from '@prisma/client'
import { FormUse... |
/*mymatrix.h*/
/*
AUTHOR: BRANDON KIM
PROGRAM OVERVIEW: This file allows users to access the mymatrix class
which allows them to do various functions similar to a matrix.
*/
/// Assignment details and provided code are created and
/// owned by Adam T Koehler, PhD - Copyright 2023.
/// University of Illinois Chicago ... |
package com.example.introduction_kotlin.fragment
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.navigation.NavController
import androidx.navigation.Navigation
import com.example.introduction_kotlin... |
import CalendarPicker from "react-native-calendar-picker";
import { config } from "./configs";
import { AntDesign } from "@expo/vector-icons";
import { ComponentProps, useState } from "react";
import { formatDate, getDay } from "date-fns";
interface DatePickerProps extends ComponentProps<typeof CalendarPicker> {
onC... |
SELECT * FROM EMP ORDER BY DEPTNO, SAL;
SELECT * FROM EMP WHERE ENAME = 'MILLER';
SELECT * FROM EMP WHERE ENAME LIKE '_I%';
SELECT * FROM EMP WHERE UPPER(ENAME) LIKE2 '%R';
-- 1981년 이후 입사자 검색
SELECT * FROM EMP WHERE EXTRACT(YEAR FROM HIREDATE) >= 1981;
SELECT * FROM EMP WHERE DEPTNO != 20;
SELECT * FROM EMP WHERE R... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DOM Learning</title>
<style>
.bg-black {
background-color: #212121;
color: #fff;
}
</style>
</head>
<body class="bg-black... |
<template>
<div class="hy-form">
<div class="header">
<slot name="header"></slot>
</div>
<el-form :label-width="labelWidth">
<el-row :gutter="10">
<template v-for="item in formItems" :key="item.label">
<el-col v-bind="colLayout">
<el-form-item
:label... |
# Potřeby
## Definice
Je to pocit nedostatku, který je potřeba odstranit.
- Hmotné
- Auto
- Dům
- Mobil
- Nehmotné
- Znalost cizích jazyků
- Přátelství
- Statky
- Slouží k uspokojování hmotných potřeby
- Dělení podle hmotnosti
- Hmotné
- Nehmotné
- Dělení podle spotřeby
- Spotřební
- Slouží k přímě sp... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Examples</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<script type="text/javascript" src="lib/vue.js"... |
import {
mkdir,
readdir,
stat,
copyFile,
writeFile,
readFile,
} from "fs/promises";
import { join, extname } from "path";
const sourceDir = "./src/locales";
const destDir = "./dist/locales";
// Function to minify JSON content
function minifyJSON(content) {
return JSON.stringify(JSON.parse(content));
}
... |
import React, { Component, Fragment } from "react";
import { Link } from "react-router-dom";
import { connect } from "react-redux";
import PostHaiku from "../haiku/PostHaiku";
import Notifications from "./Notifications";
import PropTypes from "prop-types";
// MUI
import AppBar from "@material-ui/core/AppBar";
impor... |
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import './style.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { Toaster } from 'react-hot-toast'
import { createTheme, ThemeProvider } from '@mui/material';
const theme = createTheme({
... |
/**
* 特点:1、动态地给某个对象添加一些额外的职责。
* 2、在不改变原对象的基础上,通过对其进行包装扩展,使原有对象可以满足用户的更复杂需求,而不会影响从这个类中派生的其他对象。
*
* 优点:1、装饰类和被装饰类都只关心自身的核心业务,实现了解耦。
* 2、可以动态扩展一个实现类的功能。
*
*
*
* 装饰者模式和适配器模式有点类似,区别是装饰者模式是需要传入一个被装饰类的实例,以这个实例为基础进行装饰,而适配器模式传入一个实例,在构造函数中直接新建一个被适配类的实例。
*/
class Person{
constructor(name){
t... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-T3c6CoI... |
import { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import { Cta } from "../../components/Cta";
import { Loading } from "../../components/Loading";
import { api } from "../../services/api";
import { SelectQuantity } from "../../components/SelectQuantity";
import { useToast } from ... |
package com.orive.security.organisation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframe... |
用于计算交易路径的 sqrt 价格的库。
## Functions
### getSqrtPriceX96
```solidity
function getSqrtPriceX96(
bytes path
) internal returns (uint256 sqrtPriceX96)
```
获取指定路径当前兑换价格的sqrtPriceX96值
#### Parameters:
| Name | Type | Description |
| :--- | :--- | :-----------... |
import 'package:appimcnew/model/configuracoes_model.dart';
import 'package:appimcnew/repository/configuracoes_repository.dart';
import 'package:appimcnew/shared/widgets/text_label.dart';
import 'package:flutter/material.dart';
class ConfiguracaoPage extends StatefulWidget {
const ConfiguracaoPage({super.key});
@o... |
---
title: Apuntes de desarrollo web - HTML, CSS y JS
description:
---
<div class="topbar">
<a href="index.html" class="back">Atrás</a>
<h1>JavaScript</h1>
</div>
<ul class="index">
<li><a href=#principios>Principios</a></li>
<li><a href=#consola>Consola</a></li>
<li><a href=#variables>Variables</a></li>
<... |
import { Component, NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CartComponent } from './component/cart/cart.component';
import { DashboardComponent } from './component/dashboard/dashboard.component';
import { EditProfileComponent } from './component/edit-profile/edi... |
<!DOCTYPE html>
<html lang="pt-br" xmlns:th="http://www.thymeleaf.org">
<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>Smart School</title>
<link
... |
#pragma once
#include <chrono>
#include <memory>
#include <functional>
#include "DraggableQWidget.h"
#include "UpdatableGameWindow.h"
#include "ScaleableLabel.h"
#include "ColorChangerWidgetHelper.h"
#include <QLCDNumber>
#include <QMenu>
#include <QGridLayout>
class NestedTimerWindow: public DraggableQWidget, publ... |
import stdlib.
import rec.
module Ordinal-03.
-- Define Ord as an inductive datatype.
data Ord: ★
= zer : Ord
| suc : Ord ➔ Ord
| lim : (Nat ➔ Ord) ➔ Ord.
-- we can now define primitive recursion on an ordinal via
-- pattern matching. Defining recursion in this way saves
-- us the hassle of doing... |
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { Route, Routes } from "react-router-dom";
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import Header from "./components/Header";
import Home from "./pages/Home";
import Cadastrar from "./pages/Cadastrar";
const que... |
---
title: Gegevens ophalen van shapes op een kaart | Microsoft Azure kaarten
description: In dit artikel leert u hoe u shapegegevens kunt ophalen die op een kaart zijn getekend met behulp van de Microsoft Azure Maps Web SDK.
author: philmea
ms.author: philmea
ms.date: 09/04/2019
ms.topic: conceptual
ms.service: azure-... |
public class UseStringMethods {
public static void main(String[] args) {
UseStringMethods stringMethods = new UseStringMethods();
String Str = "The String class represents character strings.";
String findStr = "string";
stringMethods.printWords(Str);
... |
using Microsoft.EntityFrameworkCore;
using Modelos.Models;
namespace Modelos.ApplicationContexts;
public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext>
options) : base(options)
{
}
public DbSet<Empresa> E... |
'use strict'
const requester = require('@utils/requester')
const { requestBodyGenerator } = require('@utils/requestBodyGenerator')
const { cacheSave, cacheGet, getKeys, getMessage, sendMessage } = require('@utils/redis')
const { v4: uuidv4 } = require('uuid')
const env = require('../envHelper')
const { send } = require... |
import knexConnect from "../database/knex/knexConnect.js";
import AppError from "../utils/AppError.js";
class FoodsController {
async index(request, response) {
const { id } = request.user;
function getAggregateFunction(columnName) {
const dbClient = knexConnect.client.config.client;
if (dbClient === "mysq... |
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:pdv_app/utils/app_router.dart';
import '../model/sale.dart';
class SaleItem extends StatelessWidget {
final Sale sale;
const SaleItem({super.key, required this.sale});
@override
Widget build(BuildContext context) {
... |
console.log("app.js")
const stompClient = new StompJs.Client({
brokerURL: 'ws://localhost:8090/chat-info'
});
stompClient.onConnect = (frame) => {
setConnected(true);
console.log('Connected: ' + frame);
stompClient.subscribe('/topic/messages', (data) => {
console.log("data: "+data)
showGreetin... |
import React from "react";
import dribbble from "../assets/dribbble.png";
import linkedin from "../assets/linkedin.png";
import github from "../assets/github.png";
import { useNavigate } from "react-router-dom";
const Nav = () => {
const navigate = useNavigate();
return (
<div className="body">
<div class... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<title>Document</title>
</head>
<body>
<div id="app">
<... |
VZ-1 / VZ-10 (and possibly VZ-8) Sound Synthesis Elements
Voices
Each voice is created using (upto) 8 modules (M1 - M8) each consisting of a DCO and DCA.
Pairs of modules form internal lines:
M1 & M2 = Line A
M3 & M4 = Line B
M5 & M6 = Line C
M7 & M8 = Line D
M1 DCO1--DCA1--|
|-- Line A
M2 DCO2--DCA2--|
... |
using GameEngine.GameComponents;
using GameEngine.Input;
using GameEngine.Utility.ExtensionMethods.ClassExtensions;
using GameEngine.Utility.ExtensionMethods.InterfaceFunctions;
using GameEngine.Utility.ExtensionMethods.PrimitiveExtensions;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using M... |
import { vec3 } from "gl-matrix";
interface FormatStringOptions {
throwOnError?: boolean;
stringifyJSON?: boolean;
}
export function formatString(
str: string,
data: object,
options: FormatStringOptions = {}
) {
let inFormat = false;
let formatDepth = 0;
let formatValue = "";
let r... |
using System.Collections.ObjectModel;
using Ardalis.GuardClauses;
using FluentValidation.Results;
using OneOf;
using OneOf.Types;
using Payment.Bank.Application.Accounts.Features.ActivateAccount.v1;
using Payment.Bank.Common.Abstractions.Queries;
using Payment.Bank.Common.Abstractions.Commands;
using Payment.Bank.Appli... |
import { useState } from "react";
import CardContainer from "./CardContainer";
import CardTemplate from "./CardTemplate";
import { Button } from "@chakra-ui/react";
import { Song } from "../hooks/useSongs";
import SmallCard from "./smallcard";
interface props {
songs: Song[];
}
const RecSongs = ({ songs }: props) ... |
package User;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.String... |
<div class="row">
<div class="col-lg-12">
<div class="add-user-component">
<div class="card card-main">
<div class="card-header card-header-main download-report">
<div class="row">
<div class="col-auto mr-auto">Portfolio Company List</div>
<div class="col-auto">
<a [routerLink]="['/ad... |
#include <stdio.h>
// Function to find the maximum of two integers
int max(int a, int b) {
return (a > b) ? a : b;
}
// Function to solve the Knapsack problem using dynamic programming
int knapsack(int W, int wt[], int val[], int n) {
int i, w;
int K[n + 1][W + 1];
// Build table K[][] in bottom-up m... |
import tkinter as tk
import turtle
from pathlib import Path
import tqdm
from l_system.base import Lsystem
from l_system.rendering.turtle import LSystemTurtle, TurtleConfiguration
class LSystemRenderer:
def __init__(
self,
l_system: Lsystem,
turtle_configuration: TurtleConfiguration,
... |
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="layout/header.jsp" %>
<div class="py-5" style="background-color: #F9F9F9" id="main-container">
<c:forEach var="mainIntroduce" items="${mainIntroduceList}" varStatus="status">
<c:choose>
... |
package com.itheima.reggie.common;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import or... |
<?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Announcement>
*/
class AnnouncementFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<strin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.