text stringlengths 184 4.48M |
|---|
import base64
import random
import string
from io import BytesIO
from captcha.image import ImageCaptcha
from fastapi import APIRouter, HTTPException
from library.constants import AESConfig
from library.util import aes_decrypt, aes_encrypt
from app.response_status_code import ResponseStatusCode
from app.data_model impo... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>清除浮动方式三</title>
<style>
*{
margin: 0;
padding: 0;
}
body{
border: 1px solid #000;
}
.box1{
background-color: #8eff35;
}
.box2{
... |
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8">
<title>Upload to Google Drive</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 400px;
margin: 2... |
using Microsoft.AspNetCore.Mvc;
using MsiPostServer.DTO;
using MsiPostProfile;
using MsiPostUtility;
using MsiPosts.DTO;
using MsiPosts;
namespace MsiPostServer.Controllers;
/// <summary>
/// The controller for player profiles.
/// </summary>
[Route("api/[controller]")]
public class ProfileController : Controller
{
... |
package com.example.myfirstmedkit;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.myfirstmedkit.Validation.ValidationF... |
import React, { useState } from 'react';
function Book1() {
const [seats, setSeats] = useState({
standard: Array(100).fill('available'), // Initialize all standard seats as available
premium: Array(50).fill('available'), // Initialize all premium seats as available
});
const [selectedSeats, setSelectedSe... |
---
title: "trabajo grupal- Jazmin Esteban"
author: "Estadística para el Análisis Político 2 "
date: "24/11/21"
output: html_document
editor_options:
markdown:
wrap: 72
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE}
library(rio)
library(ggplot2) #para hacer gráfic... |
from pyspark.sql import SparkSession
from pyspark import SparkContext
from pyspark.sql.types import *
# Initialize a SparkSession, which is the entry point to any Spark functionality
spark = SparkSession \
.builder \
.appName("First_Spark_Job") \ # Set an application name for identification
.g... |
package Reserva;
import java.util.List;
import Cliente.Cliente;
import Habitacion.Habitacion;
import Reserva.Estado.EstadoReserva;
import Reserva.EstrategiaMedioDePago.EstrategiaMedioDePago;
import Reserva.EstrategiaPorcentaje.EstrategiaPorcentaje;
import java.util.ArrayList;
import java.util.Date;
public class Con... |
import {
Controller,
Get,
Post,
Body,
Patch,
Param,
Delete,
Req,
UseGuards,
} from '@nestjs/common';
import { MediasService } from './medias.service';
import { CreateMediaDto } from './dto/create-media.dto';
import { UpdateMediaDto } from './dto/update-media.dto';
import { AuthGuard } from '@nestjs/pa... |
# Copyright (c) 2021 Mobvoi Inc. (authors: Binbin Zhang)
#
# 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 l... |
/**
* Author: sascha_lammers@gmx.de
*/
#pragma once
#include <Arduino_compat.h>
#include <EventScheduler.h>
#include <kfc_fw_config.h>
#include <Syslog.h>
#include "plugins.h"
#if !defined(SYSLOG_SUPPORT) || !SYSLOG_SUPPORT
#error requires SYSLOG_SUPPORT=1
#endif
class SyslogPlugin : public PluginComponent {
publ... |
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CommonModule } from '@angular/common';
import { HomeComponent } from './pages/home/home.component';
import { ContactanosComponent } from './shared/contactanos/contactanos.component';
import { PaquetesComponent } ... |
package com.example.tanahku.ui.auth.register
import android.util.Log
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import... |
; Adrian Maldonado - Jeremy Bruce - CMSC 313 FA23 - PROJECT 3
; Description:
; Asks the user for a string that is longer than 8. Then ask for a number between 2 and the length of the string.
; There will be error/input correction. This number will be where the string will be split. Then display the original string
; T... |
import { Injectable, InternalServerErrorException } from '@nestjs/common';
import {
AuthenticationDetails,
CognitoUser,
CognitoUserAttribute,
CognitoUserPool,
CognitoUserSession,
ICognitoUserPoolData,
CognitoRefreshToken,
} from 'amazon-cognito-identity-js';
import { LoginAuthDto } from './dto/login-auth.... |
package com.bugjc.java.basics.annotation.extend;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
public class StandardAnnotationMetadata<T extends Annotation> implements AnnotationMetadata<T> {
private Annotation srcAnnotation;
private T annotation;
private Class<T> anno... |
import React, { useState, useRef, useEffect } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Link } from 'react-router-dom';
import Logo from './partials/Logo';
import Button from "../elements/Button";
import LoginButton from "../elements/LoginButton";
import LogoutButto... |
import React from 'react';
import { useParams } from 'react-router-dom';
import API from '../API';
import { PaperItem } from './PaperItem';
export const StudentDetails = () => {
const { id } = useParams();
const [student, setStudent] = React.useState(null);
React.useEffect(() => {
fetch(API.STUDEN... |
@foreach($group as $command)
@php($border = ['border-bottom-0' => $loop->last])
<tr>
@if(request('sortKey'))
<td @class($border)>{{ $command['group'] }}</td>
@endif
<td @class($border) style="{{ request('sortKey') ?: 'padding-left: 50px;' }}">{{ $command['shortName'] }}</td>
... |
{- Problem 75: Singular integer right triangles
It turns out that 12 cm is the smallest length of wire that can be bent to form
an integer sided right angle triangle in exactly one way, but there are many
more examples.
12 cm: (3,4,5)
24 cm: (6,8,10)
30 cm: (5,12,13)
36 cm: (9,12,15)
40 cm: (8,15,... |
Code Description of prefect_deploy_w_markdown_artifact.py:
-------------------------------------------------------------
The code leverages Prefect's task and flow decorators to define and orchestrate a machine learning pipeline, allowing for easier management and monitoring of the tasks involved in the workflow. It re... |
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Test\DependencyResolver;
use Co... |
import 'dart:math';
import 'package:expense_repository/expense_repository.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pizza/screens/add_expense/add_expense.dart';
import 'package:pizza/screens/add_expense/blocs... |
//MyGPS Library
//秋月電子AE-GYSFDMAXB GPSモジュール用ライブラリ
//Arduino用
//開発:H.Kurosaki
//Ver2.0 2023/7/13
//このライブラリはArduno標準ライブラリがあれば単体でも使用できる
//注意:日本国内でしか使用できません(標準時が日本で北半球に固定されているため)
/*
対応モジュール
秋月電子 AE-GYSFDMAXB(ディスコン)
秋月電子 AE-GNSS-EXTANT(注意:AE-GYSFDMAXBとRX,TXピンが逆)
GT-902PMGG(注意:日付情報が3分程度しか保持されない)
*/
/*
ライセンス
Copyright 2023 H... |
$width: 200px;
$height: 100px;
$border-for-boxes: 1px solid #222222;
// adjust-hue changes the hue of a color
$base-color: red;
$alternate-color: #AD141E;
div.hue {
div.left {
background-color: adjust-hue($base-color, 90); // 90 degr is chartreuse green
}
div.middle {
background-color: $base-color;
}
di... |
import { format } from 'date-fns';
import React, { useEffect, useState } from 'react';
import { reportApi } from '../api';
import { DashboardBody } from '../components/DashboardBody/DashboardBody';
import { DashboardHeader } from '../components/DashboardHeader/DashboardHeader';
import { EmptyDashboard } from '../compon... |
import { useState, useEffect, useCallback } from 'react';
interface optionType {
root: Element | null;
rootMargin: string;
threshold: number | number[];
}
const defaultOptions: optionType = {
root: null,
rootMargin: '1px',
threshold: 0.1,
};
export default function useInfiniteScroll(onIntersect, option =... |
<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<title>home</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS v5.2.1 -->
<link href="https://cdn.jsdeli... |
import { ethers } from "hardhat";
import { expect } from "chai";
import { Signer, toBigInt } from "ethers";
import {
BobaToken,
BobaToken__factory,
NFTMarketplace,
NFTMarketplace__factory,
ERC721,
} from "../typechain-types";
describe("BobaToken", function () {
let BobaToken: BobaToken;
let owner: Signer... |
import 'package:flutter/material.dart';
import 'package:peliculas/models/pelicula_model.dart';
class PeliculaDetalle extends StatelessWidget {
const PeliculaDetalle({super.key});
@override
Widget build(BuildContext context) {
final Pelicula pelicula =
ModalRoute.of(context)!.settings.arguments as Pe... |
/*
* @author Michael Rapp (michael.rapp.ml@gmail.com)
*/
#pragma once
#include "mlrl/common/model/condition_list.hpp"
#include "mlrl/common/rule_refinement/feature_subspace.hpp"
#include "mlrl/common/sampling/partition.hpp"
/**
* Defines an interface for all classes that implement a strategy for pruning individual... |
import { create } from "zustand";
export interface Event {
type:
| "start"
| "stop"
| "reset"
| "user_leave"
| "user_join"
| "space_delete";
createdAt: string;
user: string;
}
export interface Space {
id: string;
name: string;
createdAt: string;
deletedAt: string | null;
member... |
<?php
/*
Plugin Name: Jetpack Carousel
Plugin URL: https://wordpress.com/
Description: Transform your standard image galleries into an immersive full-screen experience.
Version: 0.1
Author: Automattic
Released under the GPL v.2 license.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY ... |
---
title: "Inservice Training"
format: revealjs
slide-number: true
include-in-header:
text: <script type="text/javascript" src="scenarios.js"></script>
---
## Group Discussion
1. What is one thing that you have done well in your job as a TA so far?
2. When did you have to think hard in your job as a TA?
4. What ha... |
using Azure.Messaging.ServiceBus;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using ServiceBus.Abstractions;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace AptTec.NET.AzureServiceBus
{
public class ServiceBusTopicCommand<T> : IServiceBusTo... |
array()
创建数组(无维度属性)
array()[:,np.newaxis]
给数组赋予维度
arange()
功能类似range(),默认整形
copy()
深拷贝
any()
数据是否包含有ture的值
linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)
start:返回样本数据开始点
stop:返回样本数据结束点
num:生成的样本数据量,默认为50
endpoint:True则包含stop;False则不包含stop
retstep:如果为True则结果会给出数据间隔
dtype:输出数组类型
axis:0(默认... |
'''
Problem statement
You are given a number 'N' in the form of a string 'S', your task is to find the smallest number strictly greater than the given number 'N' which is a palindrome.
Note:
1) A palindrome is a word, number, phrase, or another sequence of characters that reads the same backward as forward, such as '... |
pub mod asserts;
pub mod clauses;
use sqlparser::ast::{SetExpr, Statement};
use std::collections::HashSet;
use std::fmt;
use crate::{finder, schema};
use colored::Colorize;
use self::clauses::ClauseValidation;
#[derive(Debug, PartialEq)]
pub struct SqlValidationError {
pub location: String,
pub description:... |
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import GridSearchCV
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
class style():
BLACK = '\033[30m'
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
... |
import { Component, OnInit } from '@angular/core';
import {
FormControl,
FormGroup,
ReactiveFormsModule,
Validators,
} from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/materia... |
Massachusetts Institute of Technology
Logistical and Transportation Planning Methods
Fall 2003
Solutions to quiz 1
Prepared by Margr´et Vilborg Bjarnad´ottir
1
(Bjarnad´ottir, 2003, (Outline Kang, 2001))
X1 , X2 are uniformly distributed between 0 and a. Let G(a) ∗ E [max(x 1 , x... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Movies App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdel... |
import {
Controller,
Get,
Post,
Body,
Patch,
Param,
Delete,
UseInterceptors,
ClassSerializerInterceptor,
UseGuards,
} from "@nestjs/common";
import { AuthGuard } from "@nestjs/passport";
import {
ApiBadRequestResponse,
ApiConflictResponse,
ApiCreatedResponse,
ApiInternalServerErrorResponse,
... |
const AInputTemplate = document.createElement("template");
AInputTemplate.innerHTML = `
<style>
.input-name input {
font-size: 1.2rem;
font-family: 'Eczar', serif;
}
</style>
<section class="input-name">
<label for="input"></label>
<input id="input" ty... |
import 'dart:io';
import 'package:appflowy/plugins/document/presentation/editor_plugins/copy_and_paste/clipboard_service.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart';
import 'package:f... |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<reference>
<title>Pàgines del manual de l'SSSD</title>
<refentry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/upstream.xml" />
<... |
------ WHERE ------
-- filtering rows
-- return teachers
-- 1. last_name, school, and hire_date
-- 2. from 'Myers Middle School'
SELECT last_name, school, hire_date
FROM teachers
WHERE school = 'Myers Middle School';
----- COMPARISON and MATCHING OPERATORS -----
-- 1. = : equal to
-- 2. <> or != : not equal ... |
class Solution {
var cache = [0: 0, 1: 1]
func fib(_ n: Int) -> Int {
if let result = cache[n] {
return result
} else {
let calculatedResult = fib(n - 1) + fib(n - 2)
cache[n] = calculatedResult
return calculatedResult
}
... |
package gmail.loganchazdon.dndhelper.model.junctionEntities
import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.ForeignKey.Companion.CASCADE
import gmail.loganchazdon.dndhelper.model.CharacterEntity
import gmail.loganchazdon.dndhelper.model.ClassEntity
import gmail.loganchazdon.dndhelper.m... |
import React from 'react';
import { Link } from 'react-router-dom';
import "./SignUpPage.css";
import { useFormik } from 'formik';
import { emailValidator } from '../../helpers/emailValidator'
import { passwordValidator } from '../../helpers/passwordValidator'
import { nameValidator } from '../../helpers/nameValidator'... |
import { hash } from 'bcrypt';
import { TicketEntity } from 'src/ticket/ticket.entity';
import {
BeforeInsert,
BeforeUpdate,
Column,
Entity,
OneToMany,
PrimaryGeneratedColumn,
} from 'typeorm';
import { UserRole } from './types/userRole.enum';
import { MessageEntity } from 'src/messages/message.entity';
@E... |
<?php
namespace App\Http\Controllers;
use App\Models\DataTransaksi;
use Illuminate\Http\Request;
use App\Models\JenisSampah; //panggil model
use App\Models\Sampah; //panggil model
use App\Models\MetodePembayaran; //panggil model
use App\Models\Transaksi; //panggil model
use Illuminate\Support\Facades\DB; // jika paka... |
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.kotlin.inspections.internal
import org.jetbrains.idea.devkit.inspections.internal.FileEqualsUsageInspectionTestBase
class KtFileEqualsUsageInspectionTest : FileEqu... |
import {
CallHandler,
ExecutionContext,
Injectable,
Logger,
NestInterceptor,
} from '@nestjs/common';
import { Observable, tap } from 'rxjs';
import { RequestService } from 'src/request.service';
@Injectable()
export class LoggingInterceptor implements NestInterceptor {
private readonly logger = new Logger... |
<script>
import Loading from "../Loading.vue";
import Context from "../Context.vue";
import History from "../History.vue";
import Attribute from "./Attribute.vue";
import Range from "./Range.vue";
function map_range(value, low1, high1, low2, high2) {
return low2 + (high2 - low2) * (value - low1) / (high1 - low1);
}... |
<!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>BLACKCOFFEE</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="... |
import 'package:flutter/material.dart';
import '../../../../Service/apiAuthenticate.dart';
import 'RegisterCode.dart';
import 'package:flutter/services.dart';
import '../../components/errorView.dart';
import '../../components/GradientBackground.dart';
class RegisterForm extends StatefulWidget {
const RegisterForm({s... |
class Node {
int a;
Node next;
public Node(int data) {
this.a = data;
this.next = null;
}
}
class LinkedList {
private Node b;
public LinkedList() {
this.b = null;
}
public void add(int data) {
Node newNode = new Node(data);
if (b == null) {
... |
import React, { useEffect, useState } from "react";
import {
View,
Text,
KeyboardAvoidingView,
TouchableWithoutFeedback,
Keyboard,
ImageBackground,
TouchableOpacity,
Dimensions,
StyleSheet,
Image,
} from "react-native";
import { useDispatch, useSelector } from "react-redux";
import Styles from "../s... |
import UIKit
protocol CustomPickerViewDelegate: AnyObject {
func itemSelected(name: String, quantity: Int, price: Double)
}
class CustomPickerView: UIPickerView, UIPickerViewDataSource, UIPickerViewDelegate {
weak var customDelegate: CustomPickerViewDelegate?
// Sample data for the picker v... |
<!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>1160. 拼写单词</title>
</head>
<body>
<script>
// https://leetcode.cn/problems/find-words-t... |
import React, {useState, useEffect} from 'react';
import axios from 'axios';
import Coins from './components/Coins';
import Coin from './routes/Coin'
import Navbar from './components/Navbar';
import {Routes, Route} from 'react-router-dom';
function App() {
const [coins, setCoins] = useState([]);
const url = 'https... |
<script lang="ts">
import { differenceInDays } from 'date-fns/differenceInDays';
import { format } from 'date-fns/format';
import { formatRelative } from 'date-fns/formatRelative';
import { upperFirst } from 'lodash-es';
import type { FeedItem, Source } from './types';
export let item: FeedItem;
export let sou... |
<template>
<div class="section3">
<div class="bg fullscreen">
<carousel-3d
ref="mycarousel"
:width="videoWidth"
:height="videoHeight"
:perspective="0"
:disable3d="isMobile ? true : false"
:border="0"
:display="isMobile ? 1 : 3"
:space="isMobile... |
*
* This file is a part of CoSiMA (CogIMon) project
*
* Copyright (C) 2018 by Dennis Leroy Wigand <dwigand at cor-lab dot uni-bielefeld dot de>
*
* This file may be licensed under the terms of the
* GNU Lesser General Public License Version 3 (the ``LGPL''),
* or (at your option) any later version.
*
* Softwar... |
Current Release: 0.7~+pre2
---------------
This is a 0.7 prerelease of Pyjamas, to invite users to help test the
latest version. The latest svn is regularly but informally tested
against the regression tests and the examples, and used in production,
but not extensively tested against all known browsers on each commit... |
# import numpy as np
# import scipy.io.wavfile as wavfile
# import matplotlib.pyplot as plt
# import os
# def split_wav_file(wav_file_path, chunk_duration_seconds, output_directory):
# # Read the .wav file
# sample_rate, data = wavfile.read(wav_file_path)
# # If stereo, take only one channel (assuming lef... |
package edu.northeastern.cs5520_lab6.contacts;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerV... |
import { Injectable } from '@nestjs/common';
import { CreateCouponDto } from './dto/create-coupon.dto';
import { UpdateCouponDto } from './dto/update-coupon.dto';
import { CouponSearchDto } from './dto/coupon-search.dto';
import { EntityManager, InsertResult, Like, Repository } from 'typeorm';
import { InjectRepository... |
package br.com.bookinghub.api.dto;
import br.com.bookinghub.api.model.Housing;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
public class HousingDTO implements Serializable {
private static final Long serialVersionUID = 1L;
private Long id;
//Name of the Hotel, Apartment... |
import 'package:flutter/material.dart';
import 'package:urbansat/shared/themes/app_colors.dart';
import 'package:urbansat/shared/themes/app_text_styles.dart';
class InputTextWidget extends StatelessWidget {
final String label;
final IconData icon;
final String hint;
final bool obscure;
final TextEditingContr... |
package com.example.basket.domain.service;
import com.example.basket.domain.entity.Cart;
import com.example.basket.domain.entity.Item;
import com.example.basket.domain.entity.PromotionType;
import com.example.basket.domain.service.impl.CartServiceImpl;
import org.springframework.stereotype.Service;
import java.util.S... |
import axios, { AxiosError, AxiosResponse } from "axios";
import { toast } from "react-toastify";
import { router } from "../router/Routes";
const sleep = () => new Promise(resolve => setTimeout(resolve, 500)) ;
axios.defaults.baseURL = "http://localhost:5000/api/";
axios.defaults.withCredentials = true;
function ... |
const db = require('../config/db')
const escape = require('pg-format')
const moment = require('moment')
const model = {}
model.getData = () => {
return new Promise((resolve, reject) => {
db.query('SELECT * FROM public.product ORDER BY id_product DESC')
.then((res) => {
resolve(r... |
#!/usr/bin/env node
/* eslint-disable no-console */
import {stat} from 'fs/promises';
import {ensure} from '../util/gencache.mjs';
import {file as hashFile, buffer as hashBuffer} from '../util/hash.mjs';
import {itterFile as zipItterFile} from '../util/zip.mjs';
import {isSystem, isMetadata} from '../util/paths.mjs'... |
// FGMacOSXEventInput.cxx -- handle event driven input devices for Mac OS X
//
// Written by Tatsuhiro Nishioka, started Aug. 2009.
//
// Copyright (C) 2009 Tasuhiro Nishioka, tat <dot> fgmacosx <at> gmail <dot> com
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the ... |
from __future__ import annotations
import subprocess
from unittest.mock import MagicMock, call, patch
from utils import MockStream
from duct.__main__ import LogPaths, Outputs, prepare_outputs
@patch("builtins.open", new_callable=MagicMock)
@patch("duct.__main__.TailPipe")
@patch("duct.__main__.LogPaths")
@patch("duct... |
{% extends './base.html' %}
{% block css %}
<link rel="stylesheet" href="{{ url_for('static', filename = 'css/registrar-artesano.css') }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0">
{% endblock %}
{% block body %}
<a href=... |
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../../data/models/task_model.dart';
import '../../cubit/add_task/add_task_cubit.dart';
import '../add_task/bottom_sheet.dart';
import 'package:flutter_... |
import styled from "styled-components";
interface ButtonProps {
width: number;
height: number;
bgColor: string;
color: string;
size: number;
}
export const Button = styled.button<ButtonProps>`
width: ${({ width }) => width}px;
height: ${({ height }) => height}px;
background: ${({ bgColor }) => bgColor... |
package com.entity.vo;
import com.entity.GonglueEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.... |
import React, { useState, useEffect } from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import NavbarComponent from './NavbarComponent';
import Footer from "./Footer"
import axios from 'axios';
import Swal from 'sweetalert2';
const baseUrl = process.env.REACT_APP_API_URL;
var crypto = require("crypto");
fu... |
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="kbr.css">
<link rel="stylesheet" href="index.css">
</head>
<body>
<h2>kbr-container (kbr-left)</h2>
<div class="container-purple kbr-container " >
<div class="box-100 kbr-center-center "> 1 </div>
<div class="box-100 kbr-flex-item-order-2 kbr-center-... |
<?php
namespace Drupal\filter\Plugin\Filter;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\filter\Attribute\Filter;
use Drupal\filter\FilterProcessResult;
use Drupal\filter\Plugin\FilterBase;
use Drupal\filter\Plugin\FilterInterface;
/**
* Provides a filter to convert line breaks to HTML.
*/
#[F... |
import type { GetLunarDetailReturn } from '..';
import type { ComputedRef } from 'vue';
/**
* 日历组件 hook 返回值类型接口
*
* @param { Object } AllMonthDays 当前月份展示的天数
* @param { Function } changeLastMonth 上个月切换
* @param { Function } changeNextMonth 下个月切换
*/
export interface UseCalendarReturn {
AllMonthDays: ComputedRef... |
*> \brief \b CTRSM
*
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
*
* SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA
* INTEGER LDA,LDB,M,N
* CHARACTER DIAG,S... |
import { fireEvent, render, waitFor } from '@testing-library/react'
import { SearchArea } from '.'
describe('<SearchArea>', () => {
const onSubmitMock = jest.fn()
it('Should render SearchArea correctly', async () => {
const { getByTestId } = render(<SearchArea onSubmit={onSubmitMock} />)
const searchInpu... |
import React, {useContext, useReducer} from 'react';
import style from './Layout.module.css';
import {LayoutProps} from "./Layout.props";
import Sidebar from "./Sidebar";
import Header from "./Header";
import Footer from "./Footer";
import {AppContext, AppContextProvider, IAppContext} from "../context/app.context";
c... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package h2_sensorData;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persist... |
class FeedbacksController < ApplicationController
before_action :set_classroom
before_action :set_task
def index
@feedbacks = @task.feedbacks
end
def create
@feedback = @task.feedbacks.new(feedback_params)
@task_progress = TaskProgress.find_by(user_id:current_user.id,task_id:@task.id)
@task_... |
const toDoForm = document.querySelector(".js-toDoForm"),
toDoInput = toDoForm.querySelector("input"),
// document.querySelector는 document에서 찾지만,
// toDoForm.querySelector는 toDoForm 안에서만 찾는다.
toDoList = document.querySelector(".js-toDoList");
const TODOS_LS = "toDos";
/*function filterFn(toDo){
return toDo.i... |
package com.example.rollcall;
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 AttendanceAdapter extends RecyclerView.... |
import tkinter as tk
from tkinter import filedialog
from datetime import datetime
from wsgiref.handlers import format_date_time
from time import mktime
import hashlib
import base64
import hmac
from urllib.parse import urlencode
import os
import traceback
import json
import requests
class AssembleHeaderException(Except... |
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import '... |
public class Planet {
double xxPos;
double yyPos;
double xxVel;
double yyVel;
double mass;
String imgFileName;
static final double G = 6.67e-11;
// Constructor to initialize the variables
public Planet(double xxPos, double yyPos, double xxVel, double yyVel, double mass, String img)... |
"use client";
import {
Box,
Container,
Stack,
Text,
Image,
Flex,
VStack,
Heading,
SimpleGrid,
StackDivider,
useColorModeValue,
List,
ListItem,
Button,
ButtonGroup,
Modal,
ModalOverlay,
ModalContent,
ModalHeader,
ModalFooter,
ModalBody,
ModalCloseButton,
useDisclosure,
use... |
// Array
// -----------
let hobbies: string[] = [];
hobbies[0] = 'cricket';
hobbies[1] = 'travelling';
// Tuples
// -----------
let role: [number, string] = [1, 'admin'];
role = [2, 'user'];
// role = [1] // This is the incorrect assignment
// Enum
// --------
enum Role {ADMIN, READ_ONLY, AUTHOR};
// By defau... |
<script setup lang="ts">
import { ref } from 'vue'
import { useBoardStore } from '@/stores/boardStore'
import { formRules } from '../../src/utils/index'
const { addTaskToBoard, statuses, resetLocalStorage } = useBoardStore()
import { PhX } from '@phosphor-icons/vue'
import type { Tags, TaskDetails } from '@/types'
co... |
<div class="container">
<h3>Login Page</h3>
<hr>
<form [formGroup]="loginForm" (ngSubmit)="loginCredentials()" class="formControls">
<!--Username -->
<div>
<p>
<label for="UserName" class="form-label">UserName</label><br>
<input type="text" clas... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.