text stringlengths 184 4.48M |
|---|
<!--yml
category: codewars
date: 2022-08-13 11:48:20
-->
# Codewars第九天–Can you get the loop ?_soufal的博客-CSDN博客
> 来源:[https://blog.csdn.net/u011562123/article/details/81946003?ops_request_misc=&request_id=&biz_id=102&utm_term=codewars&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-9-819... |
import { SWAllItemsResponse } from '@core/models/intefaces/common-response.interface';
import { gameReducer, initialState } from '../game.reducer';
import { GameApiActions } from '../actions';
describe('Game reducer', () => {
it('should update isLoading state', () => {
const state = gameReducer(
initialSta... |
package com.test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import java.util.stream.Collectors;
import com.test.Member.MemberDto;
import java.util.ArrayList;
class Member {
private String use... |
// Write a function that takes in an array of numbers and returns an array with all numbers multiplied by 3.
const testArr1 = [3, 9, 15, 4, 10]
// // output: [9, 27, 45, 12, 30]
const mult3 = (array) => {
let newArray = []
for (let i = 0; i < array.length; i++){
newArray.push(array[i] * 3)
}
r... |
import torch
def make_dataset():
"""Return train and test dataloaders for MNIST."""
train_data, train_labels = (
[],
[],
)
for i in range(5):
train_data.append(torch.load(f"data/raw/corruptmnist/train_images_{i}.pt"))
train_labels.append(torch.load(f"data/raw/corruptm... |
// copied from 1-usertojson.dart, adding id prop, new instance fromJson, and method toString
class User {
// Propteries
String name;
int age;
double height;
int id;
// Constructor w/ named parameters
User({required this.name, required this.age, required this.height, required this.id});
// Method
Str... |
async function rangosSalarialesDropdown() {
try {
const respuestaRangosSalariales = await fetch("http://localhost:3000/rangosSalariales");
const rangosSalariales = await respuestaRangosSalariales.json();
console.log(rangosSalariales);
const rangosSalarialesHTML = document.getElementById("... |
<?php
namespace App\Models;
use App\Enum\ShippingOptionTypeEnum;
use App\Models\Traits\Activatable;
use App\Models\Traits\HasFeUsage;
class ShippingOption extends BaseModel
{
use Activatable;
use HasFeUsage;
protected $fillable = [
'name',
'type',
'logo',
'params',
... |
import { db } from './config/firebase';
import { setDoc, doc, getDoc, updateDoc, Timestamp } from 'firebase/firestore';
import { UserInfo } from 'firebase/auth/cordova';
export interface FirestoreUserProfile {
uid: string;
displayName: string;
email: string;
phoneNumber: string | null;
photoURL: string;
pr... |
# python imports
from argparse import Namespace
from struct import pack
from typing import Iterator
from ebp.common.algorithm.mersenne_twister import MtSequenceEncoders
### Encoders to take the MT sequence and present the value in a defined manner.
class MtSequenceCliEncoders(dict):
## Creates a new instanec o... |
#include <stdio.h>
#include <string.h>
#include "encode.h"
#include "types.h"
#include "common.h"
/* Function Definitions */
//step 1.1 step validation check (used for both encoding and decoding)
Status validation_check(int argc)
{
if( argc > 2 && argc <= 5 )
{
printf("validation successfull\n");
return e_s... |
<!-- Improved compatibility of back to top link: See: https://github.com/jamesfrienkins3452/FEP-13-website-project/pull/73 -->
<a name="readme-top"></a>
<!--
*** Thanks for checking out the Best-README-Template. If you have a suggestion
*** that would make this better, please fork the repo and create a pull request
***... |
<template>
<view class="content">
<view class="opreate">
<view>在下面的画布中随意创作吧</view>
<view class="btnGroup">
<button type="default" style="margin-right: 20rpx;" @tap="clearEvent">
<image src="../../static/icon/del.png"></image>
</button>
<button type="default">
<image src="../../static/icon... |
const { DataTypes } = require("sequelize");
module.exports = (sequelize) => {
sequelize.define(
"Country",
{
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false,
},
name: {
type: DataTypes.STRING,
allowNull: ... |
package nuber.students;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.Date;
public class Booking {
private static final AtomicInteger nextId = new AtomicInteger(1); // For unique, sequential job IDs
private final int jobId;
private final NuberDispatch dispatch;
private final Passenger passen... |
import { Request } from "express";
import { uuid } from "uuidv4";
import Slug from "../utils/Slug";
//model
import User from "../models/user";
interface paginateObject {
next: {},
previous: {},
data: []
}
class UserRepository {
body: Request['body'];
params: Request['params'];
query: Request[... |
package ian.Behavioral.Iterator.level2;
import java.util.*;
class DFSIterator implements Iterator {// 深度優先搜索
private Set<User> visited = new HashSet<>();
private Stack<User> check = new Stack<>();
public DFSIterator(User startUser) {
check.push(startUser);
}
@Override
public boolean ... |
package com.cq.seckill.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@AllArgsConstructor
@Data
@NoArgsConstructor
/**
* 公用返回响应对象
*/
public class RespBean {
private long code;
private String message;
private Object obj;
/**
* 成功返回结果
* @return
... |
import { Body, Controller, Get, Param, ParseUUIDPipe, Patch, Query } from '@nestjs/common';
import { ApiTags, ApiQuery, ApiOperation, ApiOkResponse, ApiParam, ApiBody } from '@nestjs/swagger';
import joi2swagger from 'src/common/utils/joi2swagger';
import { UserId } from 'src/common/decorators/user.decorator';
import {... |
import React, { useEffect, useState } from 'react';
import { ScrollView, View } from 'react-native';
import { Input, useTheme } from 'react-native-elements';
import { SwitchInput } from '../../../components/SwitchInput';
import { ENUM_AUTOMATION_TYPE } from '../../../enums';
import { ScheduleInput } from './ScheduleIn... |
/**
* @name CommandLineParser/tests/TestVerifyData.cpp
* @copyright (c) 2022 Sam Caldwell. All Rights Reserved.
* @author Sam Caldwell <mail@samcaldwell.net>
*/
#include "projects/application/CommandLineParser/src/CommandLineParser.h"
class TestBasic : public TestBase {
private:
ConfigStateMap *map;
Conf... |
import {
Body,
Controller,
Post,
HttpStatus,
HttpException,
UseGuards,
Put,
Param,
Get,
Query,
Delete,
} from "@nestjs/common";
import { z } from "zod";
import { ZodValidationsPipe } from "../../../pipes/zod-validations-pipe";
import { CreateBrandUseCase } from "@/domain/catalog/application/use-ca... |
# This program is the pipeline for testing expressiveness.
# It includes 4 stages:
# 1. pre-calculation;
# 2. dataset construction;
# 3. model construction;
# 4. evaluation
from data_utils.preprocess import drfwl2_transform, drfwl3_transform
import numpy as np
import torch
import torch_geometric
from pygmmpp.d... |
import React, { FC } from 'react';
import Layout from 'src/components/layout/Layout';
import TicTacToePlayer from 'src/components/tictactoe/player/TictactoePlayer';
import { useAuth } from 'src/firebase';
import useTranslate from 'src/hooks/useTranslate';
import useIsLocalStorageReady from 'src/hooks/useIsLocalStorage... |
# The robot should use the orders file (.csv ) and complete all the orders in the file. orders.csv
# Only the robot is allowed to get the orders file. You may not save the file manually on your computer.
# The robot should save each order HTML receipt as a PDF file.
# The robot should save a screenshot of each of the o... |
import { NextResponse, NextRequest } from "next/server";
import { NextApiRequest, NextApiResponse } from 'next';
import OpenAI from "openai";
require('dotenv').config({ path: ['.env.local', '.env'] });
export async function POST(req: NextRequest, res: NextResponse) {
if (req.method === 'POST')
{
con... |
from __future__ import annotations
from typing import List
from discord import Interaction, InputTextStyle
from discord.ui import InputText
from UI.Common import FroggeModal
################################################################################
__all__ = ("BGCheckVenueModal",)
###########################... |
/**
* Copyright (C) 2006 NetMind Consulting Bt.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* Thi... |
import type { PostSummary, PostType } from '@/server/data_types/post'
import Image from 'next/image'
import Link from 'next/link'
import { format } from 'date-fns'
import { classnames } from '@/lib/classnames'
import { Card } from '@/ui/card/card'
import { PostTypesDisplayMapping } from '@/server/data_types/post'
// ... |
import gym
import random
from tensorflow.keras import Sequential
from collections import deque
from tensorflow.keras.layers import Dense
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.optimizers import RMSprop
from keras import optimizers
import matplotlib.pyplot as plt
from tensorflow.keras.activat... |
{% extends 'layout.html' %}
{% load i18n static djmoney custom_filters %}
{% block page_content %}
<div class="Middle Middle_top">
<div class="Section">
<div class="wrap">
<div class="Product">
<div class="ProductCard">
<div class="ProductCard-look">
<div class="... |
<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 Object MOdel, DOM</title>
<link rel="favicon" href="./../favicon.ico" type="image/x-icon">
<!-- Bo... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ShrubberyCreationForm.cpp :+: :+: :+: ... |
import { Request, Response, NextFunction } from "express";
import ErrorResponse from "../utils/errorResponse";
const errorHandler = (
err: any,
req: Request,
res: Response,
next: NextFunction
) => {
let error = { ...err };
error.message = err.message;
// Log to the console
console.error(err);
// If... |
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { combineLatest, Subject, Subscription } from 'rxjs';
import { Army, BoardLocation, UnitType } from 'src/app/models/game-models';
import { GameContext } from 'src/app/models/game-utility-models';
import { GameContextService } from 'src/app/serv... |
import { FunctionComponent } from "react";
import { AbsoluteFill, Easing, interpolate, useCurrentFrame } from "remotion";
import Layout from "./Layout";
interface AboutProps {}
interface TextProps {
children: React.ReactNode;
index: number;
isLast?: boolean;
}
const Text: FunctionComponent<TextProps> = ({ chil... |
const express = require("express");
const { check, validationResult } = require("express-validator");
const usersRepo = require("../../repositories/users");
const signupTemplate = require("../../views/admin/auth/signup");
const signinTemplate = require("../../views/admin/auth/signin");
const {
requireEmail,
requir... |
import torch
import torch.nn as nn
from functools import partial
import clip
from einops import rearrange, repeat
from transformers import CLIPTokenizer, CLIPTextModel
import kornia
from ldm.dream.devices import choose_torch_device
from ldm.modules.x_transformer import (
Encoder,
TransformerWrapper,
) # TODO:... |
---
title: Diseño de Páginas Web para Agencias de Seguros en Elche
date: '2023-10-04'
tags: ['Diseño web', 'Agencias de Seguros', 'Elche']
draft: false
banner : diseño_paginas_web_agenciasdeseguros
fondoBanner : diseño_pagina_web_elche
summary: El diseño de páginas web se ha convertido en una herramienta fundamental pa... |
/* eslint-disable jsx-a11y/anchor-is-valid */
import React from "react";
import { Link } from "react-router-dom";
import { Form, Formik } from 'formik'
import * as yup from 'yup'
import { SelectField, TextInput } from "../components/CustomFormFields";
import YupPassword from "yup-password";
YupPassword(yup);
const Reg... |
import { Component } from '@angular/core';
import {
FormControl,
FormGroup,
ReactiveFormsModule,
Validators,
} from '@angular/forms';
import { Router, RouterLink } from '@angular/router';
import {
ButtonModule,
CardModule,
FormModule,
TooltipModule,
} from '@coreui/angular-pro';
import { cilCommentBubbl... |
import React from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import { render, screen } from '@testing-library/react';
import FlyoutVideo from '../flyout-video';
describe('FlyoutVideo', () => {
const sampleURL = 'https://www.example.com/sample-video';
beforeEach(() => {
rend... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cart - Pharmacy manager</title>
<meta name="description" content="Pharmacy manager">
<!-- style -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/ma... |
## --------------------------- \
# import best-performing first-stage SOM and extract codebook vectors
prototypes = readr::read_rds(here("data/som_files/som_files_full/som1_nrc_22_iter_40.rds"))
prototypes = prototypes$codes[[1]] |> as.data.frame()
# set range of second-stage SOM following range suggested by Eisenack ... |
# MapCycle Plugin for CounterStrikeSharp
<!-- Langue: English -->
## <u>Overview</u>
MapCycle is a plugin designed for CounterStrikeSharp. This plugin enables server administrators to automate the rotation of a predefined list of maps. It's compatible with both standard and workshop maps.
## <u>Donate</u>
I dedicate ... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var mplTokenMetadata = require('@metaplex-foundation/mpl-token-metadata');
var Operation = require('../../../types/Operation.cjs');
var TransactionBuilder = require('../../../utils/TransactionBuilder.cjs');
// -----------------
// Operation... |
#' Creates a random matrix of transfers between metapopulations
#'
#' @param nmetapop number of metapopulations
#' @param scale average number of transfers for each pair of metapopulations
#'
#' @return transfer matrix
#' @export
#'
make_fake_matrix <- function(nmetapop, scale = 5){
# set.seed(1)
output <- matrix(0... |
package org.my.homeworks.HW36.controllers;
import java.util.List;
import org.my.homeworks.HW36.entities.Order;
import org.my.homeworks.HW36.repositories.OrderRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework... |
<p>上一节qemu初始化的main函数,我们解析了一个开头,得到了表示体系结构的MachineClass以及MachineState。</p><h2>4.初始化块设备</h2><p>我们接着回到main函数,接下来初始化的是块设备,调用的是configure_blockdev。这里我们需要重点关注上面参数中的硬盘,不过我们放在存储虚拟化那一节再解析。</p><pre><code>configure_blockdev(&bdo_queue, machine_class, snapshot);
</code></pre><h2>5.初始化计算虚拟化的加速模式</h2><p>接下来初始化的是计算虚拟化的加速模式,也即要不要使用K... |
# LNBits-phoenixd
## What this is:
Run a super light, simple Lightning node (phoenixd) together with LNBits within Docker.
This is a docker-compose.yml for lnbits dev branch at LNBITS_COMMIT_HASH=2db5a83f4ed5dd21d99123a0947238f0674270c0, release 0.12.8
and phoenixd Dockerfile, source: https://github.com/ACINQ/phoeni... |
+------------------------------------------------------------------------------------
Heroku
+------------------------------------------------------------------------------------
--> Heroku is PAAS for hosting app on cloud.
--> It is essentially a cloud of Git repositories.
--> It uses Git as the deployment method.
... |
<template>
<span ref="elSpan">{{showText}}</span>
</template>
<script lang='ts'>
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
@Component({
name: 'format-text-span',
})
export default class FormatTextSpan extends Vue {
@Prop(String) value!: string; // 必选 文本值
@Prop(Number) par... |
# -*- coding: utf-8 -*-
from odoo.tests import tagged
from odoo.tests.common import TransactionCase
from odoo import Command
@tagged("post_install", "-at_install")
class TestAnalyticAccount(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.analytic_plan_1 = cls.env... |
import React, { useContext, useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { AnswerContext } from "../../store/answer-context";
import { AuthContext } from "../../store/auth-context";
import "./ViewAnswerStyle.css";
import BackspaceIcon from "@mui/icons-material/Backspace";
... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';
import { CatejerciciosAdminComponent } from './catejercicios/admin/catejercicios-admin.component';
import { CatejerciciosIniService } from './catejercicios/services/catejerci... |
# Quick Start
Here's an example that will let you easily add the "Major Donor" tag to a contact from your search results:
#### Configure a Search View
* Go to **Administration menu » Customize Data and Screens » Profiles**.
* Next to an existing profile, click the "Settings" link (screenshot 1).
* Check the box label... |
package com.example.puzzlejfx;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Set;
class AStar {
static class Node {
int[][] board;
Node parent;
int cost;
int heuristic;
... |
import 'package:flutter/material.dart';
import 'package:login/login_page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
... |
package httpSave
import (
"bytes"
"encoding/json"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"net/http"
"net/http/httptest"
"testing"
"urlShortener/internal/storage"
)
type mockShortURLGetter struct {
mock.Mock
}
func (m *mockShortURLGetter) GetShor... |
# 구조체
## 구조체란?
구조체는 다양한 데이터 타입을 하나로 묶어서 다루는 방식입니다.
```c
struct 구조체이름 {
자료형 멤버이름1;
자료형 멤버이름2;
// 추가 멤버들...
};
```
여기서 `struct`는 구조체를 정의할 때 사용하는 키워드이며, `구조체이름`은 사용자가 지정하는 구조체의 이름입니다. 이어지는 중괄호 `{}` 내부에는 멤버들의 선언이 들어갑니다. 각 멤버는 자료형과 멤버이름으로 구성됩니다.
다음은 학생의 이름, 나이, 평균 성적을 구조체로 정의한 예시 입니다.
```c
struct Student {... |
import assert from 'node:assert';
import { it, expect, describe, beforeEach } from 'vitest';
import { createPinia, setActivePinia } from 'pinia';
import { useCategoryStore } from '~/store/category';
describe('categories', () => {
beforeEach(() => {
setActivePinia(createPinia());
});
it('update of root', () ... |
package com.klimov.lab2;
import com.klimov.lab2.lexems.Lexeme;
import com.klimov.lab2.lexems.TypeLexeme;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
/**
* This class contains test cases to verify the functionality of the {@link Lexeme} class.
* It tests various constructors,... |
import {menu} from "@/app/_api/menu.json";
export default function ColsDrinks() {
// Find the category with id=7 (Cold Drinks)
const coldDrinksCategory = menu.find((category) => category.category_id === "7");
if (coldDrinksCategory) {
const {subcategories} = coldDrinksCategory;
return (
... |
package model;
/**
* Individual class represents an individual with a state, the time spent in that state,
* and associated parameters.
*/
public class Individual
{
private State state; // Current state of the individual
private int timeInState; // Time the individual has spent in the current state
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<title>Frontend Mentor | Product pre... |
// Add your custom JavaScript code here
// For example, you can add smooth scrolling to the page
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
... |
---
sort: 1
---
# docker
- 官网: [https://docker.io](https://docker.io)
- 官方仓库:[https://hub.docker.com/](https://hub.docker.com/)
- 在线中文书:[https://github.com/yeasy/docker_practice](https://github.com/yeasy/docker_practice)
- Docker 资源(cpu、memory)限制实践篇:[https://blog.csdn.net/jzg5845201314/article/details/105295310/](http... |
# AliyunOSSManager
## 1. 配置文件修改
配置文件为yaml格式,注意 ":" 后的空格,一定要保留
```yaml
# oss-admin config.yaml
Endpoint: "your-Endpoint"
AccessKeyId: "your-AccessKeyId"
AccessKeySecret: "your-AccessKeySecret"
BucketName: "your-bucket"
```
在配置文件中填入你要使用的OSS的Endpoint、AccessKeyId、AccessKeySecret、BucketName即可开始使用。
BucketName可设置为空值“”,通... |
import {
Stat,
StatLabel,
StatNumber,
useColorModeValue,
} from '@chakra-ui/react';
import React from 'react';
const BigStat = ({
label,
value,
}: {
label: string;
value: string | number;
}) => {
const labelColor = useColorModeValue('gray.600', 'gray.300');
return (
<Stat>
<StatLabel colo... |
/**
* net_phy.cpp
*
*/
/* Copyright (C) 2023 by Arjan van Vught mailto:info@gd32-dmx.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limita... |
//
// This file is part of the NineAnimator project.
//
// Copyright © 2018-2020 Marcus Zhou. All rights reserved.
//
// NineAnimator 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 ... |
import React, { useState, useEffect } from 'react';
import classes from './paymentPage.module.css';
import { getNewOrderForCurrentUser, createOrder } from '../../services/orderService'; // Import the createOrder function
import Title from '../../components/Title/Title';
import OrderItemsList from '../..... |
 
# Rails Blog App
> A fully functional blog app written in Ruby on Rails as a learning exercise...
## About
### Features
- Create ... |
"""Typing test implementation"""
from utils import lower, split, remove_punctuation, lines_from_file
from ucb import main, interact, trace
from datetime import datetime
###########
# Phase 1 #
###########
def choose(paragraphs, select, k):
"""Return the Kth paragraph from PARAGRAPHS for which SELECT called on ... |
/*!
* jQuery JavaScript Library v1.12.4
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-05-20T17:17Z
*/
(function( global, factory ) {
if ( typeof module ... |
import { NextApiRequest, NextApiResponse } from 'next';
export default async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
try {
// Save the data to the collection
const getRes = await fetch(`https://dummyjson.com/products?offset=0&limit=10`, {
method: 'GET',
headers: {
'Content-Typ... |
# Minimum XOR
В задачата ще трябва да отговорете на Q на брой заявки върху множество от числа S.
Първоначално множеството S съдържа само 1 елемент - 0 (S={0}). При всяка заявка се въвежда едно цяло число Pi, което се добавя към множеството (S не е мултимножество => ако числото Pi вече се среща в множеството, то не тр... |
<!DOCTYPE html>
<html lang="pt-br">
<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" />
<!--comando sass usar na pasta aula 9: sass --watch scss/style.scss:css/style.css-->
<!--Css bootstra... |
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>FriendFinder</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.3/css/bulma.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<scri... |
import { StarknetWithoutSignerBaseCommand } from "../../../starknet";
import { Args } from "@oclif/core";
import { AttestationQueueAccount } from "@switchboard-xyz/starknet.js";
export default class AttestationQueuePrint extends StarknetWithoutSignerBaseCommand {
static enableJsonFlag = true;
static description ... |
import React, { useContext,useEffect,useState } from "react";
import { Button, Box,Divider, Grid } from "@mui/material";
import TextField from "@mui/material/TextField";
import { StoreContext } from "../context/StoreContext";
import axios from "axios";
import {useNavigate} from 'react-router-dom'
import emailjs from '@... |
use crate::object_id::ObjectId;
use crate::pg_interval::Interval;
use crate::quoting::AttemptedKeywordUsage::TypeOrFunctionName;
use crate::quoting::{quote_value_string, IdentifierQuoter, Quotable};
use crate::whitespace_ignorant_string::WhitespaceIgnorantString;
use serde::{Deserialize, Serialize};
#[derive(Debug, Eq... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Step 3</title>
</head>
<body>
<!--------------------------------------------------------------HTML CONTENT-------------------------------------------------------------->
<!--Skip to content link:
This link is there so the ... |
import asyncio
from abc import ABC, abstractmethod
from src.database.models import Timer
class BaseTimer(ABC):
def __init__(
self, chat_id: int, message_id: int, seconds_expiry: int, step: int = 5,
):
self.time = seconds_expiry
self.step = step
self.message_id = message_... |
import React, { useState } from "react";
import "./contactUsForm.css";
import { hostname } from "../../hostname";
function ContactForm() {
const [formData, setFormData] = useState({
name: "",
email: "",
subject: "",
message: "",
});
const handleChange = (e) => {
const { name, value } = e.tar... |
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { NestExpressApplication } from '@nestjs/platform-express';
import { getBodyParserOptions } from '@nestjs/platform-express/adapters/utils/get-body-parser-options.util';
import { json, urlencoded } from 'express';
import { Valid... |
def Gf(counts):
r'''Estimates the ideal-gas Gibbs energy of formation at 298.15 K of an
organic compound using the Joback method as a function of chemical
structure only.
.. math::
G_{formation} = 53.88 + \sum {G_{f,i}}
In the above equation,... |
//
// LiveACtivityManager.swift
// SampleLiveActivity
//
// Created by Christeena John on 09/05/2023.
//
import Foundation
import ActivityKit
import Combine
final class LiveActivityManager {
static let shared = LiveActivityManager()
private init() {}
private var deliveryActivity: Activity<StatusA... |
import { Card, CardBody, Text, Center, Flex, Button, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, useDisclosure, Divider, Select } from '@chakra-ui/react'
import { useContext, useEffect, useState } from 'react'
import { UserContext } from '../../context/UserContext'
import ... |
/**
* Created by Jeremy S. Johnson, Perficient Inc., 1/27/2020.
*/
public with sharing class CDdBatchLeadConvert implements Database.Batchable<String>, Database.Stateful {
private final String status = 'Meeting Ran / Negotiated';
private final String partitionPrefix = 'local.DoorDash.bulkLeadConvert';
pri... |
//
// K&R, 2nd edition, page 15
//
(* ****** ****** *)
//
// Translated into ATS
// by Hongwei Xi (hwxi AT cs DOT bu DOT edu)
//
(* ****** ****** *)
(*
#define LOWER 0
#define UPPER 300
#define STEP 20
main () {
int fahr;
for (fahr = LOWER; fahr <= UPPER; fahr += STEP) {
printf ("%3d %6.1f\n", fahr, (5.0/... |
import uvicorn
import os
from fastapi import FastAPI, Form, Request, BackgroundTasks
from fastapi.responses import HTMLResponse
from fastapi.templating import Jinja2Templates
import websockets
import json
from break_into_units import process_text
from celery import Celery
celery = Celery('tasks', broker='pyamqp://gues... |
<!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>
<div>
<h1>Meta Tag Document</h1>
</div>
<div>
<h2><u>Meta:</u></h2>
<p><li>This tag defines metadat... |
import React, {useContext} from 'react';
import DeleteChannelBtn from "../../../Components/Channels/DeleteChannelBtn";
import InviteToChannelBtn from "../../../Components/Channels/InviteToChannelBtn";
import JoinToChannelBtn from "../../../Components/Channels/JoinToChannelBtn";
import {UsersOfChannels} from "../UsersOf... |
import re
# DESAFIO 1
# Encontre a palavra simples
# Olá! sou uma frase simples
desafio1 = 'Olá! sou uma frase simples'
padrao = r'\bsimples\b'
result = re.findall(padrao, desafio1)
print(result)
#DESAFIO 2
# Encontre todas as ocorrência de 23(os números juntos) e exatamente com esses valores
'''
dev123com
developer ... |
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
use Automattic\Jetpack\Status;
require_once __DIR__ . '/class.jetpack-admin-page.php';
require_once __DIR__ .... |
<!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>Callbacks</title>
<script>
// const abc = () => {
// console.log('abc')
// }
// abc()
// Callbacks:
// - ... |
---
title: Extraheer tekst uit specifieke gebieden met opties
linktitle: Extraheer tekst uit specifieke gebieden met opties
second_title: GroupDocs.Parser .NET API
description: Leer hoe u tekst uit specifieke gebieden in documenten kunt extraheren met GroupDocs.Parser voor .NET. Ontdek geavanceerde opties voor tekstext... |
import 'package:demo_app/core/themes/screen_utility.dart';
import 'package:demo_app/features/cart/cart_screen.dart';
import 'package:demo_app/features/grocery/view/home_screen.dart';
import 'package:demo_app/features/tabs/view/tab_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/... |
# 使用 Typescript 字符串枚举?考虑字符串文字!
> 原文:<https://dev.to/bholmesdev/using-enums-with-string-values-in-typescript-consider-string-literals-instead-486e>
如果您使用 TypeScript 已经有一段时间了,您可能至少曾经对此感到疑惑:
我可以在 TypeScript 枚举中使用字符串值代替数字吗?
当你希望一个变量有几个选择的字符串值时,经常会出现这种情况。例如,假设您正在为一个网站创建一个横幅,黄色表示警告,红色表示紧急情况。您想让一些东西可重用,所以您添加了一个 enum,用于它是哪... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.