text stringlengths 184 4.48M |
|---|
import { Component, OnInit } from "@angular/core";
import { HttpClient, HttpParams } from "@angular/common/http";
import { Observable } from "rxjs";
import { map } from "rxjs/operators";
interface CityWeather {
name: string;
weather: string;
status: string[];
}
interface ApiResponse {
page: number;
per_page... |
import { LoginComponent } from './Components/login/login.component';
import { HomeComponent } from './Components/home/home.component';
import { NgModule } from '@angular/core';
import { RouterModule, Routes, Router } from '@angular/router';
import { RegisterComponent } from './Components/register/register.component';
... |
package com.holubek.trashhunter.ui.place
import android.animation.ArgbEvaluator
import android.annotation.SuppressLint
import android.app.Activity.RESULT_OK
import android.content.Context
import android.content.Intent
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Color
im... |
import PropTypes from 'prop-types'
import {
TransactionWrap,
TableHeader,
TableBody
} from './TransactionHistory.styled'
export default function TransactionHistory({ items }) {
return (
<TransactionWrap>
<TableHeader>
<tr>
<th>Type</th>
<th>Amount</th>
<th>Curren... |
{% macro grant_select(schema = target.schema, role = target.role) %}
-- Here we are defining the actual SQL statement that we want to run.
-- To do so, we add a 'set' block.
-- This operates the same as a single line 'set' statement
{% set query %}
grant usage on schema {{ schema }} to role {{... |
import { Component } from "react";
import FeedbackOptions from "./components/FeedbackOptions";
import Statistics from "./components/Statistics/Statistics";
import "./App.css";
class App extends Component {
state = {
good: 0,
neutral: 0,
bad: 0,
};
handleClick = (option) => {
this.setState((prevS... |
/**
* @author wsl
* created on 2017-04-12
* updated on 2017-04-12
*/
(function () {
'use strict';
angular.module('hAdmin.pages.ui.modal').controller('modalCtrl', ['$scope', '$uibModal', function ($scope, $uibModal) {
var $ctrl = this;
$ctrl.items = ['item1', 'item2', 'item3'];
$ctr... |
import { create } from 'zustand';
import { maxProjectilesOnScreen, defaultGameObjectData, defaultGameSettings, defaultLevelData } from './constants';
import {
GameObjectData,
ProjectileData,
PlayerObjectData,
GameObjectType,
GameSettings,
LevelFlowType,
LevelData,
GameState,
LevelState,
LevelSetting... |
package love.forte.simbot.component.kritor.core.actor.internal
import io.grpc.Status
import io.grpc.Status.Code
import io.kritor.group.*
import io.kritor.message.Contact
import io.kritor.message.Scene
import io.kritor.message.contact
import love.forte.simbot.ability.DeleteFailureException
import love.forte.simbot.abil... |
package com.piterrus.dagger2.presentation.binds_instance.ui
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
impo... |
*****************************************************************
* OHMS LAW CALCULATIONS *
* *
* A simple program that calculates the relationship between *
* voltage, current, and resistan... |
import { createAsyncThunk } from "@reduxjs/toolkit"
import { extname } from "@tauri-apps/api/path"
import { SourceType } from "@/types"
import { open } from "@tauri-apps/api/dialog"
import { addFromUrl } from "./addFromUrl"
export const addFromFiles = createAsyncThunk("source/addFromFiles", async (paths: string[], thu... |
import { InputTypes, Literal } from '../RlpEncoder';
import { isValueBetween } from './isBetween';
import {
DecodingResults,
EncodingResults,
SimpleTypes,
TypeEncoderDecoder,
} from './TypeEncoderDecoder';
export class ArrayEncoderDecoder implements TypeEncoderDecoder<Array<Literal>> {
public encode({
in... |
package com.mastercoding.firestoreapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.f... |
import { useState } from 'react';
import { Card, Button, Input } from "@nextui-org/react";
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
import { useSelector, useDispatch } from 'react-redux';
import axios from 'axios';
import { useNavigate } from 'react-router-dom';
import { caption, description } fro... |
import { CommonModule } from '@angular/common';
import { Component, OnInit, OnDestroy } from '@angular/core';
import { UserSidemenuComponent } from '../user-sidemenu/user-sidemenu.component';
import { UserService } from '../../services/user.service';
import { CommonService } from '../../services/common.service';
import... |
declare class ApiResponse {
code: number;
message: string;
constructor(code: number, message: string);
}
declare class PackageManager {
private messageBuffer;
private messageLength;
private msgPointer;
private decodedMsg;
private amountOfBytes;
private messageReaded;
private len... |
using System;
namespace Foundation2
{
class Program
{
static void Main(string[] args)
{
Address usaAddress = new Address("123 Main St", "Idaho", "ID", "USA");
Customer usCustomer = new Customer("Jack Jones", usaAddress);
Address intlAddress = new Address("4... |
package com.car_equipment.Service;
import com.car_equipment.DTO.CategoryDTO;
import com.car_equipment.Model.Category;
import com.car_equipment.Repository.CategoryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java... |
import { Request, Response, NextFunction } from 'express';
import httpStatus from '../enums/httpStatus';
import Conflict from '../errors/Conflict';
import Invalid from '../errors/Invalid';
import NotFound from '../errors/NotFound';
import ITest from '../protocols/ITest';
import { createTestSchema } from '../schemas/tes... |
import pandas as pd
import numpy as np
from itertools import product
import argparse
import random
import chemoUtils
import sys
class ligandSetSimilarity(object):
"""
Object returns the bootstrap p-value of two given drugs
"""
def __init__(self, drugs_to_vec, targets_df, proteinA, proteinB, n, r):
"""
Initi... |
import PropTypes from 'prop-types'
import { useLocation } from 'react-router-dom'
// look at the route that we are currently on
import Button from './Button'
const Header = ({title, onAdd, showAdd}) => {
const location = useLocation()
return (
<header className= 'header'>
<h1>{title}</h1>
{location... |
import { createSlice } from "@reduxjs/toolkit";
/*
todoList: [] => Item<Array>
Item: {
id
title
isCompleted
}
*/
const todoSlice = createSlice({
name: "todo",
initialState: {
todoList: [
{
id: "1",
text: "Learn React Native",
isCo... |
<?php
namespace App\Livewire;
use App\Models\serves;
use Livewire\Component;
use Livewire\Attributes\On;
use Livewire\Attributes\Url;
use Livewire\WithPagination;
use Livewire\Attributes\Rule;
use Livewire\WithFileUploads;
use Livewire\Attributes\Layout;
use Livewire\Attributes\Computed;
use Livewire\Attributes\Valid... |
import AssignmentList from "./AssignmentList.js";
import AssignmentCreate from "./AssignmentCreate.js";
export default {
template: `
<section class="space-y-10">
<assignment-create @add="add"></assignment-create>
<assignment-list :assignments="filters.inProgress" title="In Progress"></assignmen... |
import Combine
import XCTest
@testable import SubVTData
final class ValidatorListServiceTests: XCTestCase {
private var cancellables: Set<AnyCancellable>!
override func setUp() {
cancellables = []
}
private func validatorListSubscriptionTest(active: Bool) {
var error: Error? =... |
import CONFIG from '../../global/config';
const restoCard = (resto) => `
<div tabindex="0" class="card">
<a href="#/resto/${resto.id}" class="card-a-tag">
<div class="img-container">
<img tabindex="0" class="card-image" crossorigin="anonymous"
alt="${resto.name}" src="${CONFIG.BA... |
/* A component that is using the `useSelector` hook to get the coins from the store. */
import React, {FunctionComponent} from 'react';
import {StyleSheet, View} from 'react-native';
import {List, Text} from 'react-native-paper';
import {useSelector} from 'react-redux';
import {AppState} from '../../core/store';
import... |
Tool: ncbi-blast+
Perform: Local database construction and retrieval
>Installation
$ sudo apt-get install ncbi-blast+
>Usage (database construction)
# DNA/RNA Sequences
$ makeblastdb -in multi.fasta -out mydatabase -parse_seqids -dbtype nucl
# Protein Sequences
$ makeblastdb -in multi.fasta -out mydatabase -parse_se... |
package ch14.bookshop.shopping;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
public class CustomerDBBean {
private static CustomerDBBean instance ... |
import React, { Component } from 'react'
import { Table } from 'react-bootstrap'
import TicketService from '../Service/TicketService'
import TicketRecord from './TicketRecord';
export default class ListTickets extends Component {
constructor(props) {
super(props);
this.state = {
ticket... |
//jshint esversion:6
require('dotenv').config();
const express =require("express");
const bodyPArser=require("body-parser");
const ejs =require("ejs");
const mongoose=require("mongoose");
// const md5=require("md5");
const bcrypt=require("bcrypt");
const saltRounds=8;
const app=express();
app.use(bodyPArser.urlencoded... |
import { useSelector, useDispatch } from "react-redux";
import * as actions from "../../redux/counter/counter-actions";
import { getValue, getStep } from "../../redux/counter/counter-selector";
export default function Counter() {
const value = useSelector(getValue);
const step = useSelector(getStep);
const dispa... |
package CourseWork.Select;
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Random;
public class ArraySel {
private long[] array; // Ссылка на массив a
private int length; // Количество элементов данных
public ... |
package com.graalvm;
import java.net.URL;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.Statement;
public class CreateTable {
public static void main(String[] args) {
try {
Class.forName("org.sqlite.JDBC"); // Load the SQLite JDB... |
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>All Movies</title>
<link rel="stylesheet" type="text/css" href="common.css" />
</head>
... |
import { PullRequestSummary } from "@/models/pulls/PullRequestSummary";
/**
* Generate a mock PullRequestSummary
* @param pull_number
* @param repository
* @param title
* @param user
* @param status
* @param milestone
* @param comments
* @param review_comments
* @param commits
* @param firstReviewedAt
* @p... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { AuthModule } from './Modu... |
/* import NextAuth from "next-auth";
import { authConfig } from "./auth.config";
import Credentials from "next-auth/providers/credentials";
import {z} from "zod";
import { PrismaClient } from "@prisma/client";
import { User } from "@prisma/client";
*/
/* const prisma = new PrismaClient();
async function getUser(usern... |
//[204]计数质数
//给定整数 n ,返回 所有小于非负整数 n 的质数的数量 。
//
//
//
// 示例 1:
//
//
//输入:n = 10
//输出:4
//解释:小于 10 的质数一共有 4 个, 它们是 2, 3, 5, 7 。
//
//
// 示例 2:
//
//
//输入:n = 0
//输出:0
//
//
// 示例 3:
//
//
//输入:n = 1
//输出:0
//
//
//
//
// 提示:
//
//
// 0 <= n <= 5 * 10⁶
//
//
// Related Topics 数组 数学 枚举 数论 👍 986 👎 0
//leetcode submit r... |
import java.util.*;
public class MethodPractice2
{
private Scanner keyboard = new Scanner(System.in);
// Implement methods below this line
public void greeting(String firstName, int num){
for(int i = 0; i < num; i++){
System.out.println(firstName + ", have a nice day.");
}
... |
import datetime
from dataclasses import dataclass
from neomodel import db
from clinical_mdr_api.domain_repositories._utils import helpers
from clinical_mdr_api.domain_repositories.generic_repository import (
manage_previous_connected_study_selection_relationships,
)
from clinical_mdr_api.domain_repositories.model... |
#include <iostream>
#include <string>
#include <vector>
#include "Vector2.hpp"
#include "raylib.h"
#include "raylib-cpp.hpp"
#include "imnotgui.hpp"
#include "imnotgui_extra.hpp"
#define RTEXLOADER_IMPLEMENTATION
#include "include/rtexloader.hpp"
using namespace imnotgui;
using namespace imnotgui::draw;
using namesp... |
import { SetlistSong } from "@app/hooks/useSetlistRelease";
import styles from "./SortChanger.module.css";
import * as ToggleGroup from "@radix-ui/react-toggle-group";
import { DateIcon, NoteIcon, SongIcon, TimeIcon } from "@app/assets/Icons";
export type SortType = keyof SetlistSong;
interface Props {
onChange: ... |
import { SERVER_CONNECTION_TIMEOUT } from '@configs/constants';
import {
ApiEndpoints,
ApiMethods,
ApiResponse,
ContentTypes,
ErrorMessages,
InfoMessages,
RequestCallbackFunction,
RequestEvents,
RequestHeaders,
ResponseEvents,
} from '@configs/types';
import logger from '@logger/... |
<template>
<!-- App -->
<div v-if="checkUrl">
<router-view />
</div>
<div v-else-if="currentUser" class="flex bg-packed font-lexend dark:bg-gray-900">
<div id="sidebar-scroll"
class="flex-sidebar lg:flex-auto w-sidebar lg:block hidden bg-white dark:bg-gray-800 border-r-2 dark:border-gray-700 h-sc... |
# **************************************************************************** #
# #
# Temperature functions #
# ... |
package com.example.studyflow.view.flashmindview
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.d... |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace _05_howto_solve_maze
{
public partial class Form1 : Form
{
public Form1()
{
Initial... |
.R.home.bin <- function(arch) {
bin <- R.home('bin')
if (arch == "i386") bin <- normalizePath(paste0(bin, "/../i386/"))
return(bin)
}
.install.dll <- function(arch = c("x64", "i386")) {
arch <- match.arg(arch)
temp <- tempdir()
bin <- .R.home.bin(arch)
ddl <- paste0(temp, '/sdldll.zip')
dll <- paste... |
//
// FilterTabbarCollectionViewAdapter.swift
// Trinap
//
// Created by Doyun Park on 2022/11/23.
// Copyright © 2022 Trinap. All rights reserved.
//
import UIKit
import RxSwift
import RxCocoa
final class FilterView: UICollectionView, UICollectionViewDelegate {
private var filterMode: FilterMode
pr... |
#include "sort.h"
/**
* swap_quick - Swaps the positions of two elements in an array.
* @array: The array.
* @idx1: Index of the first element.
* @idx2: Index of the second element.
*/
void swap_quick(int *array, ssize_t idx1, ssize_t idx2)
{
int temp;
temp = array[idx1];
array[idx1] = array[idx2];
array[idx... |
from typing import List
class Solution:
def combinationSum2(self, candidates: List[int], target: int) -> List[List[int]]:
res = []
candidates.sort()
cur = []
def dfs(i, acc):
# note we have success condition first here
if acc == target:
res... |
package com.example.myacronymapplication.network
import com.example.myacronymapplication.BuildConfig
import com.example.myacronymapplication.data.NactemResponseItem
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.GET
import retrofit2.http.Query
class NactemRetofit... |
from django.http import HttpResponseRedirect
from django.shortcuts import render,redirect
from django.urls import reverse
from userauths.forms import UserRegisterForm
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from userauths.models import Profile, User
from django.vi... |
import cv2
def auto_brightness_contrast_grayscale(image, clip_hist_percent):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# Calculate grayscale histogram
hist = cv2.calcHist([gray], [0], None, [256], [0, 256])
hist_size = len(hist)
# Calculate cumulative distribution from t... |
= CSV Format
ifndef::env-site,env-github[]
include::_attributes.adoc[]
endif::[]
:keywords: format, csv, */csv, application/csv
MIME type: `application/csv`
ID: `csv`
The CSV data format is represented as a DataWeave array of objects in which each object represents a row. All simple values are represented as strings... |
#先对words进行排序,然后用set存储满足(由words词典中其他单词逐步添加一个字母组成)条件的单词,用res存储要输出的结果(set中最长的一个单词)。
#注意单词为单个字母时一定是满足条件的,所以要加进去。后面遍历的时候发现word[:-1]在set里面则将word加到set里去。当word长度大于res长度时用word替换res。
#执行用时 : 80 ms, 在Longest Word in Dictionary的Python提交中击败了100.00% 的用户 内存消耗 : 12.2 MB, 在Longest Word in Dictionary的Python提交中击败了42.10% 的用户
clas... |
# AutoRescan Plugin for Squeezebox Server
# Copyright © Stuart Hickinbottom 2007-2014
# This file is part of AutoRescan.
#
# AutoRescan 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 ... |
import 'package:get_it/get_it.dart';
import 'package:get_storage/get_storage.dart';
import 'package:grocery_app/data/local/data_source/auth_local_datasource.dart';
import 'package:grocery_app/data/remote/data_source/auth_data_source.dart';
import 'package:grocery_app/data/remote/data_source/category_data_source.dart';
... |
/*
* Engineering Ingegneria Informatica S.p.A.
*
* Copyright (C) 2023 Regione Emilia-Romagna
* <p/>
* This program is free software: you can redistribute it and/or modify it under the terms of
* the GNU Affero General Public License as published by the Free Software Foundation,
* either version 3 of the License,... |
import { pgTable, text, timestamp, uuid, varchar } from "drizzle-orm/pg-core";
import { sql } from "drizzle-orm";
export const users = pgTable("users", {
id: uuid("id")
.primaryKey()
.default(sql`uuid_generate_v4()`),
userName: varchar("username", { length: 15 }).notNull().unique(),
password: text("passw... |
Title: Gestures
----
Text:
# Gestures
Any tap, swipe, drag, pinch, or otherwise interaction with the screen with one or more fingers is a possible gesture that can be used to make changes in Graphic. Here is a list with the most common gestures in Graphic and some examples of their use:
(image: gestures1-ipad.jpg... |
using Microsoft.EntityFrameworkCore;
// NuGet Microsoft.EntityFrameworkCore
using Microsoft.Extensions.Options;
// NuGet Microsoft.EntityFrameworkCore.SqlServer
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MoviesRepositoryLib;
using System;
using System.Collections.Generic;
using System.Linq;
using Syste... |
import streamlit as st
import pandas as pd
import torch
from torch import nn
from torch.utils.data import DataLoader, TensorDataset
from transformers import BertTokenizer, BertModel, AdamW, get_linear_schedule_with_warmup
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncode... |
"use client";
import { AppContainer, ConductorForm, ConductorList } from "@/components";
import { Conductor } from "@/shared/interfaces/conductor.interface";
import { ConductorService } from "@/shared/services";
import { useState } from "react";
import useSWR from "swr";
const ConductorPage = () => {
const { data, e... |
---
layout: note
title: 函数柯里化作用
excerpt: Read more...
date: 2022-5-29 14:17:11
updated: 2022-5-29 14:17:11
comments: false
lang: zh-CN
---
1. 参数复用
```js
function checkDigital(reg) {
return function(string) {
return reg.test(string)
}
}
let checkFunction = checkDigital(/\d+/g)
checkFunction('tes... |
---
authors:
- finn
date: 2023-11-04
categories:
- ElementUI
---
# 正确认识ElementUI中prop的作用
在 Vue 中,通过使用 v-model 指令与表单组件实现表单数据的双向绑定。但是在 Element UI 中的 el-form 和 el-form-item 组件中,我们还需要使用 prop 属性来指定表单域对应的数据字段名。
本篇文章从该问题入手,介绍 Element UI 中的 prop 属性。
<!-- more -->
!!! Question "起源"
**为什么`el-input`绑定了数据,`el-form` 和 `el... |
/*
https://codeforces.com/problemset/problem/1437/D
D. Minimal Height Tree
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
Monocarp had a tree which consisted of n vertices and was rooted at vertex 1. He decided to study BFS (Breadth-first search), so he ran BFS... |
const bcrypt = require('bcrypt');
const jwt = require('../jwt-to-promise');
const { Router } = require('express');
const secret = 'lapamChushki';
const { body, validationResult } = require('express-validator');
const router = Router();
router.get('/register', (req, res) => {
res.render('register', {_title: 'Regi... |
# This example requires the 'message_content' intent.
import random
import discord
token = ""
# First line of secrets should be token
with open("secrets.txt", "r") as f:
token = f.readline()
intents = discord.Intents.all()
intents.message_content = True
client = discord.Client(intents=intents)
@client.event
asyn... |
<script lang="ts">
import { fly, fade } from 'svelte/transition';
let visible: boolean = false;
export function open() {
visible = true;
}
export function close() {
visible = false;
}
export let content: any;
</script>
{#if visible}
<div class="overlay" transition:fade={{ duration: 500 }} />
<div id="... |
import React, { Component, forwardRef, useEffect, useState } from "react";
import { Link } from "react-router-dom";
import axios from "axios";
import { ToastContainer, toast } from "react-toastify";
import {
Button,
Dialog,
DialogContent,
Fade,
Grid,
IconButton,
Typography,
} from "@mui/material";
import... |
package com.enkhee.forecastmvvm.data.db
import android.content.Context
import android.util.Log
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.enkhee.forecastmvvm.data.db.entity.CurrentWeatherEntry
import com.enkhee.forecastmvvm.data.db.entity.WeatherLocation
@Data... |
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ToDo } from '../../interfaces/toDoList.model';
@Component ({
selector: 'app-to-do-list-item',
templateUrl: './to-do-list-item.component.html',
styleUrl: 'to-do-list-item.component.css'... |
#### Simper analysis on field exclusion data
library(tidyverse)
library(skimr)
library(ggbiplot)
library(vegan)
library(here)
library(permute)
theme_set(theme_classic())
# Data Prep ---------------------------------------------------------------
exp <- read_csv(here::here("data", "tidy", "field_exclusion_tidy.csv"... |
package Day7_102222;
import io.github.bonigarcia.wdm.WebDriverManager;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.support.ui.Selec... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
... |
# frozen_string_literal: true
class Agency::CaseStudiesController < Agency::BaseController
before_action :perform_authorization
before_action :set_industry, only: %i[index show favorite unfavorite]
before_action :set_case_study, only: %i[show favorite unfavorite edit update destroy]
before_action :ensure_acces... |
/*
* Generic.java
*
* Copyright (c) 2009-2013 Guillaume Mazoyer
*
* This file is part of GNOME Split.
*
* GNOME Split 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... |
import {
Column,
Entity,
Unique,
OneToMany,
DeleteDateColumn,
} from 'typeorm';
import { Exclude } from 'class-transformer';
import { PermissionEntity } from '../permission/permission.entity';
import { GuidIdentity } from '../../common/guid.entity';
@Entity({
name: 'resource_servers',
})
@Unique('idx_reso... |
import React, { useState, useEffect } from "react";
import { StarIcon } from "@heroicons/react/24/solid";
import { useSelector, useDispatch } from "react-redux";
import { getProducts } from "../../actions/productAction";
const categories = [
{
_id: 1,
name: "computer monitors",
},
{
_id: 2,
name:... |
<template>
<!-- 付款方式 -->
<div class="pay">
<h2>付款資訊</h2>
<nav>
<form>
<section>
<label for="phone">卡號:</label>
<template v-for="(input, index) in cardNumberInputs" :key="index">
<input
v-model="input.value"
:placeholder="'XXXX'"
... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
import { AgmCoreModule } from '@agm/core';
import { AppComponent } from './app.component';
import { LoginComponent } from './components/login/login.component';
import { L... |
import { useContext, useEffect, useState } from "react";
import random from "../utils/random";
import { commitmentHash, nullifierHash } from "../utils/createHash";
import {
approve,
getDetails,
getL2contract,
get_token_name,
toHex,
fetchData,
toDecimal,
} from "../web3/web3";
import { CreateTicketQR } fro... |
import React from 'react';
import PropTypes from 'prop-types';
import TodoItem from '../TodoItem/TodoItem';
const TodoListItems = ({
todos,
handleRemoveTodo,
handleCompleteTodo,
handleEditTodo,
}) => (
<ul className="listItems">
{todos.map((todo) => (
<TodoItem
key={todo.id}
todo={t... |
@Category({MasterTests.class,MediumTests.class}) public class TestHMasterRPCException {
@ClassRule public static final HBaseClassTestRule CLASS_RULE=HBaseClassTestRule.forClass(TestHMasterRPCException.class);
private static final Logger LOG=LoggerFactory.getLogger(TestHMasterRPCException.class);
private final HBa... |
import functions_framework
import firebase_admin
from firebase_admin import firestore
import datetime
#initialize app
app = firebase_admin.initialize_app()
@functions_framework.http
def viewcount_http(request):
"""HTTP Cloud Function.
Args:
request (flask.Request): The request object.
<https:... |
<script setup>
import { ref, watch, onMounted } from 'vue';
import { createPopper } from '@popperjs/core'
import Svg from '@components/Svg.vue';
// HTML Elements
const button = ref(null)
const tooltip = ref(null)
const popperInstance = ref(null)
const list = ref(null)
const listwrap = ref(null)
const listHeight = ref... |
//{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution
{
public:
int largestIsland(vector<vector<int>>& grid)
{
int n = grid.size();
vector<pair<int, int>> directions = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};
... |
#ifndef RAY_H
#define RAY_H
#include "Point.h"
#include "Vector.h"
#include<iostream>
#include<ostream>
// Represents a ray with an origin point and a direction
class Ray
{
private:
// Object variables
Point orig;
Vector dir;
public:
// Constructor to make a ray with a given point and direction
Ray(Point p, Vec... |
# Google Search API 概要
このドキュメントでは、Google Search API の導入方法について説明します。
Google Search API は、Google 検索エンジンの機能を利用するための API です。この API を使用することで、検索結果の取得や検索クエリの実行などを行うことができます。
## 導入手順
以下の手順に従って、Google Search API を導入してください。
1. Google Cloud Platform にアクセスし、プロジェクトを作成します。
2. プロジェクトのダッシュボードから、Google Search API を有効化します。
3. API キー... |
using Application.Core;
using Application.Interfaces;
using Domain;
using FluentValidation;
using MediatR;
using Microsoft.EntityFrameworkCore;
using Persistence;
namespace Application.Activities
{
public class Create
{
/*
This class is used to create a new activity
The Command class i... |
using Lib9c.GraphQL.Types;
using Mimir.GraphQL.Objects;
using Nekoyume.Model.Elemental;
using Nekoyume.Model.Item;
using Nekoyume.Model.Stat;
namespace Mimir.GraphQL.Types;
public class ItemType : ObjectType<ItemObject>
{
protected override void Configure(IObjectTypeDescriptor<ItemObject> descriptor)
{
... |
import { CardWrapper } from "@/components/card-wrapper";
import { FormInput } from "@/components/form-components/form-input";
import { Icons } from "@/components/icons";
import { Button } from "@/components/ui/button";
import { Form } from "@/components/ui/form";
import { NextChatAppForm } from "@/types/form-interface"... |
#include <iostream>
#include <string>
class Quote {
public:
Quote() = default;
Quote(const std::string& bn, const double p): bookNo(bn), price(p) {}
virtual ~Quote() = default;
std::string isbn() const {return bookNo;}
virtual double net_price(const size_t n) const {return n * price;}
private:
... |
import numpy as np
import pandas as pd
from auxiliary import enumerate_actions
class Game:
def __init__(self,S,N,nr_steps,multiple):
assert S > N
self.actions = enumerate_actions(S,N)
self.nr_actions = len(self.actions)
self.utilities = self.precompute_utilities()
... |
<template>
<div>
<main>
<h1>Result</h1>
<img :src="resultDesc[mbti].img" :alt="resultDesc[mbti].title" />
<h1>{{ resultDesc[mbti].title }}</h1>
<p v-html="resultDesc[mbti].description"></p>
<Button text="Restart" :clickEvent="reset" />
</main>
</div>
</template>
<script>
import... |
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { IPokemon } from '../pokemon/Pokemon';
@Injectable({
providedIn: 'root',
})
export class PokemonService {
pokemonList: IPokemon[] = [];
private url: string = 'https://pokeapi.co/api/v2/pokemon/';
typeList: an... |
require(rstan)
require(cmdstanr)
require(here)
######################################################
b = rnorm(10,4,0.5)
a = runif(10,1,2)
t <- rnorm(150,0,.5)
d <- matrix(nrow=150,ncol=10)
for(i in 1:150){
for(j in 1:10){
d[i,j]=rnorm(1,b[j]-t[i],1/a[j])
}
}
###############################################... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.