text
stringlengths
184
4.48M
<template> <div class="table-responsive"> <table class="table"> <tr> <th style="width: 20%;">Title</th> <td>{{taskInfo.title}}</td> </tr> <tr> <th style="width: 20%;">Priority</th> <td> <s...
/* This file is part of libkabc. Copyright (c) 2004 Tobias Koenig <tokoe@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (...
<!-- * @Descripttion: * @version: * @Author: by_mori * @Date: 2021-09-25 23:09:37 * @LastEditors: by_mori * @LastEditTime: 2021-09-26 10:48:22 --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content=...
from turtle import Turtle class Snake(object): def __init__(self) -> None: self.XCORR = 0 self.yCORR = 0 self.segments = [] for i in range(3): t = Turtle(shape='square') t.penup() t.color('Spring Green') t.set...
import React, { useState } from "react"; import { MdEdit } from "react-icons/md"; import AdminEditProduct from "./AdminEditProduct"; function AdminProductCard({ data, fetchData }) { const [editProduct, setEditProduct] = useState(false); return ( <div className="bg-white p-4 rounded-lg mt-2 h-64"> <div c...
// Copyright (c) 2013 Dougrist Productions // // 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 limitation the // rights to use, copy, modify, merge, p...
import * as request from 'supertest'; import { omit } from 'lodash'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { createTestApplication } from '@app/tests/utils/helpers.utils'; import { UserEntity } from '@app/entities'; import { ProfessionEnum } from '@app/enum'; describe('UserController',...
import { useState } from 'react'; import { Container, Space, TextInput, PasswordInput, Button, Alert } from '@mantine/core'; import { useForm } from '@mantine/form'; export default function Login({ setToken, setTab }) { const [alertOpen, setAlertOpen] = useState(false); const [isLogging, setIsLoggin...
import fs from 'fs'; import yargs from 'yargs'; import { mkdirpSync } from 'fs-extra'; import path from 'path'; import convertPythonModel from './convert-python-model'; import { getString } from './prompt/getString'; import { ifDefined } from './prompt/ifDefined'; import { ProgressBar } from './utils/ProgressBar'; /**...
package com.master.controller; import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; import org.jdbi.v3.core.Jdbi; import com.master.MasterConfiguration; import com.master.api.ApiResponse; import com.master.client.LinkageNwService; import com.master.core.constants.Constants; impor...
#Script used to create goterms.gmt file used for Mitch and enrichment analysis #Load GO terms blasted from Omicsbox goterms <- read.delim('pc.goterms.txt', header = TRUE) %>% dplyr::select(c(SeqName, GO.IDs, GO.Names, Description)) colnames(goterms) <- c("protein_id", "GO_terms", "GO_descripton", "description") ...
import { BookCardContainer, BookCardContent } from './styles' import Image from 'next/image' import StarsRating from '@/components/StarsRating' interface BookCardProps { coverImageUrl: string title: string author: string rate: number } export default function BookCard({ coverImageUrl, title, author, r...
<template> <div class="order" v-loading="loading"> <el-tabs v-model="activeName" > <el-tab-pane label="所有订单" name="AllOrder"> <el-table :data="orders"> <el-table-column label="订单编号" prop="id"></el-table-column> <el-table-column label="下单时间" prop="orderTime"></el-tab...
#Region "Microsoft.VisualBasic::4e5cdf96e4f3060657a08b5ba647d03c, sciBASIC#\Data\BinaryData\HDF5\types\FixedPoint.vb" ' Author: ' ' asuka (amethyst.asuka@gcmodeller.org) ' xie (genetics@smrucc.org) ' xieguigang (xie.guigang@live.com) ' ' Copyright (c) 2018 GPL3 Licensed...
from flask import Flask, render_template, request, jsonify import joblib import numpy as np app = Flask(__name__) # Load the pre-trained model model_path = 'model.pkl' try: with open(model_path, 'rb') as model_file: model = joblib.load(model_file) except Exception as e: print(f"Error loading the model...
package com.udemy.groceryshoppingapi.auth.service import com.udemy.groceryshoppingapi.auth.entity.VerificationToken import com.udemy.groceryshoppingapi.auth.repository.VerificationTokenRepository import com.udemy.groceryshoppingapi.auth.util.SignUpMapper import com.udemy.groceryshoppingapi.dto.AuthenticationRequest im...
import React from 'react'; import { Formik, Form, Field, ErrorMessage } from 'formik'; import * as Yup from 'yup'; const FormVal = Yup.object({ nombre: Yup.string().required('Necesario'), apellido: Yup.string().required('Necesario'), direccion: Yup.string().required('Necesario'), email: Yup.string().em...
# Memo Pope TV - assert - 경우의 수를 줄여라. - 나의 확신과 판단이 코드에 들어간다. - e.g. 어떤 수를 짝수로 바꾼 뒤에는 그게 짝수인지 assert를 넣어도 된다. - 그러니까 나는 분명 짝수로 바꿈!! 그렇게 알고 있으셈! 했는데 짝수가 나올수도 있으니 그걸 체크해라. - string에서 첫 단어 자르기 연산을 한 뒤 새 string이 대문자로 시작하는 지 assert를 넣어도 된다. - 즉, 내가 작성한 code에 대해서 일어나선 안될 일에 대해서 체크? Deterministic / Non-Determinist...
import React, { useEffect, useState } from "react"; import "../styles/cartPage.css"; import { useAuthContext } from "../context/AuthContext"; import ProductCard from "../components/ProductCard"; import { useNavigate } from "react-router-dom"; import { useStoreContext } from "../context/storeContext"; import { PulseLoad...
import React, { useState } from 'react'; import { Form, Button, Container, Row, Col } from 'react-bootstrap'; import { Link, useNavigate } from 'react-router-dom'; import { useSignupUserMutation } from '~/services/appApi'; import './signup.css'; import botImg from '~/assets/images/bot.jpeg'; import Loading from '~/com...
import 'dart:io'; import 'package:flutter_qrscan/models/scan_model.dart'; import 'package:path/path.dart'; import 'package:path_provider/path_provider.dart'; import 'package:sqflite/sqflite.dart'; class DBProvider { static Database _database; static final DBProvider db = DBProvider._(); DBProvider._(); Futu...
/*------------------------------------------------------------------ * README * * Cisco ONE-P Python SDK * * Copyright (c) 2011-2014 by Cisco Systems, Inc. * All rights reserved. *------------------------------------------------------------------ */ Introduction: ------------ The APIs contained in these mo...
/** * @openapi * * /category/: * get: * tags: [Category] * summary: Get all categories * description: Use to request all categories * produces: * - application/json * responses: * 200: * description: List of categories * content: * application/json: * ...
import React, { useState } from 'react' import AppBar from '@mui/material/AppBar' import Box from '@mui/material/Box' import Container from '@mui/material/Container' import Toolbar from '@mui/material/Toolbar' import Typography from '@mui/material/Typography' import IconButton from '@mui/material/IconButton' import Na...
package com.ybg.rp.manager.partner import grails.test.mixin.* import spock.lang.* @TestFor(PartnerUserInfoController) @Mock(PartnerUserInfo) class PartnerUserInfoControllerSpec extends Specification { def populateValidParams(params) { assert params != null // TODO: Populate valid properties like...
import React, { createContext, useEffect, useState } from "react"; import axios from "axios"; const Greenshop = createContext(); export function Contexts({ children }) { const [data, setdata] = useState([]); const [uniquedata, setuniquedata] = useState(); const [productdata, setproductdata] = useState([]); co...
import { test, expect } from '@playwright/test'; const timeoutWait: number = 10000; test.describe('Лендинг', () => { test('Получение пробной версии', async ({ page }) => { await page.goto('https://elma365.com/ru/'); const getTrial = page.locator('#sticky-wrapper > header > div > nav > ul:nth-child(2) > li:n...
/* Write a function that takes a sentence string as an argument and returns that string with every occurrence of a "number word" — 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine' — converted to its corresponding digit character. P: - Take sentence string as argument - find any number w...
import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:get/get.dart'; import '../../core/presentation/themes/colors_manager.dart'; class HeadLineBottomSheet extends StatelessWidget { const HeadLineBottomSheet({ Key? key, this.height, required this.bottomSheetTitle...
package com.smakhorin.easycodeandroidtask.core.ui; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import com.smakhorin.easycodeandroidtask.R; public class WorkingHoursAlertDialog extends AlertDialog { private final Boolean isWithinWorkingHours; priva...
import React, { useState, useEffect } from "react"; import { AiFillPlayCircle } from "react-icons/ai"; import { getSearchMovie } from "../Api.js"; import { Link } from "react-router-dom"; const NowPlaying = () => { const [nowPlayingMovies, setNowPlayingMovies] = useState([]); const [searchInput, setSearchInput...
import re def _contains_date(text): # Check if the document contains a date # date can be in the format of 01/01/2021 or January 1, 2021 or 01-01-2021 or 01.01.2021 or 01 01 2021 or 1 Jan 2021 # or 1 January 2021 or 1st January 2021 or 1st Jan 2021 or 1st Jan, 2021 or 1st January, 2021 re_pattern = r'(...
package io.loopcamp.test.day01_Intro; import io.restassured.RestAssured; import io.restassured.response.Response; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; public class HelloWorldApiTest { String url = "https://sandbox.api.service.nhs.uk...
<?php namespace App\Models; use App\Traits\HasRateConversion; use Carbon\Carbon; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Order extends Model { use HasFactory,HasRateConversion; public const STATUS_PENDING = 1; public const STATUS_AWAITING_FULFI...
import { useState } from "react"; import { Navigate } from "react-router-dom"; import Input from "../layout/Input"; import ResetPasswordModal from "../modals/ResetPasswordModal"; import { doSignInWithEmailAndPassword } from "../../util/firebase/auth"; import { useAuth } from "../contexts/authContext"; import notificati...
<script lang="ts" setup> import {computed, onMounted, reactive, ref, watch} from 'vue'; import {type Coordinate, type FoodItemDTO, type FrogDTO} from "@/api/generated"; import {getTileType} from "@/composables/EditorHelper"; import {computedEager, useMouseInElement} from "@vueuse/core"; import {useAssetStore} from "@/s...
import "../styles/globals.css"; import type { AppProps as NextAppProps } from "next/app"; import { ApolloCache, ApolloProvider } from "@apollo/client"; import { useApollo } from "../graphql/client"; import dynamic from "next/dynamic"; import { Suspense } from "react"; import localFont from "next/font/local"; import { A...
// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. //go:generate mockgen -source=$GOFILE -destination=./mocks/mock_eth_client.go -package=mocks package evm import ( "context" "crypto/ecdsa" "math/big" "runtime" "sync" "github.com/ava-labs/avalanchego/ids" ...
from heapq import heappush, heappop from time import perf_counter def find_shortest_flight(flights, source, destination): # Check if arguments are valid if not flights: raise Exception("Flights not given") if type(flights) is not list: raise Exception("Flights must be a list") if not ...
--- title: .NET용 Aspose.Font를 사용하여 CFF 글꼴을 디스크에 저장 linktitle: .NET용 Aspose.Font를 사용하여 CFF 글꼴을 디스크에 저장 second_title: Aspose.Font .NET API description: 단계별 가이드를 통해 .NET용 Aspose.Font를 사용하여 CFF 글꼴을 디스크에 저장하는 방법을 알아보세요. .NET 애플리케이션에서 글꼴 조작을 쉽게 마스터할 수 있습니다. type: docs weight: 11 url: /ko/net/cff-font-handling/save-cff-font-...
import image from "../../../assets/form-img.png"; import { InputField } from "../../../components"; import { Link, useNavigate } from "react-router-dom"; import { Toaster } from "react-hot-toast"; import { useDispatch } from "react-redux"; import { setUser } from "../../../redux/slices/userSlice"; import { USER_ROLES }...
package utils import ( "encoding/json" "fmt" "log" "os" "testing" "github.com/google/go-cmp/cmp" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) var transformJSON = cmp.FilterValues(func(x, y []byte) bool { return json.Valid(x) && json.Valid(y) }, cmp.Transformer("ParseJSON", func(in []by...
<?php namespace App\Http\Requests\Api\Pokemon; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Foundation\Http\FormRequest; class UpdateRequest extends FormRequest { /** * @return array<string, ValidationRule|array<mixed>|string> */ public function rules(): array { re...
'use client'; import { Button } from '@/components/ui/button'; import { useToast } from '@/components/ui/use-toast'; import { useCreatePlaygroundMutation } from '@/hooks/useCreatePlaygroundMutation'; import { useSession } from 'next-auth/react'; import { useParams, usePathname, useRouter, useSearchParams, } fro...
import { BadRequestException, Inject, Injectable } from '@nestjs/common' import { ClientGrpc } from '@nestjs/microservices' import { firstValueFrom } from 'rxjs' import { ParseResponseGrpc } from '../../grpc-client.helper' import { FilterHistoryTransferDTO, GrpcUserBalanceDTO, GrpcUserBalanceResponseDTO, Histor...
import java.util.Arrays; import java.util.Scanner; public class Solution { static Scanner sc = new Scanner(System.in); static StringBuilder sb = new StringBuilder(); // 테스트케이스 입력받기 static int testCase = sc.nextInt(); static int N; // 섬의 개수 static double E; // 세율 static long[][] map; // 섬의 x, y 좌...
import React, { useContext, useEffect, useState } from 'react'; import { AuthContext } from '../../Provider/AuthProvider'; import Tittle from '../../Common_Component\'s/Tittle'; import useTitle from '../../Hooks/useTitle'; const MyEnrolledClasses = () => { useTitle('Dashboard/My Enrolled Classes') const [myCla...
'use client'; import React, { useEffect, useState } from 'react'; import _ from 'lodash'; import { QuestionTypes } from '@/app/data/question'; import { Container, Row } from 'react-bootstrap'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faSpinner } from '@fortawesome/free-solid-svg-icons...
using System; using System.Data; namespace Pattern { class Program { static string[] patterns = new string[] { "Right Triangle Star Pattern", "Left Triangle Star Pattern", "Pyramid Star Pattern", "Diamond Star Pattern", "Right Triangl...
--- title: 【生活】麥當勞買一送一可以,星巴克要小心 description: 買一送一在消費心理上有不同的狀態。麥當勞的買一送一解決了生理需求和提供便利,而星巴克的買一送一可能追求社交地位和心理滿足。買一送一觸發情緒,影響購買決策。選擇買一送一反映價值觀和生活方式,但要建立在必要需求上。 date: 2023-10-27 image: cover.png categories: [職涯與生活] keywords: ETF, Podcast, Podcaster, 保險, 儲蓄, 台股, 基金, 懶得變有錢, 房地產, 投資, 投資理財, 支出, 收入, 月配息, 理財, 理財規劃, 瑪斯理財兩三事, 稅務, 總體經濟, ...
import 'package:bloc_counter/logic/cubit/counter_cubit.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; class HomeScreen extends StatefulWidget { const HomeScreen({ super.key, required this.title, required this.color, }); final String title; final Col...
package basicdatastructure; import org.junit.Test; import java.util.logging.Level; import java.util.logging.Logger; /** * Assignment1Q2: Utility class for working with Armstrong numbers. */ public final class Assignment1Q2 { // Logger for logging messages private static final Logger logger = Logger.getLog...
import { Todo } from '@todo-app/shared/domain'; export async function getTodos( token: string | null ): Promise<{ message: string; todos: Todo[] }> { const res = await fetch('/api/todo', { headers: { Authorization: 'Bearer ' + token, }, }); if (res.status !== 200) { throw new Error('Failed t...
@extends('layout.app') @section('content') <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h3 class="page-title">Edit Device</h3> </div> <div class="col-lg-12 mt-5"> <form action="{{ route('devices.update', $device->id) }}" method="POST...
import * as MySqlDataSource from '../../models/MySqlDataSource'; import * as brapi from '../../data/network/brapi.api'; import TestHelper from '../../tests/TestHelperSQLite'; import initializeDatabase from '../../helpers/initializeDatabase'; import brapApiMock from '../../tests/brap.api.mock'; import investimentosServi...
import { Box, Typography } from "@mui/material"; import { useContext, useEffect, useState } from "react"; import Footer from "../../components/shared/Footer"; import PageHeader from "../../components/shared/PageHeader"; import DriverCardList from "../../components/driver/views/DriverCardList"; import SearchFilterForm f...
<html> <body> <div> <mat-form-field> <mat-label>Filter</mat-label> <input matInput (keyup)="applyFilter($event)" placeholder="Ex. Mia" #input> </mat-form-field> <button mat-raised-button (click) = "openAddDialog()" class="addButton"...
#pragma once /** * @file BVulkanPipeline.h * @author liuyulvv (liuyulvv@outlook.com) * @date 2023-04-28 */ #include <string> #include <vector> #include "BVulkanHeader.h" class BVulkanDevice; class BVulkanPipeline { public: struct PipelineConfigInfo { PipelineConfigInfo() = default; vk::Pip...
<template> <div id="main-container" class="container"> <div id="join" v-if="!session" class="col self-center"> <div id="join-dialog"> <h1>Join a {{ roomName }}</h1> <div class="form-group row justify-center"> <p class="text-center"> <button class="btn btn-lg btn-success...
import React, { useState } from "react"; import Taro from "@tarojs/taro"; import { View } from "@tarojs/components"; import { AtCard, AtButton } from "taro-ui"; import "./index.less"; import { markReviewAsPassed, markReviewAsFailed } from "../../services/checkReviews"; import { useDispatch } from "react-redux"; exp...
package com.example.models; import java.io.Serializable; public abstract class Product implements Serializable { private int id; private String name; private String description; private double price; Product() { } Product(int id, String name, String description, double price) { t...
from http.server import HTTPServer, BaseHTTPRequestHandler import mysql.connector def get_db_connection(): """Establishes and returns a MySQL database connection.""" return mysql.connector.connect(user='root', password='secret', host='127.0.0.1', database='HealthRecords') def initialize_db(): """Creates t...
!! Copyright (C) Stichting Deltares, 2012-2023. !! !! This program is free software: you can redistribute it and/or modify !! it under the terms of the GNU General Public License version 3, !! as published by the Free Software Foundation. !! !! This program is distributed in the hope that it will be useful, !! b...
import { createAsyncThunk } from '@reduxjs/toolkit' import { $api } from 'http/index.ts' import { toast } from 'react-toastify' export const getAllCategories = createAsyncThunk( 'categories/getAll', async ({ departmentId }: { departmentId: string | undefined }, thunkAPI) => { try { const response = await...
#!/usr/bin/python3 """Unittests for max_integer function.""" import unittest max_integer = __import__('6-max_integer').max_integer class TestMaxInteger(unittest.TestCase): """Define unittests for max_integer.""" def test_ordered(self): """Test an order list of integers.""" order = [1, 5, 7, ...
import { defineStore, StoreDefinition } from 'pinia' import { ApiMethods, useApi } from '~/composables/api/useApi' import { Project, ProjectActions, ProjectGetters, ProjectsState } from '~/store/projects/types' const api: ApiMethods = useApi() export const useProjectsStore: StoreDefinition<string, ProjectsState, Proj...
package kr.or.ddit.reservation.dao; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.ibatis.session.SqlSession; import kr.or.ddit.basic.util.MyBatisSqlSessionFactory; import kr.or.ddit.campzone.vo.CampzoneVo; import kr.or.ddit.reservation.vo.ReservationVo; public class Reserv...
package gap.jac.comp; import java.util.*; import java.util.Set; import gap.jac.tools.JavaFileObject; import gap.jac.tools.JavaFileManager; import gap.jac.code.*; import gap.jac.jvm.*; import gap.jac.tree.*; import gap.jac.util.*; import gap.jac.util.JCDiagnostic.DiagnosticPosition; import gap.jac.util.List; import gap...
package org.web3.utils; import java.io.IOException; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONObject; import org.web3j.abi.FunctionReturnDecoder; import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; import org.w...
import { forwardRef, InputHTMLAttributes } from 'react' import styled from 'styled-components' import { Color } from '../styles/colors' import { Typo, typos } from '../styles/typos' import { useTheme } from '../themes/provider' import { setTransition } from '../utils/animation' type CheckProps = { label: string ...
import cv2 import numpy as np import time from websocket_server import WebsocketServer import threading import signal import sys # Global Variables detected_printed = False # SIGINTハンドラ関数 def signal_handler(sig, frame): print("Shutting down gracefully...") server.shutdown() cv2.destroyAllWindows() sys...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; interface IERC20 { function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function totalSupply() external view returns (uint256); ...
import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { Company } from '../components/models/company'; import { Employee } from '../components/models/employee'; @Injectable({ providedIn: 'root' }) export class CompanyService { pri...
 ---------------------------------------------------------------------------------------------------- 【テクスチャとは?】 データを1、2、3次元で格納したもの。 (例) ・デカールテクスチャ (色データ) ・法線テクスチャ (法線データ) ・ハイトマップ (高さデータ) ・ライトマップ (照度データ) ・スペキュラマップ (鏡面データ) ピクセルデータのように縦、横(または奥)に全て同じサイズで...
import { CHAINS_ENUM } from './constant'; export enum AddressType { P2PKH, P2WPKH, P2TR, P2SH_P2WPKH, M44_P2WPKH, M44_P2TR } export enum NetworkType { MAINNET, TESTNET } export enum RestoreWalletType { UNISAT, SPARROW, XVERSE, OTHERS } export interface Chain { name: string; logo: string;...
<?php /** * Magestore * * NOTICE OF LICENSE * * This source file is subject to the Magestore.com license that is * available through the world-wide-web at this URL: * http://www.magestore.com/license-agreement.html * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade this extension t...
// // StackedFormView.swift // StackedForm // // Created by Avismara HL on 17/07/21. // #if !os(macOS) import UIKit /** Create an instance of this view to avail the stacked form. **Important:** - Care needs to be taken that there is enough space to display all the form elements. Should the size of this view be...
/* Author: cuckoo Date: 2017/05/03 22:20:18 Update: Problem: Count Primes Difficulty: Easy Source: https://leetcode.com/problems/count-primes/#/description */ #include <algorithm> // for count() #include <vector> using std::vector; class ...
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; const defaultPadding = 30.0; const statusBarColor = Color(0xFF004060); const redColor = Color(0xFFEF5A5A); const greenColor = Color(0xFF008421); const yellowColor = Color(0xFFffcc00); const boxShadowColor = Colors.black26; const boxBorde...
package ru.ifmo.se.entity.readers; import ru.ifmo.se.entity.Color; import ru.ifmo.se.entity.Person; import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public cla...
import os import re from flask import Flask, jsonify, render_template, request, url_for from cs50 import SQL from helpers import lookup # Configure application app = Flask(__name__) # Configure CS50 Library to use SQLite database db = SQL("sqlite:///mashup.db") # Ensure responses aren't cached @app.after_request d...
import logging import unicodedata from io import BytesIO import pathway as pw CHARS_PER_TOKEN = 3 PUNCTUATION = [".", "?", "!", "\n"] @pw.udf def chunk_texts( texts: str | list[str], min_tokens: int = 50, max_tokens: int = 500, encoding_name: str = "cl100k_base", ) -> list[str]: """ Splits a...
<h2>Template Driven</h2> <form (ngSubmit)="onSubmit(form)" #form="ngForm"> <div ngModelGroup="userData"> <div class="form-group"> <label for="username">Username</label> <input type="text" class="form-control" id="username" name="username" [ngModel]="user.usernam...
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="c" uri="http://java.sun.c...
class QuizBrain : def __init__(self, list): self.question_number =0 self.question_list = list self.score = 0 def next_question(self): question_ask = self.question_list[self.question_number] self.question_number += 1 user_ans = input(f"Q.{self.question_nu...
package com.stackroute.pe2; import static org.junit.Assert.*; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; public class FolderFileNamesReaderTest { public static FolderFileNamesReader folderFileNamesReader; @BeforeClass public static void setUp() ...
import { useState, useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; import { addCardsMagic } from "../../reducers/cardsSlice"; import { getUser } from "../../reducers/sliceUser"; import { Col, Container, Row, Pagination } from "react-boots...
/* This query is for MMS messages from the mmssms.db */ SELECT /* Add a row number at the beggining of each row */ ROW_NUMBER() OVER() AS 'Row #', pdu._id AS 'MMS_ID', pdu.thread_id AS 'Thread ID', /* Date/Time of the message in UTC */ CASE WHEN pdu.date > 0 THEN strftime('%Y-%m-%d %H:...
// The MIT License (MIT) // // Copyright (c) 2023 Olrea, Florian Dang // // 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 limitation the rights // t...
import React from "react"; import { Container } from "../styles/Container"; import { Typography } from "../styles/Typography"; import css from "./NewsReport.module.css"; interface Props { title: string; description: string; content: string; image: string; url: string; } export default function NewsReport({...
package Geo::WebService::OpenCellID::measure; use warnings; use strict; use base qw{Geo::WebService::OpenCellID::Base}; use Geo::WebService::OpenCellID::Response::measure::add; our $VERSION = '0.03'; =head1 NAME Geo::WebService::OpenCellID::measure - Perl API for the opencellid.org database =head1 SYNOPSIS use Ge...
<?php namespace TYPO3\CMS\Frontend\Tests\Unit\Controller; /*************************************************************** * Copyright notice * * (c) 2009-2011 Oliver Klee (typo3-coding@oliverklee.de) * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you c...
package com.ujcms.commons.file; import freemarker.template.Template; import org.springframework.lang.Nullable; import org.springframework.web.multipart.MultipartFile; import java.awt.image.RenderedImage; import java.io.File; import java.io.InputStream; import java.io.OutputStream; import java.util.List; import java.u...
import type { Meta, StoryObj } from '@storybook/react' import { Input } from '@/components/ui/input/input' const meta = { component: Input, tags: ['autodocs'], title: 'Components/Input', } satisfies Meta<typeof Input> export default meta type Story = StoryObj<typeof meta> export const Text: Story = { args: ...
import Switch from "react-switch"; import React, { useMemo, useState } from "react"; import { Link } from "react-router-dom"; import { bytesToFileSize } from "../util/fileSize"; import { toast } from "react-toastify"; import Button from "./util/Button"; import { DownloadDetails } from "../../models/api"; interface Pro...
let currentPlayer = "x"; let winOptions = []; let winner = null; let fullSquares = 0; let gameBoardState; let $gameStateContainer; let $currentPlayerContainer; const logCurrentBoardState = () => { const logValues = []; gameBoardState.forEach((row) => { const rowValues = []; row.forEach(($space) => { ...
package com.example.demo.servlet; import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet....
<template> <nav class="flex" aria-label="Breadcrumb"> <ol role="list" class="flex items-center space-x-4"> <li> <div> <Link :href="route('home')" class="text-gray-400 hover:text-gray-500"> <HomeIcon class="flex-shrink-0 h-5 w-5" aria-hidden="true" /> <span class="sr...
package com.webank.wedatasphere.exchangis.job.server.builder.transform.mappings; import com.webank.wedatasphere.exchangis.datasource.core.utils.Json; import com.webank.wedatasphere.exchangis.job.domain.params.JobParamDefine; import com.webank.wedatasphere.exchangis.job.domain.params.JobParams; import com.webank.wedata...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...