text stringlengths 184 4.48M |
|---|
const { test, expect } = require("../fixtures/base.fixture");
test.describe("Accounts Receivable Tests", () => {
test.beforeEach(async ({ page, loginAsUser, siteURL }) => {
await loginAsUser;
await expect(page).toHaveURL(siteURL);
});
test('should navigate to Receivable, check all entered ... |
package com.bccv.zhuiyingzhihanju.adapter;
import java.util.List;
import com.bccv.zhuiyingzhihanju.R;
import com.bccv.zhuiyingzhihanju.model.Movie;
import com.bccv.zhuiyingzhihanju.model.Report;
import com.bccv.zhuiyingzhihanju.model.TV;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.utils.tool... |
<div class="container">
<div class="header">
<h2>Register here</h2>
</div>
<form class="form" (ngSubmit)="submitForm()" [formGroup]="loginForm1">
<div class="form-control">
<label><i class="fa fa-user"></i></label>
<input type="text" placeholder="Enter your name" name="username" ... |
// Copyright 2023 PingCAP, Inc.
//
// 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 i... |
'use client';
import React, { useRef, ReactNode } from 'react';
import { useScroll, useTransform, motion } from 'framer-motion';
const TextReveal = ({value}) => {
const element = useRef(null);
const { scrollYProgress } = useScroll({
target: element,
offset: ['start 0.9', 'start 0.25']
})
... |
package test.deymer.excelsior.ui.adapter
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import test.deymer.excelsior.databinding.ItemAlbumBinding
import test.deymer.repository.models.SongModel
class AlbumAdapter(
private val albumList: List<SongMo... |
import { useState, Fragment } from "react";
import { Modal } from "../components/Modal/Modal";
import { Button } from "../components/Button/Button";
import { ArgsTable, Meta, Story, Canvas } from "@storybook/addon-docs";
<Meta title="Design System/Modal" component={Modal} />
# Modal
Modal dialogs.
When requiring us... |
import Typography from '@mui/material/Typography';
import TableContainer from '@mui/material/TableContainer';
import Paper from '@mui/material/Paper';
import Table from '@mui/material/Table';
import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow';
import TableCell from '@mui/mate... |
/*
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
/*
Sharelin - BSD/Linux terminal gnutella2-client
Copyright (C) 2010 by Andrew Stroganov <savthe@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of th... |
import './styles/style.css'
import { useEffect, useState } from 'react'
const Header = ({setSearch}) => {
const[apiData, setApiData] = useState();
const[search, setSearchValue] = useState();
const date = new Date(apiData && Date.parse(apiData.location.localtime) || new Date());
const minutes ... |
"""
URL configuration for backend project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home... |
"""
CODENAME BONSAI
_[Bonsai](https://en.wikipedia.org/wiki/Bonsai), because it is a miniature [Trie](https://en.wikipedia.org/wiki/Trie)_
A self-contained, minimal and POD data structure that provides the fastest possible (?) lookup of numeric Ids by name.
Names are UTF-8 strings, and with a word size of 8 bits you ... |
import React, {useEffect, useState} from 'react';
import {CSSTransition, TransitionGroup} from 'react-transition-group';
import TodoItem from '../components/TodoItem';
import AddNewTodo from '../components/AddNewTodo';
import useTodos from '../hooks/useTodos';
import useDnD from '../hooks/useDnD';
import TodoService ... |
#include <stdio.h>
#include <string.h>
#include <vtimer.h>
#include <thread.h>
#include <posix_io.h>
#include <shell.h>
#include <shell_commands.h>
#include <board_uart0.h>
#include "sys/net/sixlowpan/sixlowip.h"
#include "sys/net/sixlowpan/sixlowpan.h"
#include "sys/net/sixlowpan/sixlowerror.h"
#include "sys/net/six... |
import 'package:canteen_app/config/colors.dart';
import 'package:flutter/material.dart';
class SingleDeliveryItem extends StatelessWidget {
final String title;
final String address;
final String number;
final String addressType;
// ignore: use_key_in_widget_constructors, prefer_const_constructors_in_immutabl... |
const asyncHandler = require("express-async-handler");
const paginatedResults = (model) => {
return asyncHandler(async (req, res, next) => {
const page = parseInt(req.query.page) || 1; // If page not defined set default to 1
const limit = parseInt(req.query.limit) || 12; // If limit not defined set default t... |
import 'package:dnd/bloc/character_bloc/character_bloc.dart';
import 'package:dnd/components/snack_bar.dart';
import 'package:dnd/models/ch_race.dart';
import 'package:dnd/pages/character_selector/character_creation/creation_final.dart';
import 'package:dnd/shared_prefs.dart';
import 'package:flutter/material.dart';
im... |
import { DownloadIcon, EditIcon, ViewIcon } from "@chakra-ui/icons";
import {
Badge,
Box,
Button,
HStack,
IconButton,
Text,
Tooltip,
useColorModeValue,
useMediaQuery,
} from "@chakra-ui/react";
import { GoogleAuthProvider, signInWithPopup, User } from "firebase/auth";
import { useEffect, useState } fr... |
const express = require('express');
const app = express();
const mongoose = require("mongoose");
const morgan = require('morgan');
const bodyParser = require("body-parser");
var cookieParser = require('cookie-parser')
const expressValidator = require("express-validator");
const fs = require("fs");
const cors = require(... |
//
// TriviaData.swift
// TriviaThis
//
// Created by johnekey on 6/11/19.
// Copyright © 2019 johnekey. All rights reserved.
//
import Foundation
import UIKit
struct Category {
let id: Int
let category: String
init(_ id: Int, _ category: String) {
self.id = id
self.category = ca... |
from django.views.generic.base import TemplateView
from django.conf import settings
from django.core.cache.backends.base import DEFAULT_TIMEOUT
from django.views.decorators.cache import cache_page
from django.views.generic import (
ListView,
UpdateView,
DetailView
)
TEMPLATE_BASE_FOOTNOTES = 'mydocumenta... |
## -------------------------------------------------------------------
## Chapter 10 R code
## Handbook of Educational Measurement and Psychometrics Using R
## C. D. Desjardins & O. Bulut
## -------------------------------------------------------------------
install.packages("equate")
library("equate")
library("hemp")
... |
import { get } from 'lodash'
import type { NextPage } from 'next'
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import { Row, Col, Table, Pagination } from 'react-bootstrap'
import sortIcon from '../../../assets/img/sort.s... |
<?php
namespace App\DataTables;
use App\Models\AdminOrder;
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
use Yajra\DataTables\EloquentDataTable;
use Yajra\DataTables\Html\Builder as HtmlBuilder;
use Yajra\DataTables\Html\Button;
use Yajra\DataTables\Html\Column;
use Yajra\DataTables\Html\Editor\Editor;
us... |
'''
- Un conjunto es una colección de elementos pero que está desordenado es decir no hay un índice.
- No se permite elementos duplicados, los ignora.
- No se garantiza el orden de entra de los elementos (es decir la salida sera diferente).
- Como todas las colecciones, permite elementos de diferentes tipos... |
<?php
/**
* Handle product stock reservation during checkout.
*/
namespace Automattic\WooCommerce\Checkout\Helpers;
use Automattic\WooCommerce\Utilities\OrderUtil;
defined( 'ABSPATH' ) || exit;
/**
* Stock Reservation class.
*/
final class ReserveStock {
/**
* Is stock reservation enabled?
*
* @var bool... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>영화 리뷰 사이트</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-9ndCyUaIbzAi2FUVX... |
/**
* A type describes a valid set of values.
*
* (C) 2021 Malcolm Tyrrell
*
* Licensed under the GPLv3.0. See LICENSE file.
**/
#pragma once
#include <BabelWiresLib/TypeSystem/typeRef.hpp>
#include <BabelWiresLib/TypeSystem/valueHolder.hpp>
#include <Common/Identifiers/identifier.hpp>
namespace babelwires {
... |
<?php
/**
* @file
* Contains \Drupal\system\Plugin\system\imagetoolkit\GDToolkit;.
*/
namespace Drupal\system\Plugin\system\imagetoolkit;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\system\Plugin\ImageToolkitInterface;
/**
* ... |
====== Proposal ======
Add a ''has'' generic method to ''Array.prototype'' that determines if the array contains a given value, determined by the internal %%[[SameValue]]%% algorithm.
====== Spec ======
**15.5.4.27 Array.prototype.has (searchElement, fromIndex = 0)**
**has** compares //searchElement// to the eleme... |
from typing import List, Tuple, Any
from deepxube.utils import data_utils
from deepxube.nnet import nnet_utils
from deepxube.nnet.nnet_utils import HeurFnQ
from deepxube.environments.environment_abstract import State, Environment, Goal
from deepxube.updaters.updater import Updater
from deepxube.search.greedy_policy imp... |
import { useAccount, useContractRead } from 'wagmi'
import ABI_Npng from '../utils/ABI_Npng.json'
import { ethers } from 'ethers'
import { useAddressNetwork } from '../utils/useAddressNetwork'
import { Fragment } from 'react'
function RankingHistory({ setModalResult, setContest }:
{
setModalResult: React.D... |
<?php
namespace App\Student\Twig;
use App\Entity\Avatar;
use Symfony\Component\Serializer\SerializerInterface;
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
class StudentExtension extends Abstrac... |
import React from 'react';
import {useParams} from "react-router-dom";
import { makeStyles } from '@material-ui/core/styles';
import { Link } from 'react-router-dom';
import Container from '@material-ui/core/Container';
import Grid from '@material-ui/core/Grid';
// import Divider from '@material-ui/core/Divider';
imp... |
using GZCTF.Models.Request.Game;
namespace GZCTF.Repositories.Interface;
public interface IGameRepository : IRepository
{
/// <summary>
/// 获取指定数量的比赛对象基本信息
/// </summary>
/// <param name="count"></param>
/// <param name="skip"></param>
/// <param name="token"></param>
/// <returns></retur... |
;;;; Copyright (c) 2011-2014 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; final QR code symbol
(in-package #:cl-qrencode)
(defclass qr-symbol ()
((matrix :initform nil :initarg :matrix :reader matrix
:documentation "qr code symbol as matrix")
(modules :initform nil :initarg :modules :reader modules... |
### Note: This was mini project for Data Structures and Algorithm Course - NMAMIT
# Word Dictionary using Trie data structure
Using a Trie data structure for storing a word dictionary has several advantages over using a direct dictionary (hashmap) where words are mapped to their meanings:
## Advantages of Trie over... |
import { html } from "lit-html";
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import AzBanner from '@az-digital/az-web-components';
<Meta
title="AzBanner"
component={AzBanner}
argTypes={{
theme: {
options: ['az-red', 'az-blue'],
control: { type: 'radio' }
},
fluid: {
... |
const { expect } = require('chai');
const request = require('request');
describe('Index Page', () => {
it('should respond with the correct status code', (done) => {
request('http://localhost:7865', (error, res, body) => {
if (error) return done(error);
expect(res.statusCode).to.equal(200);
don... |
/**
*Submitted for verification at Etherscan.io on 2021-01-15
*/
pragma solidity ^0.4.24;/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure re... |
/* eslint-disable @typescript-eslint/no-unused-vars */
import { useCallback, useEffect, useState } from 'react';
import Box from '@mui/material/Box';
import CircularProgress from '@mui/material/CircularProgress';
import Paper from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import Grid fr... |
import React, { useEffect } from 'react';
import { useParams } from 'react-router';
import { useDispatch } from 'react-redux';
import { useTable, usePagination } from 'react-table';
import { onGetChangeHistory } from '../SpecHistory.actions';
import SearchFilter from './SearchFilter';
import {
ContentTable,
Table,
... |
package id.co.map.spk.services.impl;
import id.co.map.spk.entities.SbuEntity;
import id.co.map.spk.enums.ClientResponseStatus;
import id.co.map.spk.model.response.ClientCompanyResponse;
import id.co.map.spk.model.response.ClientSbuResponse;
import id.co.map.spk.repositories.SbuRepository;
import id.co.map.spk.services... |
import React, { useState, useEffect, useRef } from 'react';
import { useNavigate } from "react-router-dom";
import { confirmAlert } from 'react-confirm-alert';
import { Message, toaster, Popover, Whisper } from 'rsuite';
const RequestList = (props) => {
const navigate = useNavigate();
const [data, setData] = useS... |
.\" -*- mode: nroff; coding: utf-8 -*-
.\" Copyright (c) 2022 G. Weinholt
.\" SPDX-License-Identifier: MIT
.TH string-hash 3scm 2022-05-12 "" "Scheme Programmer's Manual"
.SH NAME
string-hash, string-ci-hash \- string hash functions
.
.SH LIBRARY
.nf
.BR "(import (rnrs))" " ;R6RS"
.BR "(import (rnrs... |
/*
* Copyright 2002-2016 the original author or 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 ap... |
import React from 'react';
import AppRowContainer from '@crema/components/AppRowContainer';
import { Col } from 'antd';
import {
StyledProductDetailItemTitle,
StyledProductDetailSpecification,
} from './index.styled';
const productInfo = [
{
id: 1,
title: 'Sweat Proof',
desc: 'Yes',
},
{
id: ... |
import { Detail, Toast, showToast } from "@raycast/api";
import { useState, useEffect, ReactNode } from "react";
import * as google from "../auth/google";
import { supabase } from "../supabase";
import { Session } from "@supabase/supabase-js";
// Update the service name here for testing different providers
export def... |
//
// ViewController.swift
// WeatherTest
//
// Created by que on 14/12/2564 BE.
//
import UIKit
import CoreLocation
import SwiftyJSON
import RxSwift
import RxCocoa
import SDWebImage
import ActivityIndicatorManager
class ViewController: UIViewController {
@IBOutlet weak var weatherIconImageView: UIImageVi... |
import ICar, { ICarMake } from "@/interfaces/car.interface";
import React, { useEffect, useState } from "react";
import * as API from "@/services/api";
import { GetCarBrandsResponseType } from "@/interfaces/api-response.interface";
const useCars = (props?: { query?: string; pagination?: GetCarBrandsResponseType["pagin... |
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" th:href="@{/css/registration.css}"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/cs... |
<app-header></app-header>
<div class="form-content">
<!-- employee payroll form -->
<form class="form" [formGroup]="employeeForm" (ngSubmit)="submitForm()">
<!-- heading -->
<div class="form-head">Employee Payroll Form</div>
<br><br>
<!-- Input FullName -->
<div... |
@extends('layouts.header')
@section('title', 'Rooms')
@section('rooms_navbar_state', 'active')
@section('additional_style')
@vite(['resources/css/rooms-style.css'])
@endsection
@section('navbar_header_button')
@role('admin')
<a href="{{ route('admin.rooms.create') }}" class="add-new-button">Add new room</a>
@endrole
@r... |
//
// UITableView+Drop.swift
// UITableView+Drop
//
// Created by 逸风 on 2021/10/29.
//
import Foundation
import UIKit
import JFPopup
extension Drop where Base: UITableView {
@available(iOS 11.0, *)
@discardableResult public func tableViewDidEnterDropSession(tableViewDidEnterDropSession: @escaping Tabl... |
from sqlalchemy import (Boolean, Column, Date, Enum, Float, ForeignKey,
Integer, Unicode)
from sqlalchemy.orm import relationship
from bdgt.storage.database import Base
class Account(Base):
__tablename__ = 'accounts'
id = Column(Integer, primary_key=True)
name = Column(Unicode, n... |
import React, {useEffect } from "react";
import {createContext} from "react";
import {useState} from "react";
import axios from "axios";
import { useNavigate } from "react-router-dom";
export const AuthContext = createContext();
export const AuthProvider = ({ children }) => {
const [isAuth, setIsAuth] = useState("... |
import { Inject, Injectable, Optional } from '@angular/core';
import {
MatMomentDateAdapterOptions,
MAT_MOMENT_DATE_ADAPTER_OPTIONS,
MomentDateAdapter
} from '@angular/material-moment-adapter';
import { MAT_DATE_LOCALE } from '@angular/material/core';
import * as moment from 'moment';
/**
* @description custom ... |
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QApplication>
#include <QFile>
#include <QMainWindow>
#include <QMenu>
#include <QMenuBar>
#include <QStackedLayout>
#include <QString>
#include <QStyleFactory>
#include <QWidget>
#include "gamescene.h"
#include "introductionscene.h"
#include "qtaquin.h"
class MainW... |
from sqlalchemy import Column, Integer, ForeignKey, DateTime
from sqlalchemy.orm import relationship
from db import Base
from datetime import datetime, timezone
class Like(Base):
__tablename__ = 'likes'
id = Column(Integer, primary_key=True)
post_id = Column(Integer, ForeignKey('posts.id'))
user_id = C... |
package com.jackdaw.jinjobbackenduserservice.controller.inner;
import com.jackdaw.jinjobbackendmodel.common.ErrorCode;
import com.jackdaw.jinjobbackendcommon.config.RedisUtils;
import com.jackdaw.jinjobbackendmodel.exception.BusinessException;
import com.jackdaw.jinjobbackendcommon.utils.JWTUtil;
import com.jackdaw.ji... |
import { createBrowserRouter } from "react-router-dom";
import Root from "../LayOut/Root";
import ErrorPage from "../Pages/ErrorPage";
import Home from "../Pages/Home/Home";
import Signin from "../Pages/Signin";
import SignUp from "../Pages/SignUp";
import Men from "../Pages/Men";
import Electnonics from "../Pages/Elec... |
## Django Book Store
[](https://github.com/anasnashat/Book-store/stargazers)
[](https://github.com/anasnashat/Book-store/blob/master/LICENSE)
Django Book Store is a w... |
var Voting = artifacts.require("./Voting.sol");
contract("Voting", function(accounts){
var votingInstance;
it("initializes with 3 options", function(){
return Voting.deployed().then(function(instance){
return instance.optionsCount();
}).then(function(count){
assert.equal(count, 3);
});
});
it("initia... |
interface MyInterface {
fun print()
var msg: String
}
class MyImplementation : MyInterface {
override fun print() { println(msg) }
override var msg: String = "To be, or not to be, that is the question:"
fun updateMsg(newMsg: String) { msg = newMsg }
}
class CharacterInfoFormatter(base: MyInterfac... |
import { arrayUnion, doc, serverTimestamp, Timestamp, updateDoc } from 'firebase/firestore';
import React, { useContext, useState } from 'react'
import { AuthContext } from '../context/AuthContext';
import { ChatContext } from '../context/ChatContext';
import { db, storage } from '../firebase';
import { v4 as uuid } fr... |
/*
* UVCCamera
* library and sample to access to UVC web camera on non-rooted Android device
*
* Copyright (c) 2014-2017 saki t_saki@serenegiant.com
*
* File name: Parameters.cpp
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Licens... |
//
// SearchFilterView.swift
// Forist-Test-SwiftUI
//
// Created by Hayden Wies on 2021-07-23.
//
import SwiftUI
struct SearchFilterView: View {
@Environment(\.presentationMode) var presentationMode
@ObservedObject var filteredSearchManager = FilteredSearchManager()
// Account type isSe... |
<?php
namespace Drupal\hot_stocks\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Logger\LoggerChannelFactory;
/**
* User for form for personalization with with Charles Scwhab API.
*... |
using System;
using System.IO;
using System.Collections.Generic;
using System.Net.Http;
using SkiaSharp;
using System.Threading.Tasks;
namespace CatWorx.BadgeMaker {
class Util {
public static void PrintEmployees(List<Employee> employees) {
for (int i=0 ; i < employees.Count; i++) {
... |
from rest_framework import viewsets, response, status
from .models import Pereval
from .serializers import PerevalSerializer
# вьюсет для отправки пользователем данных о перевале
class SubmitData(viewsets.ModelViewSet):
queryset = Pereval.objects.all()
serializer_class = PerevalSerializer
filterset_fields... |
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Mandriva Linux Security Advisory MDVSA-2015:027.
# The text itself is copyright (C) Mandriva S.A.
#
if (NASL_LEVEL < 3000) exit(0);
include("compat.inc");
if (description)
{
script_id(80578);
... |
import React, { Component } from "react";
import Switch from "./switch";
const ToggleContext = React.createContext({
on: false,
toggle: () => {}
})
export default class Toggle extends Component {
static On = ({children}) => (
<ToggleContext.Consumer>
{contextValue => (contextValue.on ? children : null)}
<... |
import {
IsEmail,
IsNotEmpty,
IsString,
MaxLength,
MinLength,
} from 'class-validator';
export class CreateUserDTO {
@MaxLength(50, { message: 'FullName is too long' })
@IsString()
@IsNotEmpty({ message: 'Field cannot be empty' })
fullName: string;
@MaxLength(50, { message: 'Email is too long' })
... |
import React,{useContext, useState} from "react";
import Card from "../components/Card";
import { Link } from "react-router-dom";
import {EmojiFrown, SortNumericUp, SortNumericDown } from "react-bootstrap-icons";
import Ctx from "../Ctx";
import Pagination from "../components/Pagination";
import usePagination from "../... |
import React from 'react';
import {ROUTE_PATH} from '@/types/other';
import HomePage from '@/pages/HomePage/HomePage';
import HotelPage from '@/pages/HotelPage/HotelPage';
import LoginPage from '@/pages/LoginPage/LoginPage';
import SignupPage from '@/pages/SignupPage/SignupPage';
import ProfilePage from '@/pages/Profil... |
/*
Topic:- Fibonacci Modified
Link:- https://www.hackerrank.com/challenges/fibonacci-modified/problem?isFullScreen=true
Problem:-
Implement a modified Fibonacci sequence using the following definition:
Given terms t[i] and t[i+1] where i ∈ (1,∞), term t[i+2] is computed as:
t(i+2) = ti + t(i+2)^2
Given three in... |
---
title: How To Unlock A Found Apple iPhone 12 mini? | Dr.fone
date: 2024-05-19T07:27:54.341Z
updated: 2024-05-20T07:27:54.341Z
tags:
- unlock
- remove screen lock
categories:
- ios
- iphone
description: This article describes How To Unlock A Found Apple iPhone 12 mini?
excerpt: This article describes How To... |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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 t... |
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { ChildProcess, spawn } from 'child_process';
import { readFile as fsReadFile } from 'fs/promises';
import { write as fsWrite } from 'fs';
import { join } from 'path';
import { file } from 'tmp-promise';
import { promisify } from 'util';
import {... |
/* eslint-disable import/no-nodejs-modules, import/max-dependencies */
import http from 'http';
import {createId} from '@paralleldrive/cuid2';
import {ErrorContext} from '@silver886/error-context';
import {ValidateError} from '@tsoa/runtime';
import bodyParser from 'body-parser';
import compression from 'compression';
... |
<template>
<div>
<el-table :data="table.data" text-align="center" stripe border>
<el-table-column prop="id" label="权限编号" width="140" v-if="false" />
<el-table-column prop="name" label="权限名称" />
<el-table-column prop="description" label="权限描述" />
<el-table-column label="操作" width="170" alig... |
import allure
import pytest
from helpers.csv_helper import CSVHelper
from src.ui.actions.backgrounds import BackgroundsActions
from src.ui.actions.base_actions import BaseActions
from src.ui.actions.spa_actions import SPAActions
from test_data.constants import ExamResult
@allure.feature('Labors tab as Test Center Ow... |
#include <stdio.h>
#include <stdlib.h>
void readArrayFromFile(const char *fileName, int *arr, int *n) {
FILE *file = fopen(fileName, "r");
if (!file) {
printf("File cannot be opened.\n");
exit(1);
}
fscanf(file, "%d", n); // Read the number of elements
for (int i = 0; i < *n; i++) ... |
from dataclasses import dataclass
import torch
from torch import nn
from transformers import AutoModel, AutoTokenizer
from ...utils.modeling import CLSPooling, AveragePooling, SelfAttentionPooling, LastTokenPooling
from .base_dialogue_model import BaseDialogueModel
@dataclass
class BaselineDialogueEncoderConfig:
... |
import { Request, Response } from "express";
import apiCaller from "@/ultis/apiCaller";
import { IMatchDetails, IMatchDetailStats, IMatchDetailsHeading } from "@projectb/shared";
import { AxiosResponse } from "axios";
import { logger } from "@/ultis/logger";
const getMatchDetails = async (req: Request, res: Response):... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package admin.member;
import bean.Member;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import j... |
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formulário 1</title>
</head>
<body>
<header>
<h1>Formulário de Envio</h1>
</header>
<main>
<!--Form define um formulário-->
<!--... |
import is from '@sindresorhus/is'
import { Datasource } from 'renovate/dist/modules/datasource/datasource'
import { Release, ReleaseResult } from 'renovate/dist/modules/datasource/types'
import { Versioning } from './config'
import { isNotEmpty } from './utils'
import { VersionFetcher, VersionFetchParams } from './Vers... |
import { useLocation } from 'react-router-dom';
import RecipeList from '../../components/RecipeList';
import { useFetch } from '../../hook/useFetch';
// Style
import './Search.css'
export default function Search() {
const queryString = useLocation().search
const queryParams = new URLSearchParams(queryString)
c... |
#include "driver/gpio.h"
#include "esp_adc/adc_oneshot.h"
#include "esp_log.h"
#include "esp_timer.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
const gpio_num_t LED4 = GPIO_NUM_12;
const gpio_num_t LED5 = GPIO_NUM_13;
const gpio_num_t ANALOG3 = GPIO_NUM_3;
const adc_channel_t ANALOG3_CHANNEL = ADC_CHAN... |
import streamlit as st
from google.oauth2 import service_account
from google.cloud import bigquery
# Create API client.
credentials = service_account.Credentials.from_service_account_info(
st.secrets["gcp_service_account"]
)
client = bigquery.Client(credentials=credentials)
# Perform query.
# Uses st.cache_data t... |
<template>
<div class="card table-box">
<!-- card 背景颜色 table-box 高度处理-->
<el-form class="search-form" :inline="true" :model="formInline" v-show="showSearch">
<el-form-item label="菜单名称">
<el-input
v-model="formInline.menuName"
placeholder="请输入"
clearable
s... |
// Package types implements all the types used by the Service Item (Wii Sports Club) protocol
package types
import (
"bytes"
"fmt"
"strings"
"github.com/PretendoNetwork/nex-go"
)
// ServiceItemUserInfo holds data for the Service Item (Wii Sports Club) protocol
type ServiceItemUserInfo struct {
nex.Structure
Nu... |
package com.example.studentsecurity.entity;
import jakarta.persistence.*;
@Entity
@Table(name = "student")
public class StudentEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="id")
private Long id;
@Column(name="first_name")
private String firstName;
@Column(... |
<script>
/*-----------------------------------
* Array
*------------------------------------
*/
//将ary拆分成size长度的区块,返回拆分后的二维数组
function chunk(ary, size = 1) {
if (size >= ary.length) {
return [ary.slice()]
}
let res = []
let len = ary.l... |
<?php
declare(strict_types = 1);
namespace Src\OutSourcing\User\Application\UseCases\Queries;
use Src\Common\Domain\QueryInterface;
use Src\OutSourcing\User\Domain\Model\User;
use Src\OutSourcing\User\Domain\Policies\UserPolicy;
use Src\OutSourcing\User\Domain\Repositories\UserRepositoryInterface;
final class FindUs... |
create table products (
id serial primary key,
name varchar(50),
producer varchar(50),
count integer default 0,
price integer
);
create table history_of_price (
id serial primary key,
name varchar(50),
price integer,
date timestamp
);
---Триггер должен срабатывать после вставки данны... |
c# MineSweeper with a Twist
This is a Python implementation of the classic Minesweeper game. The codebase consists of several key functions and components to create and play the game.
## Key Functions and Components
Here's a brief overview of the key functions and components in the code:
- **generate_mines():** Thi... |
/**
* Tween.js - Licensed under the MIT license
* https://github.com/tweenjs/tween.js
* ----------------------------------------------
*
* See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.
* Thank you all, you're awesome!
*/
var TWEEN = TWEEN || (function () {
var ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.