text stringlengths 184 4.48M |
|---|
//
// SecondViewController.swift
// UITableViewDemo
//
// Created by Саидов Тимур on 09.06.2022.
//
import UIKit
class SecondViewController: UIViewController {
private lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .insetGrouped)
/// При статическом отобра... |
// USER NAVIGATION (CSS)
//
// 1. Corrects the spacing added by .navUser-or
// 2. Can't use top: 50% because its container `.header` changes its height to
// 100% when mobile menu is expanded
// 3. Make the triangle for store credit dropdown centered
// 4. Needs to be 100% so its dropdown can take full width in mo... |
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";
import { Container, Form, Button } from "react-bootstrap";
import axios from "axios";
function Register() {
const navigate = useNavigate();
const [formData, setFormData] = useState({
name: "",
email: "",
username: ... |
import { CHR_BANK_SIZE, PRG_BANK_SIZE } from "./const";
import { None, Option, Some } from "./types/option";
import { Result, Ok, Err } from "./types/result";
enum Mirroring {
Horizontal,
Vertical,
}
export interface Cartridge {
title: Option<string>;
trainer: ArrayBuffer;
prg_banks: ArrayBuffer[];
chr_ba... |
<template>
<div class="row no-gutters">
<div class="card w-100">
<div class="cards_panel_header d-flex align-items-center">
Usuários
<input class="form-control col-4 form-control-sm ml-auto"
v-model="filter"
placeholder="Busc... |
package dropbox.webCrawler.multiThread;
import dropbox.webCrawler.Crawler;
import dropbox.webCrawler.HttpClient;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.concu... |
/*
* Copyright (C) 2023 The Android Open Source Project
*
* 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 appl... |
//
// ContentView.swift
// Flashzilla
//
// Created by Dominik Hofer on 28.09.22.
//
import SwiftUI
extension View {
func stacked(at position: Int, in total: Int) -> some View {
let offset = Double(total - position)
return self.offset(x: 0, y: offset * 10)
}
}
struct ContentView: View {
... |
float[] price;
float minPrice, maxPrice;
float x1, y1, x2, y2;
int[] mm;
PFont legendFont = createFont("SansSerif",20);
void setup( ) {
size(800,600, P3D);
x1 = 50; y1= 50;
x2= width -50;
y2 = height - y1;
smooth();
textFont(legendFont);
String[] lines = loadStrings("aapl.txt");
price = new float[li... |
import React, { useEffect, useReducer, useState } from "react";
import { StyleSheet, View } from "react-native";
import { Button, DataTable, IconButton } from "react-native-paper";
import HeaderBar from "../components/HeaderBar";
import { lampInfos } from "../apis/mock";
import LampAddModal from "../components/LampAddM... |
import axios from "axios";
import { config } from "dotenv";
config();
const CLIENT_ID = process.env.client_id;
const CLIENT_SECRET = process.env.client_secret;
const BASE_ENDPOINT = `https://api.spotify.com/v1/`;
const AUTHORIZE_ENDPOINT = "https://accounts.spotify.com/api/token";
function getEndpoint(ext) {
ret... |
import { INPUT } from './input.ts';
const TEST1: string = `[({(<(())[]>[[{[]{<()<>>
[(()[<>])]({[<{<<[]>>(
{([(<{}[<>[]}>{[]{[(<()>
(((({<>}<{<{<>}{[]{[]{}
[[<[([]))<([[{}[[()]]]
[{[{({}]{}}([{[{{{}}([]
{<[[]]>}<{[{[{[]{()[[[]
[<(<(<(<{}))><([]([]()
<{([([[(<>()){}]>(<<{{
<{([{{}}[<[[[<>{}]]]>[]]`;
function doPart(in... |
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
<title>Infra-red spectroscopy</title>
<link rel="stylesheet" href="../styles/stylesheet.css" type="text/css"/>
<script src="https://cdn.math... |
package org.arquillian.example.basic.welcome;
import javax.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArch... |
import { useState } from 'react';
import axios from 'axios';
import { get } from 'lodash-es';
import { formatError } from '../../utils/formatters';
export default function usePostAnnotation() {
const [loading, setLoading] = useState(false);
const [error, setError] = useState(null);
const [success, setSuccess] = ... |
// Copyright (c) 2023 Cisco and/or its affiliates. All rights reserved.
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
... |
import com.codeborne.selenide.logevents.SelenideLogger;
import io.qameta.allure.selenide.AllureSelenide;
import org.junit.jupiter.api.Test;
import static com.codeborne.selenide.Condition.text;
import static com.codeborne.selenide.Selectors.byText;
import static com.codeborne.selenide.Selenide.$;
import static com.code... |
<template>
<div class="submit-form">
<div v-if="!submitted">
<h4>Add new Movie</h4>
<div class="form-group">
<label for="title">Title</label>
<input
type="text"
class="form-control"
id="title"
required
v-model="movie.title"
name="ti... |
# TODO: copy your mypytable.py solution from PA2-PA7 here
import copy
import csv
#from tabulate import tabulate # uncomment if you want to use the pretty_print() method
# install tabulate with: pip install tabulate
# required functions/methods are noted with TODOs
# provided unit tests are in test_mypytable.py
# do ... |
import connection from "../../connectionDb.cjs";
import { v4 as uuidv4 } from 'uuid'
import { GetCurrentDateString, GetTwoGroupInicials, TransformDateToCorrectFormatString } from "../helpers/index.js";
import { GetFileUrl } from "../../s3.js";
const getContacts = async (sql, ContactData, userId) => {
try {
... |
<!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>Homepage</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect"... |
class Vehicle{
constructor( color = 'blue', wheels = 4, horn = 'beep beep'){
this.color = color;
this.wheels = wheels;
this.horn = horn;
}
honkHorn(){
console.log(this.horn);
}
}
// the subclass of vehicle
class Bicycle extends Vehicle {
constructor(color = 'blue', w... |
---
name: 'Jekyll 小书'
description: '用极客的方式搭建个人网站'
edition:
version: '3.2.1.p1'
author: '安道'
pages: '134'
revdate: '2016-08-04'
price: '20.00'
order: 4
date: '2021/08/30' # no use, but required by `blog` extension
body_class: 'product-page product-jekyll-book'
---
<% content_for :toc do %>
<ul>
<li>
<h3>第 1... |
import "./TaskModal.styles.css";
import { useState, useEffect } from "react";
import { useValidateForm } from "hooks";
import { initialTaskInfo } from "utils";
import { Toast } from "utils";
function TaskModal({ options }) {
const { showModal, taskInfo, setShowModal } = options;
const [modalTaskInfo, setModalTaskI... |
# READING LIST
- The following is part of the recommended books for Computer Science Stucy in 1st Year College
## Reading List for modules
- Principles of Programming
- Programming in C, 4th Edi, *Stephen Kochan*
- Head first C, *David Grithins*
- The C programming language, *Kernighan, Brian W.*
- Linux in ... |
import { SINGLE_ARTIST_PAGE } from "@/pathes";
import { IArtist } from "@/redux/Artists/ArtistsSlice";
import React from "react";
import { useMediaPredicate } from "react-media-hook";
import { Link } from "react-router-dom";
const ArtistAvatar: React.FC<IArtist> = ({ followers, id, imageUrl, name }) => {
const isMob... |
import React from 'react';
import ReactDOM from 'react-dom/client';
// import 'bootstrap/dist/css/bootstrap.min.css'
import {
createBrowserRouter,
createRoutesFromElements,
Route,
RouterProvider,
} from 'react-router-dom'
import './assets/styles/bootstrap.custom.css'
import './assets/styles/index.css';
import App from ... |
<?php
/**
* TastyIgniter
*
* An open source online ordering, reservation and management system for restaurants.
*
* @package TastyIgniter
* @author SamPoyigi
* @copyright TastyIgniter
* @link http://tastyigniter.com
* @license http://opensource.org/licenses/GPL-3.0 The GNU GENERAL PUBLIC LICENSE
*... |
import React,{useEffect, useRef, useState} from 'react'
import { AiFillEdit, AiFillDelete } from "react-icons/ai";
import { MdDone } from "react-icons/md";
import { Todo } from '../model';
type Props={
todo:Todo;
todos:Todo[];
setTodos:React.Dispatch<React.SetStateAction<Todo[]>>;
}
const SingleTodo:React.... |
//
// TaskEditView.swift
// TodoListAppTutorial
//
// Created by Callum Hill on 31/7/2022.
//
import SwiftUI
struct TaskEditView: View
{
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
@Environment(\.managedObjectContext) private var viewContext
@EnvironmentObject var d... |
package it.contrader.authenticationservice.security;
import io.jsonwebtoken.*;
import io.jsonwebtoken.io.Decoders;
import io.jsonwebtoken.security.Keys;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.b... |
from logging import getLogger
from uuid import UUID
from sqlalchemy.ext.asyncio import AsyncSession
from chatbot.db import get_db
from chatbot.service.session import message as message_service
from chatbot.service.tool.base_event_handler import BaseEventHandler
from chatbot.task import enqueue
from .task import run_q... |
import logging
import re
import httpx
from fastapi import Depends, HTTPException, status
from fastapi.security import OpenIdConnect
from jose import jwt
from src.core.config import Configuration
from src.v1.models import auth_model
LOGGER = logging.getLogger(__name__)
LOGGER.debug(f"Configuration.OIDC_CLIENT_ID: {C... |
<!doctypehtml><meta charset=utf-8><script crossorigin=anonymous src=https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js></script><script crossorigin=anonymous src=https://cdn.jsdelivr.net/npm/@mediapipe/control_utils/control_utils.js></script><script crossorigin=anonymous src=https://cdn.jsdelivr.net/n... |
Contributing to Chart.js
Contributions to Chart.js are welcome and encouraged, but please have a look through the guidelines in this document before raising an issue, or writing code for the project.
Using issues
------------
The [issue tracker](https://github.com/chartjs/Chart.js/issues) is the preferred channel... |
# StructuredLight.jl
This package provides tools to simulate the propagation of paraxial light beams. This includes the calculation of Laguerre-Gauss and Hermite-Gauss beam profiles, the action of lenses, the propagation in free space as well as in Kerr media. We also provide methods that help the visualization of suc... |
import datetime
import time
import pandas as pd
import pyarrow as pa
from ds_core.handlers.abstract_handlers import ConnectorContract
from ds_core.components.abstract_component import AbstractComponent
from nn_rag.components.commons import Commons
from nn_rag.managers.controller_property_manager import ControllerPrope... |
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import * as mongoose from 'mongoose';
import { ReportTypes } from 'src/common/constants';
import { TimestampBase } from './timestamp-base';
@Schema({ timestamps: true })
export class Report extends TimestampBase {
@Prop({ type: mongoose.Schema.Types.Obj... |
import React, { useEffect } from 'react';
import { Platform, StatusBar } from 'react-native';
//Third Party
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { Provider as PaperProvider } from 'react-native-paper';
import... |
<?php
use function Withinboredom\Bytes\Kilobytes;
it('can be serialized', function () {
$kb = Kilobytes(12);
$string = serialize($kb);
expect($string)->toBe('O:29:"Withinboredom\Bytes\Kilobytes":1:{s:5:"bytes";i:12288;}');
});
it('can be deserialized', function () {
$string = 'O:29:"Withinboredom\Byt... |
package main
import "fmt"
func max(num1,num2 int) int {
if num1 > num2 {
return num1
} else {
return num2
}
}
func lcs(input1,input2 []int) []int {
matrix := make([][]int,len(input1)+1)
for i,_ := range matrix {
matrix[i] = make([]int,len(input2)+1)
}
f... |
<div *ngIf="productsList.length else cover" class="d-flex flex-column align-items-center shoppingCartProduts">
<!-- Productos -->
<mat-expansion-panel *ngFor="let product of productsList; index as i"
[expanded]="i === 0" hideToggle class="shadowBorder col-12 my-2 p-2">
<!-- Fuera (fila) -->
<mat-exp... |
----------------------------------------------------------------------
CONJUNCTS (Drule)
----------------------------------------------------------------------
CONJUNCTS : (thm -> thm list)
SYNOPSIS
Recursively splits conjunctions into a list of conjuncts.
KEYWORDS... |
---
title: How you should allow elevated users enter and exit the service portal
description: Out-of-the-box ServiceNow isn't great for allowing elevated users to jump in and out the service portal, but it's easily fixed with some small changes.
date: 2020-12-26
tags:
- ServiceNow
- Solution
- Opinion
eleventyExcludeFr... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Number Theory</title>
<link rel="stylesheet" href="styles.css">
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
</script>
<script type="t... |
import React, { useState } from "react";
import data from "../data/data"; // Import your JSON data
const FilterEmployees = ({ onFilter }) => {
const [searchTerm, setSearchTerm] = useState("");
const [isFiltering, setIsFiltering] = useState(false);
const handleSearch = (e) => {
const term = e.target.value;
... |
import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'
import { ConfigType } from '@nestjs/config'
import { apiConfig } from '@/config'
import { Logger, ValidationPipe } from '@nestjs/common'
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
import {
ProcessTimeInterceptor,... |
package model;
import javax.persistence.*;
import java.util.List;
import static javax.persistence.GenerationType.IDENTITY;
/**
* Clase que representa los Monitores disponibles en el gimnasio
*/
@Entity
@Table(name="monitor")
public class Monitor {
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = ... |
import { Resolver, Query, Mutation, Args } from '@nestjs/graphql';
import { UsersService } from './users.service';
import { CreateUserInput } from 'src/graphql';
@Resolver('User')
export class UsersResolver {
constructor(private readonly usersService: UsersService) {}
@Mutation('createUser')
create(@Args('creat... |
#pragma once
#include "../config.h"
#include <functional>
#include <any>
#include <tuple>
CGULL_NAMESPACE_START
CGULL_GUTS_NAMESPACE_START
//! Function return value tagging
struct return_tag {};
struct return_auto_tag : return_tag {};
struct return_void_tag : return_tag {};
struct return_any_tag : return_tag {};
... |
import { browser } from '$app/environment';
import { parse } from 'node-html-parser';
import { format } from 'date-fns';
import readingTime from 'reading-time';
import type { Post } from '$lib/types';
if (browser) {
throw new Error(`Posts should only be generated server-side`);
}
// Get all posts' metadata
export co... |
= Operator Board
An operator board helps Network Operations Centers (NOCs) visualize network monitoring information.
You can use and arrange customizable dashlets to display different types of information (alarms, availability maps, and so on) on the board.
You can also create multiple operator boards and customize th... |
using PizzaPlace.Models;
using PizzaPlace.Pizzas;
namespace PizzaPlace.Factories
{
/// <summary>
/// Produces pizza on one giant revolving surface.Downside is, that all
/// pizzas must have the same cooking time, when prepared at the same time.
/// </summary>
public class GiantRevolvingPizzaOven(T... |
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/foundation/key.dart';
import 'package:flutter/src/widgets/framework.dart';
class AdviceField extends StatelessWidget {
final String advice;
const AdviceField({Key? key, required this.advice}) : super(key: k... |
use crate::lan_api::LanDiscoArguments;
use crate::platform_api::GoveeApiArguments;
use crate::service::hass::HassArguments;
use crate::undoc_api::UndocApiArguments;
use clap::Parser;
use std::str::FromStr;
mod ble;
mod cache;
mod commands;
mod hass_mqtt;
mod lan_api;
#[macro_use]
mod platform_api;
mod rest_api;
mod se... |
import { ErrorLogMetrics, ErrorLogReport } from '../types';
export class ErrorReportComposer {
/**
* Creates a report based on the collected metrics.
* @param {ErrorLogMetrics} metrics
* @return {ErrorLogReport}
*/
public createReport(metrics: ErrorLogMetrics): ErrorLogReport {
return {
total... |
class PlaylistsController < ApplicationController
include Search
before_action :certificated
before_action :authorized, except: %i[index show]
before_action :input_playlist, except: %i[index index_favorited create]
def index
playlists = fileter_playlists
playlists = apply_term(playlists)
apply_or... |
package com.csot.recruit.controller.campus;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.uti... |
import 'package:flutter/material.dart';
import 'package:flutter_travel_guide_dashborad/core/constant/style.dart';
class DropDownTextField extends StatefulWidget {
final String hintText;
final List<String> options;
final void Function(String?) onChanged;
final String? selectedOption;
final Function? addClicke... |
const {
MessageEmbed,
MessageActionRow,
MessageSelectMenu,
CommandInteractionOptionResolver,
Collection
} = require('discord.js');
const {getClosest, getUserSettings, jsonParse, translate, untranslate} = require('../util');
const fs = require('fs');
const PagedEmbed = require('../util/PagedEmbed');
... |
import classNames from 'classnames';
import React, { ComponentProps, FC } from 'react';
interface InputProps extends ComponentProps<'input'> {
fullWidth?: boolean;
}
export const Input: FC<InputProps> = ({ fullWidth = true, ...rest }) => {
return (
<input
{...rest}
className={classNames(
'... |
package ru.transservice.routemanager.ui.routesettings
import android.os.Bundle
import android.view.*
import androidx.appcompat.widget.SearchView
import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import androidx.navigation.Navigation
import androidx.navigation.fragment.navArgs
import androi... |
/*
* Copyright (c) 2021 Huawei Device 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 ... |
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ATHENAPOOLTEST_LARCELLCONTFAKEREADER_H
#define ATHENAPOOLTEST_LARCELLCONTFAKEREADER_H
/**
* @file LArCellContFakeReader.h
*
* @brief Test Algorithm for POOL I/O uses CaloCellContainer as test
* data
*
* @author RD Schaffer <... |
package com.example.diplom.rdb;
import com.example.diplom.entity.User;
import com.example.diplom.form.UserRegistrationForm;
import com.example.diplom.rdb.repository.UserRepository;
import com.example.diplom.service.UserService;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframe... |
import {
BadRequestException,
CanActivate,
ExecutionContext,
Injectable,
UnauthorizedException,
} from '@nestjs/common';
import { Observable } from 'rxjs';
import { InfToken } from 'src/share/interfaces/InfToken';
import { validationNullORUndefined } from 'src/share/utils/validation.util';
import { TokenServi... |
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.uix.button import Button
from kivy.uix.checkbox import CheckBox
from kivy.uix.image import Image
from kivy.uix.textinput import TextInput
from kivy.graphics import Color, Rectangle, Ellipse
from ... |
package com.lym.springboot.springbootaop.advice;
import com.lym.springboot.springbootaop.annotation.LoggerManage;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.as... |
from django.urls import path, include
from media_manager.views import media as media_view
from media_manager.views import notifications as notification_view
from media_manager.views import source as source_view
media_urlpatterns = [
path('', media_view.list_media, name="list_media"),
path('videos/', media_vie... |
package com.itheima.stock.controller;
import com.itheima.stock.pojo.domain.*;
import com.itheima.stock.service.StockService;
import com.itheima.stock.vo.resp.PageResult;
import com.itheima.stock.vo.resp.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.Get... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { AuthModule } from '@auth0/auth0-angular';
import { environment as env } from '../environments/environmen... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>clustery.js 高兴能的滚动列表</title>
<script src="./lib/vue.js" charset="utf-8"></script>
<style>
* { padding: 0; margin: 0; }
html, body, #app { height: 100%; }
li { list-style: none; }
.wrapper { height: 600px; overflow: auto; }
.list-it... |
import SwiftUI
struct IngredientDropdown: View {
@Binding var selectedIngredient: Ingredient?
var dropDownList: [Ingredient]
init(selectedIngredient: Binding<Ingredient?> = .constant(nil), dropDownList: [Ingredient]) {
self._selectedIngredient = selectedIngredient
self.dropDownList = d... |
package Guvi_Task_9;
import java.util.Scanner;
public class StringReversal
{
// Method to reverse a given string
public static String reverseString(String inputString) {
// Create a StringBuilder to build the reversed string
StringBuilder reversed = new StringBuilder();
// It... |
<template>
<div
:class="[
isRanking ? 'col-xl-4 col-md-6 col-11' : 'col-xl-3 col-lg-4 col-md-6 col-11'
]"
class="mx-auto d-block">
<div class="spot_card">
<RouterLink :to="`/spots/${spot.id}`">
<div class="spot_card_img">
<i... |
import pandas as pd
import altair as alt
titanic = pd.read_csv("../../data/titanic.csv")
titanic.dropna(subset = ["Embarked"], inplace=True)
print(titanic.info())
# shneidermans mantra
# overview first, zoom and filter, details on demand
# titanic: age against fare price
# bar of embarkation
selection = alt.sele... |
import Card from "./Finance/Card";
import Atm from "./Atm/Atm";
import BalanceReceipt from "./Atm/Receipts/BalanceReceipt";
import WithdrawalReceipt from "./Atm/Receipts/WithdrawalReceipt";
import ItemEnum from "./Enums/ItemEnum";
import History from "./History";
export default class User {
private cash = 0;
priva... |
"""Module for handling stellar intensity data from stellar_intens files."""
from pathlib import Path
import astropy.io.fits as pyfits
import numpy as np
from astropy.units import Quantity
from lod_unit import lod
from scipy.interpolate import CubicSpline
from .util import convert_to_lod
class StellarIntens:
""... |
package com.mycom.joytrip.user.service;
import java.util.List;
import javax.servlet.http.HttpSession;
import org.mindrot.jbcrypt.BCrypt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mycom.joytrip.board.dao.BoardDao;
import com.mycom.joytrip... |
const express = require("express");
require("dotenv").config();
const cors = require("cors");
const axios = require("axios");
const app = express();
app.use(cors());
app.get("/", async (req, res) => {
try {
const response = await axios.get(
`https://api.themoviedb.org/3/discover/movie?include_adult=false&... |
# Event Planner
A (Very) Simple CLI Event Planner written in Python
## Installation
Installation is very simple you just have to download `event-planner.py` and have Python 3.x installed.
## Usage
```bash
python3 event-planner.py
```
**NOTE:** `event-planner.py` creates a file called `.dates` where it stores dates ... |
package application;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Scanner;
import entities.Employee;
public class Program {
public static void main(String[] args) {
Locale.setDefault(Locale.US);
Scanner sc = new Scanner(System.in);
List<Employee> list = new Arra... |
import { HttpAdapterHost, NestFactory } from '@nestjs/core';
import { ConfigService } from '@nestjs/config';
import { ValidationPipe, Logger } from '@nestjs/common';
import { AppModule } from './app.module';
import { PrismaClientExceptionFilter } from 'nestjs-prisma';
async function bootstrap() {
const app = await N... |
package com.example.demo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
i... |
package me.zhengjie.modules.merchant.service;
import cn.hutool.core.collection.CollUtil;
import lombok.AllArgsConstructor;
import me.zhengjie.modules.merchant.domain.Project;
import me.zhengjie.modules.merchant.domain.ProjectSchedule;
import me.zhengjie.modules.merchant.domain.vo.ScheduleCommand;
import me.zhengjie.mo... |
import React, { useState, useEffect, useRef, useMemo } from 'react';
import {Text, TouchableOpacity, StyleSheet, View, FlatList} from 'react-native';
import { windowHeight, windowWidth } from '../utils/Dimensions';
import Ionicons from 'react-native-vector-icons/Ionicons';
import MapView, { Marker, PROVIDER_GOOGLE } fr... |
import type { Address, Client } from "viem"
import {
type AccountsParameters,
accounts
} from "../../actions/stackup/accounts"
import {
type SponsorUserOperationParameters,
type SponsorUserOperationReturnType,
sponsorUserOperation
} from "../../actions/stackup/sponsorUserOperation"
import type { Ent... |
import React, { useState, useRef, useEffect } from 'react';
// JS
// const input = document.getElementById('myText');
// const inputValue = input.value
// React
// value, onChange
//*** dynamic object keys => IMPORTANT ([name]: value)
const ControlledInputs = () => {
// const [firstName, setFirstName] = useState('')... |
package geometrica;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<formaGeometrica> formas = new ArrayList<>();
formas.add(new Retangulo(5, 10));
formas.add(new Circulo(4));
formas... |
package com.grofers.Entity;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.validation.constraints.Min;
import jakarta.vali... |
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AuthController;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register ... |
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: 'welcome',
loadChildren: () => import('./welcome').then((i) => i.WelcomeModule),
},
{
path: 'not-found',
loadChildren: () => import('./not-found').then((i) => i.NotFo... |
const { request, response } = require('express');
const bcryptjs = require('bcryptjs');
const Empresa = require('../models/empresa');
const { generarJWT } = require('../helpers/generar-jwt');
const login = async( req = request, res = response ) => {
const { correo, password } = req.body;
try {
... |
import React, { Component } from 'react';
class ForceUpdateExample extends Component {
constructor(props) {
super(props);
// state 정의
this.loading = true;
this.formData = 'no data';
this.handleData = this.handleData.bind(this);
setTimeout(this.handleData, 4000);
}
handleData() {
c... |
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Requests\PostStoreRequest;
use App\Http\Requests\PostUpdateRequest;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Storage;
use App\Post;
use App\Category;
use App\Tag;
class PostController extends Controlle... |
<!DOCTYPE html>
<script type="importmap">
{
"imports": {
"vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.prod.js"
}
}
</script>
<div id="app" class="mx-auto dark">
<div class="flex items-center mt-4 px-8 py-4 overflow-x-auto whitespace-nowrap bg-white rounded-lg shadow-md d... |
from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth import password_validation, get_user_model, authenticate
from django.contrib.auth.forms import UsernameField, ReadOnlyPasswordHashField
from django.utils.translation import gettext_lazy as _
from django.utils.text impor... |
// imports
import IApiResponse from '../../Interfaces/WAQI/IApiResponse';
import IWeatherData from '../../Interfaces/WAQI/IWeatherData';
import ApiResponseException from '../../../Utils/Exceptions/Model/ApiResponseException';
/**
* ApiResponse class
*/
export default class ApiResponse implements IApiResponse {
// #... |
package com.day27;
import java.util.Arrays;
import java.util.List;
@SuppressWarnings("serial")
class InvalidMonthException extends Exception{
public InvalidMonthException(String msg) {
super(msg);
}
}
class MonthCheck {
List<String> monthList = Arrays.asList("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Se... |
###### Chapter 14 Principal components and factor analysis
####
# two related but distinct ways for exploring and simplifing complex multivariate
# data are principal components and exploratory factor analysis
# principal components analysis is a data-reduction technique that transforms a
# a larger number of ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.