text stringlengths 184 4.48M |
|---|
<?php
namespace Oro\Bundle\SaleBundle\Tests\Unit\Quote\Shipping\Context\LineItem\Factory;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ManagerRegistry;
use Oro\Bundle\CurrencyBundle\Entity\Price;
use Oro\Bundle\ProductBundle\Entity\Product;
use Oro... |
# Week 5
## React. Next.JS/SSR/SSG
### Disclaimer:
In this task you going to use Next.js Pages API instead of brand-new APP dir API. The main motivation of it is stability and wide community around this solution. Pages API still supportable by Next.JS team. This decision will help you avoid unnecessary problems and q... |
RAM struktura
00h _______________________ 80h
|___BANK0___|___BANK1___|
| INDF |
| TMR0 | OPTION |
| PLC |
| STATUS |
| FSR |
| PORTA | TRISA |
| PORTB | TRISB |
| |
| EEDATA | EECON1 |
| EEADR | EECON2 |
| PCLATH |
|________INTCON_________|
| |
| 68 bajtova |
... |
import React, { Component } from 'react';
import Table from './common/table';
import Like from "./common/like";
import {Link} from "react-router-dom";
class MoviesTable extends Component {
columns = [
{
path: 'title',
lable: 'Title',
content: movie => <Link to={`/movies/${movie._... |
/* Chapter 21 */
-- 1
SELECT Color
,SUM(CASE WHEN YEAR(SaleDate) = 2015 THEN SD.SalePrice
ELSE NULL END) AS '2015'
,SUM(CASE WHEN YEAR(SaleDate) = 2016 THEN SD.SalePrice
ELSE NULL END) AS '2016'
,SUM(CASE WHEN YEAR(SaleDate) = 2017 THEN SD.SalePric... |
// filename : guest.h
#include <iostream>
#include <algorithm>
#include "date.h"
using namespace std;
#ifndef GUEST_H
#define GUEST_H
class Guest {
public:
/**
* 构造函数
* @param id_card 身份证
* @param chick_in_date 入住时间
* @param name 名称
* @param gender 性别(男性为0, 女性为1)
*/
Guest ... |
using System;
using System.Collections.Generic;
using System.Linq;
using Cells;
using Cells.Components;
using UnityEngine;
namespace GameGrid
{
public static class GridShiftExtensions
{
public static Direction GetTurnDirection(this Grid grid, Cell cell)
{
var indexOfA = grid.IndexO... |
package memberservice.member.aop;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Aspect // <- AOP
@Component // -> 컴포넌트 스... |
/*
-----------CONSIGNA PRIMER PARCIAL----------------------------------
Crear un algoritmo que represente un contador binario,
el primer led(que se encuentra a la izq) es el mas significativo
los valores van de 0 a 15.
---------------------------------------------------------------------
*/
#define B3 1... |
import React from 'react';
import { Typography, type TypographyProps } from '@mui/material';
import { type Variant } from '@mui/material/styles/createTypography';
export type VariantType =
| 'heading1'
| 'heading2'
| 'heading3'
| 'heading4'
| 'heading5'
| 'heading6'
| 'bodyCopyXLHeavy'
| 'bodyCopyLHeav... |
import React from 'react';
import { useDarkMode } from '../../context/DarkModeContext';
import styles from './Header.module.css';
import { MdDarkMode, MdOutlineLightMode } from 'react-icons/md';
export default function Header({ filters, filter, onFilterChange }) {
const { darkMode, toggleDarkMode } = useDarkMode();
... |
package com.icss.etc.Service;
import com.icss.etc.pojo.CommonResult;
import com.icss.etc.pojo.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathV... |
/*
* This file is part of the Robot Learning Lab SDK
*
* Copyright (C) 2020 Mark Weinreuter <mark@student.kit.edu>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of th... |
import 'package:flutter/material.dart';
class CustomSliderWidget extends StatefulWidget {
final double height;
final double width;
const CustomSliderWidget({super.key,this.height=300,this.width=90});
@override
State<CustomSliderWidget> createState() => _CustomSliderWidgetState();
}
class _CustomSliderWidget... |
<?php
namespace SergiX44\Nutgram\Handlers\Listeners;
use InvalidArgumentException;
use SergiX44\Nutgram\Exception\ApiException;
use SergiX44\Nutgram\Handlers\CollectHandlers;
use SergiX44\Nutgram\Handlers\Handler;
use SergiX44\Nutgram\Telegram\Properties\UpdateType;
/**
* @mixin CollectHandlers
*/
trait SpecialLis... |
import 'package:cloud_firestore/cloud_firestore.dart';
class UserRecord {
final String uid;
final String username;
final String gender;
final String photoUrl;
UserRecord({
required this.uid,
required this.username,
required this.gender,
this.photoUrl = '',
});
Map<String, dynamic> toJso... |
import { useEffect, useRef } from "react";
const useClickOutSide = (callBack) => {
const ref = useRef();
useEffect(() => {
console.log(ref);
const handleClick = (e) => {
if (ref.current && !ref.current.contains(e.target)) {
callBack();
}
};
document.addEventListener("click", han... |
import { View, Text, StyleSheet, Pressable, TouchableOpacity } from 'react-native';
import React, { useState, useEffect } from 'react';
import { useNavigation } from '@react-navigation/native';
import { firebase } from '../config';
import { FlashList } from '@shopify/flash-list';
import { Entypo } from '@expo/vector-ic... |
import express, {Application} from 'express';
import cors from "cors";
import userRoutes from "../routes/usuario";
import db from '../db/connection';
class Server {
private app: Application;
private port: String;
private apiPaths = {
usuarios: '/api/usuarios'
}
constructor(){
... |
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is avail... |
from prophet import Prophet
from pyspark.sql.functions import *
from pyspark.sql.types import *
import pandas as pd
from sklearn.metrics import mean_squared_error, mean_absolute_error
from math import sqrt
class DBUForecaster():
"""
Class for DBU Forecasting
"""
def __init__(self, forecast_periods=7, int... |
# 设计模式
## 1 类与类之间的关系
* 关联关系(单向关联、双向关联、自关联):是对象之间的一种引用关系,用于表示一类对象与另一类对象之间的联系
* 例如老师和学生、师傅和徒弟
* 带箭头的实线
* 聚合关系:强关联关系,整体和部分之间的关系,但是成员对象可以脱离整体对象而独立存在
* 例如学校与老师的关系,学校包含老师,但是学校停办了,老师依然存在
* 带空心菱形的实线,菱形指向整体
* 组合关系:更强烈的聚合关系,整体对象控制部分对象的生命周期,部分对象不能脱离整体对象而存在
* 例如头和嘴的关系,没有了头,嘴也就不存在了
* 带实心菱形的实线,菱形指向整体
* 依赖关系:使用关系,是对象之间耦... |
import Color from 'color';
import { Sprite, Texture } from 'pixi.js';
import { IHistoryTarget } from './History';
export default class Layer implements IHistoryTarget {
canvas: HTMLCanvasElement;
texture: Texture;
sprite: Sprite;
ctx: CanvasRenderingContext2D;
destroyed = false;
width: number = 0;
height: numbe... |
<!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>CSS Clear</title>
<style>
.div1 {
float: left;
padding: 10px;
backg... |
<script setup lang="ts">
import { getData } from '@/firebase/firestore';
import type { ExpenseGroup } from '@/types';
import { getFirestore, updateDoc } from 'firebase/firestore';
import { onBeforeMount, ref, defineProps, defineEmits } from 'vue';
import { NButton } from 'naive-ui'
import type { User } from 'firebase/a... |
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
**************... |
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:kistler/core/app_utils/app_utils.dart';
import 'package:kistler/core/image_constant/images.dart';
import 'package:kistler/generated/locale_keys.g.dart';
import 'package:kistler/presentaion/bottom_nav_scree... |
syntax = "proto3";
import "google/protobuf/timestamp.proto";
option java_multiple_files = true;
option java_package = "cs236351.transactionManager";
package cs236351.transactionManager;
enum ResponseEnum {
SUCCESS = 0;
FAILURE = 1;
}
message Response {
ResponseEnum type = 1;
string message = 2;
}
message ... |
const axios = require('axios');
const bd = require('./database/models');
async function chargeData(){
try {
const response = await axios.get('https://restcountries.com/v3.1/all');
const countries = response.data;
for (const country of countries) {
if (country && typeof country =... |
/*******************************************************************************
* Copyright (c) 2010, 2016 EclipseSource and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and ... |
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Debian Security Advisory DLA-200-1. The text
# itself is copyright (C) Software in the Public Interest, Inc.
#
include("compat.inc");
if (description)
{
script_id(82805);
script_version("$Revisi... |
import { useState } from "react";
import PropTypes from "prop-types"; // typechecking of proptypes
const containerStyle = {
display: "flex",
alignItems: "center",
gap: "20px",
};
const starsContainerStyle = { display: "flex" };
StarsRating.propTypes = {
maxRating: PropTypes.number,
colorStar: PropTypes.stri... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import sympy as sp
import numpy as np
from scipy.integrate import odeint
from scipy.integrate import solve_ivp
from torch.utils.data import Dataset, DataLoader
from torch.optim.optimizer import Optimizer
import pandas as pd
import matplotlib.pyplot as p... |
import React, { useState, useRef, useEffect } from "react";
import {
Button,
Checkbox,
Divider,
FormControlLabel,
Grid,
InputLabel,
OutlinedInput,
Stack,
Typography,
Container,
} from "@mui/material";
const Webcam = ({ onCapture }) => {
const [stream, setStream] = useState(null);
const videoRef... |
---
layout: post
title: "Logistic Regression"
date: 2021-07-06 2:14:54 +0700
categories: MachineLearning
---
# TOC
- [Definition](#define)
- [Maximum likelihood](#maxili)
- [Stochastic gradient descent ](#sgrad)
- [Code example](#code)
# Definition <a name="define"></a>
Remind us a bit about linear regression:
$... |
import json
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.db import IntegrityError
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.shortcuts import render
from django.urls import reverse
from django.... |
import { z } from "zod";
import {
createTRPCRouter,
protectedProcedure,
publicProcedure,
} from "~/server/api/trpc";
export const postRouter = createTRPCRouter({
/*
This fetches the latest 20 posts from the database. The posts are sorted by
the latest post date. This is used to display the home feed.... |
/*
* 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 agreed to in writing, software distributed under t... |
class Shape {
protected String name;
public Shape next; // Linked list인가 보다...
public Shape() {next = null;} // 생성자 ==> 필드 초기화
public void paint() {
draw();
}
public void draw() {
System.out.println(name);
}
}
class Line extends Shape {
@Override
public void draw(... |
import { useState } from 'react';
export const useFilters = () => {
const [filters, setFilters] = useState([
{ label: 'All', param: 'all', active: true },
{ label: 'Active', param: 'active', active: false },
{ label: 'Completed', param: 'completed', active: false },
]);
const selectFilter = (filterI... |
package sync
import (
"context"
"fmt"
"log"
"os"
"path/filepath"
"github.com/google/uuid"
"github.com/humanbeeng/lepo/server/internal/git"
"github.com/humanbeeng/lepo/server/internal/sync/extract"
"github.com/humanbeeng/lepo/server/internal/sync/extract/golang"
"github.com/humanbeeng/lepo/server/internal/sy... |
/***************************************************************************
Parameter.h - description
-------------------
* A parameter - a named value (or array of values) with a type and
* (optional) units.
* A parameter's type may be set explicitly or by by setting its value(s).
* A parameter value set as ... |
import React from "react";
import ReactDOM from "react-dom";
import {
property,
BrickWrapper,
UpdatingElement,
method,
} from "@next-core/brick-kit";
/**
* @id basic-bricks.general-timer
* @name basic-bricks.general-timer
* @docKind brick
* @description 启动一个定时发出指定事件的定时器
* @author cyril
* @slots
* @histo... |
// Returns the natural logarithm of a number.
// @param {Number} $x
// @example
// log(2) // 0.69315
// log(10) // 2.30259
@function log ($x) {
@if $x <= 0 {
@return 0 / 0;
}
$k: nth(frexp($x / $SQRT2), 2);
$x: $x / ldexp(1, $k);
$x: ($x - 1) / ($x + 1);
$x2: $x * $x;
$i: 1;... |
package com.mplayer.musicplayer.mp3player.playsongs.offlineonlineaudio.app.adapter.song;
import android.view.View;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.bumptech.glide.Glide;
import co... |
// Project 4
// CS 2413 Data Structures
// Spring 2023
#include <iostream>
#include <vector> // for array of transactions and array of blockChains
#include <list> // for array of blocks
using namespace std;
// this class is simple data type of class
//just complete the structure of a transaction object
class tran... |
# **DNS Proxy**
## What is The DNSProxy?
A DNS proxy, also known as a DNS forwarder or a DNS resolver, is an intermediary server that sits between client devices and DNS servers. Its primary function is to handle DNS queries and forward them to appropriate DNS servers for resolution.
When a client device sends a DNS... |
package com.littleye233.days.compose.home
import android.annotation.SuppressLint
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation... |
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>HTML5 WebGL粒子爆炸动画DEMO演示</title>
<style>
body{
margin:0px;
overflow: hidden;
}
canvas{
margin:0px;
position:absolute;
}
</style>
</head>
<body>
<canvas id="c"></canvas>
//片段着色器
<script id="shader-fs" type="x-sha... |
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:weather_sample_app/features/weather/Screens/home_screen.dart';
import 'package:weather_sample_app/features/weather/Screens/hourly_screen.dart';
import 'package:weather_sample_app/features/weather/Screens/weekly_screen.dart'... |
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using FluentValidation;
using MediatR;
using ValidationException = Ordering.Application.Exceptions.ValidationException;
namespace Ordering.Application.Behaviors
{
public class ValidationBehaviour<TRequest, T... |
import { ApiProperty } from '@nestjs/swagger';
import { Expose, Transform, Type } from 'class-transformer';
import { LineString } from 'geojson';
import { SettlementSerializer } from 'src/modules/settlements/serializers/settlement.serializer';
import { RideEntity } from '../db/ride.entity';
export class RideSerializer... |
const fs = require('fs-extra')
const archiver = require('archiver')
const outputZipPath = './out/archive.zip' // Specify the 'out' directory
async function zipFiles() {
try {
// Create the 'out' directory if it doesn't exist
await fs.ensureDir('./out')
// Create a new zip archive
const archive = ar... |
/** @format */
/**
* External dependencies
*/
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Gridicon from 'gridicons';
import { localize } from 'i18n-calypso';
import { flowRight, get } from 'lodash';
import { connect } from 'react-redux';
/**
* Internal dependencies
*/
imp... |
package dev.jason.harmony.slashcommands.music;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jdautilities.command.SlashCommandEvent;
import com.jagrosh.jlyrics.LyricsClient;
import com.jason.harmony.Bot;
import com.jason.harmony.audio.AudioHandler;
import dev.jason.harmony.slashcommands.Musi... |
import React, {useState} from 'react'
import { Link } from "react-router-dom";
import menu from "../public/menuicon.png"
function Navbar() {
const [visible, setVisible] = useState("right-[100%]");
console.log(visible);
function menuClick() {
if (visible) {
setVisible("");
} else if (visible === ... |
/* fira code font family */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;500&display=swap');
/*
Variables
*/
:root {
--primaryColor: #f15025;
--mainBlack: #222;
--mainWhite: #fff;
--offWhite: #f7f7f7;
--darkGrey: #afafaf;
--mainTransition: all 0.3s linear;
--mainSpacing: 0... |
using API_Webshop_MSPR.Services;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using System.Text;
namespace API_Webshop_MSPR
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configur... |
import { Block, BlockNoteEditor, PartialBlock } from '@blocknote/core';
import '@blocknote/core/fonts/inter.css';
import { BlockNoteView } from '@blocknote/react';
import '@blocknote/react/style.css';
import { saveAs } from 'file-saver';
import htmlToPdf from 'html-to-pdf';
import { useEffect, useMemo, useState } from ... |
import 'package:e_commerce/book/constant.dart';
import 'package:e_commerce/book/models/product.dart';
import 'package:e_commerce/book/screens/home/components/item_card.dart';
import 'package:flutter/material.dart';
class Body extends StatelessWidget {
const Body({Key? key}) : super(key: key);
@override
Widget b... |
import React, { Dispatch, SetStateAction, useState } from 'react';
export type AppState = {
theme?: 'dark' | 'light';
setTheme?: Dispatch<SetStateAction<'dark' | 'light'>>;
};
export const useAppState = (): AppState => {
const [theme, setTheme] = useState<'light' | 'dark'>('dark');
return {
theme,
se... |
<script setup xmlns="http://www.w3.org/1999/html">
import SymphonyLayout from "@/Layouts/SymphonyLayout.vue";
import {Link, useForm} from "@inertiajs/vue3";
import {Icon} from "@iconify/vue";
import Post from "@/Components/Symphony/Post/Post.vue";
import {ref} from "vue";
import MainModal from "@/Components/Symphony/M... |
<template>
<div>
<v-container>
<v-row>
<v-col cols="12" md="9" class="mt-8">
<v-card>
<v-card-title>
Editar Usuario
<v-spacer></v-spacer>
<v-text-field
... |
import React, { useState, useEffect } from 'react'
// MUI
import Avatar from '@mui/material/Avatar'
import Box from '@mui/material/Box'
import Button from '@mui/material/Button'
import Checkbox from '@mui/material/Checkbox'
import Container from '@mui/material/Container'
import FormControlLabel from '@mui/material/For... |
package it.unisa.tirocinio.gazzaladra.data;
import android.os.Parcel;
import android.os.Parcelable;
public class KeyPressData implements Parcelable {
public long timeEvent;
public long relativeToStartTimeEvent;
public String activityId;
public String fragmentId;
public String keyCode;
public String position;
p... |
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.s... |
import {
Container,
ContextHeader,
ContextHeaderLabelSection,
ContextHeaderTopSection,
} from '@acpaas-ui/react-editorial-components';
import {
AlertContainer,
DataLoader,
LoadingState,
RenderChildRoutes,
useNavigate,
useWillUnmount,
} from '@redactie/utils';
import React, { FC, ReactElement, useEffect, useMe... |
import React, { useState } from 'react';
type Props = {
className?: string;
onChange?: (value: boolean) => void;
defaultValue?: boolean;
on?: React.ReactNode;
off?: React.ReactNode;
};
const ToggleButton = ({ className, onChange, defaultValue, on, off }: Props) => {
const [value, setValue] = useState<bool... |
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</tit... |
import Loan from "./loan";
const INTEREST_FOR_CAR = 4;
const INTEREST_FOR_COMPUTER = 6;
const INTEREST_FOR_PHONE = 8;
export default class ConsumerLoan extends Loan {
itemType: string;
constructor (loanSize: number, period: number, itemType: string) {
super(loanSize, period);
this.itemType = ... |
"""
https://catalog.data.gov/dataset/motor-vehicle-collisions-crashes
Name:John Valencia-Londono
Date:12/4/2023
Assignment:Module14: Dask Large Dataset
Due Date:12/3/2023
About this project:
Demonstrate knowledge of distributed computing by using the Dask library to compute
Data Sets and fetch Series to compute aggrega... |
//#region Imports
import { NotFoundException, Param, Put } from '@nestjs/common';
import { ApiNotFoundResponse, ApiOkResponse, ApiOperation } from '@nestjs/swagger';
import { CrudRequest, ParsedRequest } from '@nestjsx/crud';
import { ProtectTo } from '../decorators/protect/protect.decorator';
import { BaseEntity } f... |
#ifndef OBJECTFACTORY_H
#define OBJECTFACTORY_H
#include <string>
#include <unordered_map>
#include <memory>
template<class MyClass, typename ...Argtype>
void* __createObjFunc(Argtype... arg)
{
return new MyClass(arg...);
}
#ifndef REFLECT_REGISTER
#define ReflectRegister(MyClass, ...)\
static int __type##MyCl... |
// Copyright 2004-2014, North State Software, LLC. All rights reserved.
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later ver... |
package com.day3.learning;
import java.util.Objects;
import java.util.TreeSet;
class Person implements Comparable<Person> {
private int id;
private String name;
private int age;
private double salary;
public Person(int id, String name, int age, double salary) {
this.id = id;
this.name = name;
this.age = a... |
package com.austinv11.dartcraft2.api;
import net.minecraft.item.ItemStack;
import java.util.EnumSet;
import java.util.List;
/**
* This interface represents an armor piece which can be infused with upgrades
* <b>This MUST be implemented on the item class itself</b>
*/
public interface IForceArmor {
/**
* The ... |
package com.tycoding.dictionary.feature_dictionary.data.remote.dto
import com.tycoding.dictionary.feature_dictionary.domain.model.Definition
data class DefinitionDto(
val antonyms: List<String>,
val definition: String,
val example: String?,
val synonyms: List<String>
) {
fun toDefinition(): Defini... |
export function getById<T extends HTMLElement>(id: string): T {
const el = document.getElementById(id);
if (!el) {
throw new ReferenceError(id + " is not defined");
}
return el as T;
}
export function strcmp(a: string, b: string): number {
if (a < b) {
return -1;
}
if (a > b... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
<!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>
<style>
/* universal selctor (it applies to all tag) */
*
{
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.14"></script>
<div id="app">
<h1>書架</h1>
<ul>
<... |
---
title: 다음에 올 숫자
date: 2022-10-21 18:24:00 +09:00
categories: ["프로그래머스", "입문"]
tags: ["programmers"]
---
[https://school.programmers.co.kr/learn/courses/30/lessons/120924](https://school.programmers.co.kr/learn/courses/30/lessons/120924)
## 📔 문제 설명
등차수열 혹은 등비수열 common이 매개변수로 주어질 때, 마지막 원소 다음으로 올 숫자를 return 하도록 s... |
#ifndef _IN_CSP_ADAPTERS_PARQUET_ArrowSingleColumnArrayBuilder_H
#define _IN_CSP_ADAPTERS_PARQUET_ArrowSingleColumnArrayBuilder_H
#include <csp/adapters/parquet/ParquetStatusUtils.h>
#include <csp/core/Exception.h>
#include <csp/core/Time.h>
#include <csp/engine/Struct.h>
#include <arrow/builder.h>
#include <string>
#... |
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:equatable/equatable.dart';
class Product extends Equatable {
final String name;
final String category;
final String imageUrl;
final double price;
final bool isRecommended;
final bool isPopular;
const Product({
required this.name,... |
#!/usr/bin/env python
# coding: utf-8
# In[2]:
print('programa iniciado: SAM')
# In[12]:
print('1')
import numpy as np
print('2')
import sklearn
print('3')
import tensorflow
print('4')
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv1D, MaxPooling1D, Flatten, Dense
from skle... |
import { pipe } from "fp-ts/function"
import * as A from "fp-ts/Array"
/* Imported inline from fp-ts-std */
/**
* Merge two records together. For merging many identical records, instead
* consider defining a semigroup.
*
* @example
* import { merge } from 'fp-ts-std/Struct'
*
* assert.deepStrictEqual(merge({ a... |
# Dibujar primitivos
Existen varias formas de dibujar primitivos utilizando giftags y
primitive data
## Forma más fácil de dibujar.
No especificar campo REGS, dejarlo simplemente en GIF_REG_AD y
utilizar NLOOP para indicar la cantidad de data que se va a leer.
Luego cada qword tiene que indicar el tipo de data leída... |
package com.example.slawcio.lab1;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.Drawe... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cloud Vision Demo</title>
<style type="text/css">
pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }
.string { color: green; }
.number { color: darkorange; }
.boolean { color: blue; }
... |
import '../styles/globals.css';
import '@rainbow-me/rainbowkit/styles.css';
import type { AppProps } from 'next/app';
import { ThemeProvider } from '../components/theme-provider';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { WagmiProvider } from 'wagmi';
import {
arbitrum,
ba... |
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Scanner;
import java.util.stream.IntStream;
public class DictionaryManagement {
private final Dictionary dictionary;
publi... |
package com.stan.demo;
import java.util.Arrays;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
import com.stan.demo.model.Product;
import com.stan.demo.repository.ProductReposito... |
import { useEffect, useState } from "react";
import type { NextPage } from "next";
import styles from "@/styles/table.module.scss";
import { useRouter } from "next/router";
import { IUserBoxes } from "@/interfaces/box-items.interface";
import {
IPokemonData,
IPokemonDetail,
} from "@/interfaces/pokemon-detail.inter... |
class JSONNodeParsableSpecs: QuickSpec {
override func spec() {
describe("calls init(path)") {
context("with name only string") {
let jsonNode = JSONNode(path: "node")
it("returns JSONNode with name") {
expect(jsonNode?.name) == "node"
... |
package com.subskill.service;
import com.subskill.dto.MicroSkillDto;
import com.subskill.enums.Level;
import com.subskill.enums.Tags;
import com.subskill.models.MicroSkill;
import com.subskill.models.Technology;
import com.subskill.repository.MicroSkillRepository;
import lombok.extern.slf4j.Slf4j;
import org.junit.jup... |
package com.adnanarch.securedoc.service.impl;
import com.adnanarch.securedoc.exception.ApiException;
import com.adnanarch.securedoc.service.EmailService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.S... |
"use client";
import Link from "next/link";
import React, { useEffect, useState } from "react";
import { twMerge } from "tailwind-merge";
type Props = {};
export const Header = (props: Props) => {
const [scrollTop, setScrollTop] = useState(0);
const [openMenu, setOpenMenu] = useState(false);
const scrollOffset ... |
from discord.ext import commands
import mcstatus
import boto3
ERROR_MESSAGE = 'Usage: ,server [start|stop|status]'
INSTANCE_ID = 'i-0398a626488b90371'
APPROVED_USERS = ['shnooker94', '__jared__', 'hotwire12', 'pizzacat.rar']
class MinecraftServerCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
... |
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
height: 100%;
width: 100%;
background-color: gainsboro;
}
.wrapper {
text-align: center;
position: absolute;
/* margin: 0 auto; */
height: 100%;
width: 100%;
background: gainsboro;
overflow-y: hidden;
}
.svg-cont... |
#include <SFML/Graphics.hpp>
#include <math.h>
#define PI 3.14159
class Player
{
public:
float x, y, angle; // angle is a radian
float sinx, cosx;
int boxX, boxY, m_speed, r_speed;
sf::CircleShape circle;
sf::RectangleShape direction;
void init()
{
cosx = cos(angle);
sinx = sin(angle);
}
void update()
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.