text stringlengths 184 4.48M |
|---|
import { FC, ReactNode } from 'react'
import { useNavigate } from 'react-router-dom'
import { AiFillCloseCircle } from 'react-icons/ai'
import { BottomNav, Divider, Typography } from '../..'
import styles from './LayoutDetails.module.scss'
interface Props {
children: ReactNode
title: string
}
export const LayoutD... |
import * as mariadb from 'mariadb';
import logger from '../logger.js';
/**
* @type {mariadb.Pool}
*/
export let pool;
const chickenTableCreate = `CREATE TABLE IF NOT EXISTS chicken (
id INT NOT NULL AUTO_INCREMENT,
farmyard_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
birthday DATE,
weight INT N... |
import React from "react";
import { createRoot } from "react-dom/client";
import News from "./News";
import useNews from "../../hooks/useNews";
const Top = () => {
const { news, getNews, isLoading } = useNews();
if (isLoading) getNews();
return (
<main style={{ textAlign: "center" }}>
... |
import 'package:cep_register/constants/breakpoints.dart';
import 'package:cep_register/constants/colors.dart';
import 'package:cep_register/constants/string.dart';
import 'package:cep_register/models/cep.model.dart';
import 'package:cep_register/viewModel/cep.view_model.dart';
import 'package:cep_register/widgets/label... |
using System;
using System.Threading;
using System.Threading.Tasks;
using AutoMapper;
using CleanArchitecture.TestApplication.Domain.Common.Exceptions;
using CleanArchitecture.TestApplication.Domain.Repositories.Inheritance;
using Intent.RoslynWeaver.Attributes;
using MediatR;
[assembly: DefaultIntentManaged(Mode.Full... |
<?php
/**
* @package test
* @author Valerio Riva <valerio@lynxlab.com>
* @copyright Copyright (c) 2012, Lynx s.r.l.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License v.2
* @version 0.1
*/
class QuestionMultipleCheckTest extends QuestionTest
{
protected $variation = ADA_NORMAL_TEST_VARIATION... |
import { Injectable } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
@Injectable()
export class UserFormService {
constructor (
private readonly fb: FormBuilder
) {}
buildForm (): FormGroup {
return this.fb.group({
name: new FormControl('',... |
/**
* @license Apache-2.0
*
* Copyright (c) 2020 The Stdlib Authors.
*
* 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 a... |
package org.example.consumermodule.rabbitmq.listeners;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
import org.example.consumermodule.service.AnimalStreamService;
import org.example.producermodule.dto.AnimalDTO;
impor... |
/*
Problem Description
Given an integer n, you have to find the nth fibonacci number. The fibonacci sequence is given by 0,1,1,2,3,5,8,... where 0 and 1 are the 0th and 1st fibonacci numbers respectively and every consecutive number is the sum of the previous two numbers in the sequence.
Input format
There is one line... |
import { Component, OnInit } from '@angular/core';
import {
FormControl,
FormGroup,
FormBuilder,
Validators,
} from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import ... |
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './user/user.module';
import { ServicesModule } from './servic... |
classdef Net < handle
properties
id;
cells;
net_size;
end
properties(Constant)
smooth_param = 256
end
methods
function [obj] = Net(id, cells)
obj.id = id;
obj.cells = cells;
obj.net_size = length(cells);
end
function [pins] = locate_pins(obj, x, y)
... |
let imgQuestao = document.querySelector('.imagemDaQuestao img');
let pergunta = document.querySelector('#pergunta');
let questaoAtual = 0;
let questaoNumero = 0;
let pontuacao = 0;
// ALTERNATIVAS
let a = document.querySelector('#a');
let b = document.querySelector('#b');
let c = document.querySelector('#c');
let d... |
package br.com.moreira;
public abstract class CompositeSpecification<T> implements Specification<T> {
@Override
public abstract boolean isSatisfiedBy(T t);
@Override
public Specification<T> and(Specification<T> specification){
return new AndSpecification<>(this,specification);
}
@Override
public Specifi... |
<?php
namespace Drupal\Tests\views\Kernel\Handler;
use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
use Drupal\views\Views;
/**
* Tests the time interval handler.
*
* @group views
* @see \Drupal\views\Plugin\views\field\TimeInterval
*/
class FieldTimeIntervalTest extends ViewsKernelTestBase {
/**
* View... |
public class Cat extends Pet implements Boardable{
private String hairLength;
public Cat (String name, String ownerName, String color, int sexid,String hairLength) {
super(name,ownerName,color);
this.hairLength=hairLength;
super.setSex(sexid);
}
public String getHairLength(){
return this.hairLength;
... |
package com.drag.ss.fh_stepcounter
import FHStepCounterApi
import StepToday
import android.Manifest
import android.app.ActivityManager
import android.app.AlarmManager
import android.app.PendingIntent
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.co... |
import classNames from 'classnames';
import { FC, memo, useState } from 'react';
import { Product } from '../../types/Product';
import { ProductItem } from '../ProductItem';
import arrowLeft from '../../assets/svg/arrowLeft.svg';
import arrowRigth from '../../assets/svg/arrowRigth.svg';
import './products-slider.scss';... |
# Theory of Operation {#theoryOperation}
[TOC]
This section gives an overview of the general operation of CMSIS-Drivers. It explains the \ref DriverFunctions that are common in all CMSIS-Drivers along with the \ref CallSequence. The topic \ref Data_Xfer_Functions describes how data read/write operations to the periph... |
/*
* Copyright 2019 igur.
*
* 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 wr... |
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "InputActionValue.h"
#include "assignemt_runnerCharacter.generated.h"
UCLASS(config=Game)
class Aassignemt_runnerCharacter : public ACharacter
{
GENERATED_BODY()
/** Camera boom ... |
import http, {
ServerResponse,
OutgoingHttpHeaders,
IncomingMessage,
} from "http";
interface Context {
res: ServerResponse;
req: IncomingMessage;
onerror: (err: Error) => void;
request: {
url: string;
pathname: string;
query: string;
};
response: {
statusCode: number;
statusMessa... |
package su22_09_dohuynhanhvu_ce171446;
import java.util.*;
/**
*
* @author Do Huynh Anh Vu - CE171446
*/
public class Coefficient {
//======= THUOC TINH =========
protected ArrayList<Double> result;
//======= KHOI TAO ==========
public Coefficient() {
}
public Coefficient(ArrayList resul... |
/*********************************************************************************************************************
* MM32F327X-G9P Opensourec Library 即(MM32F327X-G9P 开源库)是一个基于官方 SDK 接口的第三方开源库
* Copyright (c) 2022 SEEKFREE 逐飞科技
*
* 本文件是 MM32F327X-G9P 开源库的一部分
*
* MM32F327X-G9P 开源库 是免费软件
* 您可以根据自由软件基金会发布的 GPL(GNU Ge... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!--
1. document.createElement()
2. document.body.appendC... |
## Contents
1. 개요
2. 역사
3. 규칙
4. YOSAKOI
5. 기타
6. 관련 항목
[[edit](http://rigvedawiki.net/r1/wiki.php/%EC%9A%94%EC%82%AC%EC%BD%94%EC%9D%B
4?action=edit§ion=1)]
## 1. 개요 ¶
2014 요사코이 축제 우승팀 十人十彩(십인십채)의 요사코이
2014 YOSAKOI 소란 축제 우승팀 夢想漣えさし(유메소란에사시)의 YOSAKOI
일본의 단체 무용의 한 종류.
일본 시코쿠의 코치 ... |
import { Connection, PublicKey, Signer, TransactionInstruction } from "@solana/web3.js";
import { struct, nu64, u8 } from "buffer-layout";
import * as IDS from "../../../utils/ids";
import { createTokenAccount } from "./createTokenAccount";
const LAYOUT = struct<DepositLiquidityData>([
u8("action"),
nu64("amount")... |
#ifndef _DATE
#define _DATE
#include <iostream>
using namespace std;
class Date
{
private:
int month;
int day;
int year;
public:
Date();
Date(int _month, int _day, int _year);
Date(const Date& obj);
~Date();
void setDate(int _month, int _day, int _year);
void setMonth(int _month... |
/* eslint-disable consistent-return */
// это файл контроллеров
const bcrypt = require('bcryptjs'); // импортируем bcrypt
const User = require('../models/user');
const SALT_ROUNDS = 10;
const { generateToken } = require('../helpers/jwt');
const BadRequest = require('../errors/error400');
const NotFound = require('../... |
/* eslint-disable react-hooks/exhaustive-deps */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { init, getPreferences, onPreferencesChanged } from 'cookie-though';
import { Config } from 'cookie-though/dist/types/types';
import useCookieBlocker from 'src/components/features/useCookieBlocker';
import { ... |
<?php
namespace App\Entity;
use App\Repository\ObjetsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ObjetsRepository::class)]
class Objets
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Colum... |
package database
import (
"fmt"
"spotigram/internal/config"
infrastructureAbstractions "spotigram/internal/infrastructure/abstractions"
"database/sql"
"github.com/gocql/gocql"
_ "github.com/lib/pq"
)
// Returns a postgres based sql database provider.
func NewCassandraCqlDatabaseProvider(cfg *config.Config) i... |
/**
* Sample for Bubble Series
*/
import * as React from "react";
import * as ReactDOM from "react-dom";
import { EmitType } from '@syncfusion/ej2-base';
import {
ChartComponent, SeriesCollectionDirective, SeriesDirective, Inject,
BubbleSeries, Tooltip, IPointRenderEventArgs, ILoadedEventArgs, ChartTheme, Dat... |
<?php
namespace App\DTOs\Post;
use App\Http\Resources\Api\v1\Post\PostResource;
use App\Models\Post;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Illuminate\Http\Resources\Json\JsonResource;
use WendellAdriel\ValidatedDTO\ValidatedDTO;
class PostRes... |
/*
* @Author: kim
* @Date: 2022-09-07 18:10:32
* @Description: 按钮
*/
import { FC, ReactNode, MouseEvent, useCallback } from 'react'
import classNames from 'classnames'
import Icon from '@/components/Icon'
import { getPrefixCls } from '@/components/config'
export interface ButtonProps {
prefixCls?: string
class... |
/**
* @file string_util.cpp
* @brief
* @author Shijie Zhou
* @copyright 2024 Shijie Zhou
*/
#include "string_util.h"
#include <string.h>
#include <algorithm>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#else
#include <unistd.h>
#include <sys/stat.h>
#include <iconv.h>
#endif // _WIN32
names... |
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ $title }}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-4bw+/aepP/YC... |
/**************************************
* 作用:SQLLite Server操作实现
* 作者:Nick.Yan
* 日期: 2009-03-29
* 网址:www.redglove.com.cn
**************************************/
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SQLite;
using System.Configuration;
namesp... |
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { catchError, Observable, tap, throwError } from 'rxjs';
import { IPet } from '../pet/pet';
import { IOwner } from './owner';
@Injectable({
providedIn: 'root',
})
export class OwnerService {
pri... |
/**
* @file w2h_queue.h
* @author gotaly
* @data 2012-08-14
* @email gotawork@163.com
* Queue for w2h.
* API of Queue for w2h
*/
#ifndef W2H_QUEUE_H
#define W2H_QUEUE_H
#include "inc.h"
/**
* struct of queue.
*/
struct w2h_queue_s{
size_t head;
size_t tail;
size_t size;
size_t used;
char *mem;
};
typedef struct... |
package repository
import (
"bytes"
"errors"
"fmt"
"log"
"time"
"github.com/jmoiron/sqlx"
"github.com/vamika-digital/wms-api-server/core/business/master/domain"
"github.com/vamika-digital/wms-api-server/core/business/master/dto/outwardrequest"
"github.com/vamika-digital/wms-api-server/core/business/master/re... |
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\CasillaController;
use App\Http\Controllers\CandidatoController;
use App\Http\Controllers\EleccionController;
use App\Http\Controllers\VotoController;
use App\Http\Controllers\pdfController;
use App\Http\Controllers\Auth\LoginController;
/*
|--------... |
package br.com.fiap.IaFuture.model;
import java.time.LocalDate;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta... |
package com.stockmarket.core_d.events;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBDocument;
import com.stockmarket.core_d.enums.Events;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Sett... |
import "./RecentProductCard.css"
import {useNavigate} from 'react-router-dom'
import {Rating} from '@mui/material'
import {useState} from 'react'
function RecentProductCard({id, name, price, brand, image, initialRating}) {
const [rating, setRating] = useState(initialRating)
const navigate = useNavigate();
... |
#ifndef STUDIO_H_
#define STUDIO_H_
#include <vector>
#include <string>
#include "workout.h"
#include "trainer.h"
#include "action.h"
class Studio {
public:
Studio();
explicit Studio(const std::string &configFilePath);
Studio(const Studio &other);
Studio(Studio &&other);
void start();
i... |
import { useEffect, useState } from "react";
interface EnumSelectorProps {
values: { value: string; label: string }[];
selected: string;
setSelected?: (ret: string) => void;
style?: React.CSSProperties;
className?: string;
}
export const Select = ({
values,
selected,
setSelected,
style,
className,... |
package org.example.windows;
import org.example.Request;
import org.example.Student;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static org.example.windows.StartWindow.... |
// Copyright 2014 Thomas E. Vaughan
//
// This file is part of Ulam.
//
// Ulam 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 the License, or (at your option) any later
// version.
//
... |
import { QuestionType } from '@/modules/questions/types';
import React, { useEffect, useState } from 'react';
import { Form, Input, Select, Button } from 'antd';
import { ChapterType, SubjectType } from '@/modules/subjects/types';
import CKEditorInput from '@/components/ckeditor/input';
import { getChapters, getSubject... |
# Transform Load functions:
# en for loop som, för varje fil i pokebelt
# öppnar json filen,
# läser ut base happiness
# sparar / appendar base happiness datan till en csv fil som sparas i pokedata/observations/observation_YY-MM-dd-HH-mm.csv
# ett bash kommando ska sedan deleta alla json-filerna, så att mappen är tom t... |
import { Command, CommandoMessage } from 'discord.js-commando';
import RoleList from '../../templates/Announcement_RoleList';
import CONSTANTS from '../../constants';
import { hasPermissions } from '../../bot-utils';
import { genericError } from '../../errorManagement';
import { Message } from 'discord.js';
export def... |
import fnmatch
import os
import traceback
from concurrent.futures import ProcessPoolExecutor
from datetime import datetime, timedelta
from functools import partial
import pandas as pd
import requests
from astropy.io import fits
from bs4 import BeautifulSoup
from tqdm import tqdm
from ecallisto_ng.data_download.utils ... |
export function GetCardBlockData(data: any, provider: string) {
let returnData: { id: any; title: any; description: any; backgroundImage: any; button: any; cards: any; roundedImage: boolean; variant: number; grid: number };
switch (provider) {
case "strapi":
returnData = {
"... |
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define PI 3.14159265359f
#define DEG_2_RAD (PI / 180.0f)
#define RAD_2_DEG (180.0f / PI)
#define MAT4_IDENTITY \
(Mat4) \
{ \
1.0f, 0.0f, 0.0f, 0.0f, \
... |
from datetime import date, datetime
from typing import Dict, List
import requests
from .base_parser import BaseParser
from bs4 import BeautifulSoup
class DouParser(BaseParser):
"""
A parser for scraping job listings from DOU.
Attributes:
CATEGORY_URL_MAP (dict): A mapping of job categories to th... |
//
// Created by irantha on 5/14/23.
//
#include <atomic>
#include <catch2/catch_test_macros.hpp>
#include <thread>
#include <vector>
#include "async_spin_wait.hpp"
#include "task/async_task.hpp"
#include "task/sync_task.hpp"
#include "task/task.hpp"
#include "test/async_test_utils.hpp"
#include "async_event.hpp"
#in... |
/*:
## Exercise - For-In Loops
Create a for-in loop that loops through values 1 to 100, and prints each of the values.
*/
for values in 1 ... 100{
print(values)
}
/*:
Create a for-in loop that loops through each of the characters in the `alphabet` string below, and prints each of the values alongside the ind... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.tailwindcss.com"></script>
<link
href="https://cdn.jsdelivr.net/npm/remixicon@4.1.0/fonts/remixicon.css"
rel=... |
// pages/api/create.js
import { NextRequest, NextResponse } from "next/server";
import { connectToDatabase, DATABASE_NAME, COLLECTION_NAME, OTHER_SONGS_COLLECTION } from "@/lib/mongo";
import { Cities, LeaderBoardResponse, LeaderboardSong, SongScore } from "@/lib/types";
import { ynkSongs } from "@/lib/types";
export ... |
<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org" >
<head>
<meta charset="utf-8">
<title>ISIMA</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Styles -->
<link h... |
note
description: "Fast-CGI HTTP headers and custom headers"
author: "Finnian Reilly"
copyright: "Copyright (c) 2001-2022 Finnian Reilly"
contact: "finnian at eiffel hyphen loop dot com"
license: "MIT license (See: en.wikipedia.org/wiki/MIT_License)"
date: "2023-08-14 10:40:12 GMT (Monday 14th August 2023)"
re... |
# game_controller.py
from database.models import Game, db, Protagonist, AlbumTheme
from typing import Optional, Dict, Any
import json
from datetime import datetime
# from generate.qinghua_completions import init_game_plot
import generate.qinghua_completions as gpt_completions
def add_game(user_id, protagonist_id, the... |
<%@ page isELIgnored="false" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
... |
# mount
挂载文件系统。
## 语法
```
mount [-fnrsvw] [-t fstype] [-o options] device mountpoint
```
## 命令行选项
- **-t** *fstype*
指示文件系统类型。
## 例子
显示所有已安装的分区:
```sh
$ mount
```
将硬盘驱动器的第一个分区挂载到现有目录:
```sh
$ mount -t ext4 /dev/sda1 /media/data
```
参考物理磁盘分区卸载:
```sh
$ umount /dev/sda1
```
参照挂载点卸载:
```sh
$ umount /media/da... |
##############################################################################
# Helper functions needed to run analyses in Sample Size Estimation using a
# Latent Variable Model for Mixed Outcome Co-Primary, Multiple Primary and
# Composite Endpoints
#
# Author: Martina McMenamin
#
##################################... |
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:fluttertemplate/components/custom_alerts.dart';
import 'package:fluttertemplate/routes/routes.dart';
import 'package:fluttertemplate/widgets/divider.dart';
import 'package:get/get.dart';
import 'package:loading_animation_widg... |
import { ReactNode } from 'react';
import { useNavigate } from 'react-router';
import { useTranslation } from 'react-i18next';
import router from '../../../shared/services/router';
import { useAppDispatch } from '../../../shared/hooks/redux';
import modalObserver from '../../../shared/utils/observers/modalObserver';
im... |
@extends('layouts.navbar')
@section('content')
<div class="container">
<div class="flex flex-col items-center justify-center px-6 py-8 mx-auto lg:py-0 mt-10 mb-10">
<a href="#" class="flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white">
<img class="w-10 ... |
<!DOCTYPE html>
<html lang="en" ng-app="uglyThings">
<head>
<meta charset="UTF-8">
<title>Ugly</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymo... |
abstract class Shape{
abstract double perimeter(); // A shape has some perimeter, but the formula depends upon the entity or the object
abstract double area();
}
class Circle extends Shape{
double radius = 10;
double perimeter(){
return 2*Math.PI*radius;
}
double area(){
return Math.PI... |
/* The CSS display property is used to control how an element is rendered in the browser. It specifies the type of box used for an HTML element and influences the layout and visibility of the element. */
/* The display property accepts various values, each determining how an element is displayed. */
/* In HTML, the ... |
package com.product.ordering.domain.entity;
import com.product.ordering.domain.valueobject.WarehouseId;
import com.product.ordering.domain.exception.WarehouseDomainException;
import com.product.ordering.domain.valueobject.WarehouseName;
public class Warehouse extends DomainEntity<WarehouseId> {
public static War... |
# from bitcoinrpc.authproxy import AuthServiceProxy
# rpc_user = "123456"
# rpc_password = "123456"
# rpc_url = "http://127.0.0.1:8332"
# def user_address():
# """
# Get user address type.
# """
# while True:
# address_type = input("Select address type (legacy, p2sh-segwit, bech32): ").l... |
# Import necessary libraries
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import (
accuracy_score,
precision_score,
recall_score,
f1_score,... |
//: containers/SimpleHashMap.java
// A demonstration hashed Map.
package chap17_containers;
import util.*;
import java.util.*;
public class SimpleHashMap<K,V> extends AbstractMap<K,V> {
// Choose a prime number for the hash table size, to achieve a uniform distribution:
static final int SIZE = 1024 - 3; // 997... |
package com.mohann.covid19.room.model;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import org.jetbrains.annotations.NotNull;
import java.io.Serializable;
import java.util.Comparator;
@Entity(tableName = "statewise")
public class StateWiseModel implements Serializab... |
import express from "express"
import passport from 'passport'
import {
BearerStrategy,
IBearerStrategyOptionWithRequest,
ITokenPayload,
VerifyCallback,
} from 'passport-azure-ad'
import config from './config';
const options: IBearerStrategyOptionWithRequest = {
identityMetadata: `https://${config.metadata... |
#include <iostream>
using namespace std;
#include <cmath>
int main()
{
int n=0;
cout<<"Enter the number of data points.\n";
cin>>n;
float x[n],y[n];//array to store the coordinates of the points
cout<<"Enter the data points as x and y coordiantes\n";
for(int i=0;i<n;i++)
{
cout<<(i+1... |
import { useRouter } from "next/router";
import { useAuth } from "react-oidc-context";
const withAuth = (WrappedComponent) => {
return (props) => {
const auth = useAuth();
const router = useRouter();
if (auth.isLoading) {
return <></>
}
if (!auth.isAuthenti... |
<!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>Luke Salisbury Photography - Main</title>
<link rel="shortcut icon" type="image/jpg" href="Logo.png"/>
... |
myApp.service('registration', ['$http', function ($http) {
/**********************************************************************
* Functions to check pattern of string
**********************************************************************/
this.checkPatternEmail = function (email) {
if (!email) return ... |
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { ApolloClient, ApolloProvider, InMemoryCache } from '@apollo/client';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
i... |
pragma solidity ^0.5.2;
import 'openzeppelin-solidity/contracts/token/ERC721/ERC721Full.sol';
import './Event.sol';
contract Tickets is ERC721{
//description can be a row-seat combination or anything else
struct Ticket{
string description;
address redeemedBy;
}
Event public ParentE... |
/*
В Golang пакет flag предоставляет возможность создания пользовательских типов
флагов с помощью интерфейса flag.Value. Этот интерфейс определен в пакете flag
и включает методы, позволяющие пользовательским типам реализовать собственное поведение при установке и чтении флага.
Интерфейс flag.Value включает следующие м... |
import React, { useState, useEffect } from "react";
import "./AdminPanel.css";
import { useSelector, useDispatch } from "react-redux";
import { Col, Container, Row } from "react-bootstrap";
import { NavLink } from "react-router-dom";
import axios from "axios";
import { FontAwesomeIcon } from "@fortawesome/react-fontawe... |
import React, { useEffect, useState, Fragment } from 'react';
const OneMovieFunc = (props) => {
const [movie, setMovie] = useState({})
const [error, setError] = useState(null)
useEffect(() => {
fetch(`${process.env.REACT_APP_API_URL}/v1/movie/` + props.match.params.id)
// .then((response) => res... |
import { Component, OnInit, ViewEncapsulation, ViewChild } from '@angular/core';
import { IDataOptions, PivotView, IDataSet } from '@syncfusion/ej2-angular-pivotview';
import { DropDownList, ChangeEventArgs } from '@syncfusion/ej2-angular-dropdowns';
import { CheckBox, Button } from '@syncfusion/ej2-angular-buttons';
i... |
import { Component, OnInit } from '@angular/core';
import {Car} from "../../../model/car";
import {CarService} from "../../../service/car.service";
import Swal from "sweetalert2";
@Component({
selector: 'app-car-list',
templateUrl: './car-list.component.html',
styleUrls: ['./car-list.component.css']
})
export cl... |
import 'package:flutter/material.dart';
import 'package:juai/common/theme.dart';
class Cell extends StatelessWidget {
const Cell(
this.text, {
Key? key,
this.border = true,
this.right,
this.isMustRight = true,
this.onTap,
}) : super(key: key);
/// 底部 border 是否显示
final bool border;
/... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
There were issues (possibly with syntax) in where a case and an if statement
could be used. They are very simil... |
package com.bjpowernode.crm.workbench.web.controller;
import com.bjpowernode.crm.settings.domain.User;
import com.bjpowernode.crm.settings.service.IUserService;
import com.bjpowernode.crm.settings.service.impl.IUserServiceImpl;
import com.bjpowernode.crm.utils.DateTimeUtil;
import com.bjpowernode.crm.utils.PrintJson;
... |
{
module Lexer
( -- * Invoking Alex
Alex
, AlexPosn (..)
, alexGetInput
, alexError
, runAlex
, alexMonadScan
, Range (..)
, RangedToken (..)
, Token (..)
, scanMany
) where
import Control.Monad (when)
import Data.ByteString.Lazy.Char8 (ByteString)
import Data.Text
import Data.Text.Encoding
... |
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Primeiros passos com o DOM</title>
<style>
body {
background-color: rgb(142, 159, 216);
color: white;
font: normal 1... |
import React, { useState } from 'react';
function SignUp() {
const [credentials, setCredentials] = useState({
username: '',
password: '',
});
const [error, setError] = useState('');
const handleChange = (e) => {
const { name, value } = e.target;
setCredentials(prevState => ({
...prevStat... |
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.x.axis path {
display: none;
}
.line {
fill: none;
stroke: steelblue;
stroke-width: 1.5px;
}
</style>
<body>
<script src="../../third/d3.... |
/**
* @abstruct list container with key/value pair in linked data structure
*/
#ifndef __listtable_h_
#define __listtable_h_
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
enum {
LISTTABLE_THREADSAFE = (0x01), // make it thread-safe
LISTTABLE_UNIQU... |
using TeamsTranscript.Abstractions;
using TeamsTranscript.Abstractions.Configuration;
using TeamsTranscript.Abstractions.Transformers;
using TechTalk.SpecFlow;
namespace TeamsTranscript.Specs.Steps;
[Binding]
public class TranscriptionTransformerSteps
{
private readonly ScenarioContext scenarioContext;
publ... |
//
// RadioStations.swift
// skurring
//
// Created by Daniel Bornstedt on 26/07/2019.
// Copyright © 2019 Daniel Bornstedt. All rieghts reserved.
//
import Foundation
import UIKit
import MarqueeLabel
protocol RadioPlayerViewControllerHandler: class {
func playerViewControllerDidDismiss()
func playerViewC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.