text stringlengths 184 4.48M |
|---|
import { Router } from 'express';
import orderController from '../controllers/orderController';
const orderRoutes = Router();
/**
* @swagger
* tags:
* name: Orders
* description: API endpoints for managing orders
*/
/**
* @swagger
* /api/orders:
* get:
* summary: Retrieve all orders
* tags: [... |
//
// Loopable.swift
//
//
// Created by Benjamin Cáceres on 28-07-22.
//
import Foundation
// MARK: - Loopable
protocol Loopable {
func allProperties() throws -> [String: Any]
}
// MARK: - Loopable allProperties()
extension Loopable {
func allProperties() throws -> [String: Any] {
var result: [String: Any] ... |
import { useState } from "react";
// Package Imports
// import { RiMenu3Line, RiCloseLine } from "react-icons/ri";
import { MdArrowDropDown, MdArrowDropUp } from "react-icons/md";
import { RxRocket } from "react-icons/rx";
import { CiMenuBurger } from "react-icons/ci";
import { HiOutlineUserGroup, HiOutlineCheckBadge ... |
function Y = inv_chol(L)
% Matrix Inversion using Cholesky Decomposition
% Finds the inverse of the matrix X, given its (lower triangular) Cholesky
% Decomposition; i.e. X = LL', according to the paper 'Matrix Inversion
% Using Cholesky Decomposition'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Initializations
%%%%%%%%... |
package net.meetsky.step_definitions;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import net.meetsky.pages.ContactsPage;
import net.meetsky.pages.LoginPage;
import net.meetsky.pages.MainPage;
import net.meetsky.utilities.ConfigurationReader;
import net.meetsky.ut... |
<?php
declare( strict_types=1 );
namespace MediaWiki\Skins\Citizen\Tests\Partials;
use MediaWiki\Skins\Citizen\Partials\Drawer;
use MediaWiki\Skins\Citizen\SkinCitizen;
/**
* @group Citizen
* @group Database
*/
class DrawerTest extends \MediaWikiIntegrationTestCase {
/**
* @covers \MediaWiki\Skins\Citizen\Par... |
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppCompon... |
import React from "react";
import { useSelector } from "react-redux";
import { referendumVoteFinishedStatusArray } from "../../../utils/democracy/referendum";
import { useEstimateBlocksTime } from "../../../utils/hooks";
import CountDown from "../../_CountDown";
import { bigNumber2Locale } from "../../../utils";
import... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- --------- UNICONS ---------- -->
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.8/css/line.css">
<!-- --------- CSS ---------- -->
... |
#include <iostream>
#include <fstream>
#include <filesystem>
#include <string>
#include <ctime>
#include <stdexcept>
#include <chrono>
#include <thread>
#include <conio.h>
#include <Windows.h>
namespace fs = std::filesystem;
enum ConsoleColor {
COLOR_DEFAULT = 7,
COLOR_RED = 12,
COLOR_GREEN = 10,
};
cons... |
{% extends "blog/base.html" %}
{% block content %}
<div class="flex items-center justify-between space-y-4 mt-7">
<div class="space-y-4">
<h1
class="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
... |
import 'dart:math';
import 'package:flutter/material.dart';
class NameAvatar extends StatelessWidget {
final String? fullName;
NameAvatar({this.fullName});
@override
Widget build(BuildContext context) {
String? initials = _getInitials(fullName);
Color color = _getColor(fullName);
return CircleA... |
import React, { useState, useEffect } from 'react';
import GeneralLayout from '../../components/general/GeneralLayout';
import { useParams, useNavigate } from 'react-router-dom';
import { formatDistanceToNow } from 'date-fns';
function HomeFaculty() {
const { faculty } = useParams();
const [articles, setArticle... |
---
title: Prestanda
slug: Tools/Prestanda
translation_of: Tools/Performance
---
<div><section class="Quick_links" id="Quick_Links">
<ol>
<li><a href="/sv-SE/docs/Tools/Page_Inspector">Sidinspektör</a></li>
<li><a href="/sv-SE/docs/Tools/Web_Console">Webbkonsol</a></li>
<li><a href="/sv-SE/d... |
"""Utility functions for copying and archiving files and directory trees.
XXX The functions here don't copy the resource fork or other metadata on Mac.
"""
import os
import sys
import stat
from os.path import abspath
import fnmatch
import collections
import errno
try:
from pwd import getpwnam
except ImportError... |
import Avatar from '@material-ui/core/Avatar';
import React,{useState} from 'react'
import './ChatScreen.css'
function ChatScreen() {
const [input,setInput] = useState("");
const [messages,setMessages] = useState([
{
name : 'Natasha Phiri',
image :"https://media.istockphoto.com/... |
package resources
import (
"context"
"fmt"
"log"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/internal/provider"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
var unsafeExecuteSchema = map[string]*schema.Schema{
"execute": {
Type: schema... |
package jmri.jmrit;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicReference;
import javax.annot... |
import React, { useContext, useEffect, useState } from "react";
import {
Form,
FormControl,
Button,
Container,
Row,
Col,
Alert,
} from "react-bootstrap";
import btnStyles from "../../styles/Button.module.css";
import styles from "../../styles/TaskCreateForm.module.css";
import { useNavigate, useParams } f... |
import {
Box,
Flex,
Button,
Checkbox,
Slider,
SliderTrack,
SliderFilledTrack,
SliderThumb,
Text,
} from '@chakra-ui/react';
import React from 'react';
import { useRecoilState, useSetRecoilState } from 'recoil';
import { playSound } from '../../hooks/useSound';
import {
enableSoundState,
finishDial... |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# 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 appli... |
<?php
namespace App\Http\Controllers;
use App\Models\PaymentRequest;
use App\Models\User;
use App\Traits\Processor;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Validator;
class PaystackController extends Controller
{
use Processor;
private PaymentReques... |
from django.db import models
from store.models import *
from orders.models import *
from django.contrib.auth.models import User
from django.utils import timezone
# Модель для хранения данных о продажах
class SalesStatistics(models.Model):
product = models.OneToOneField(Product, on_delete=models.CASCADE, verbos... |
"use strict";
/**
* Copyright 2015 CANAL+ Group
*
* 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 l... |
package it.unina.cinemates.viewmodels.user.movielist.common;
import android.os.Bundle;
import android.util.Log;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import androidx.navigation.NavController;
... |
package com.example.coroutinescodelab
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withCo... |
import React from 'react';
import "../node_modules/bootstrap/dist/css/bootstrap.min.css"
import Navbar from "./layout/Navbar";
import Home from "./pages/Home";
import {BrowserRouter as Router, Route, Routes} from "react-router-dom";
import AddUser from "./users/AddUser";
import EditUser from "./users/EditUser";
import ... |
import { useState } from 'react'
import Form from 'react-bootstrap/Form'
import Button from 'react-bootstrap/Button'
import Alert from 'react-bootstrap/Alert'
// import { Form, Button } from 'react-bootstrap' <-- questo metodo anche funziona, ma non è ottimale
// questo form creerà una prenotazione in un database sfru... |
import React, { useContext, useState } from 'react';
import { AuthContext } from '../../contexts/auth';
import { Container, UploadButton, UpLoadText, Avatar,Name,Email,Button,ButtonText,ModalContainer,ButtonBack,Input} from './styles'
import { AntDesign } from '@expo/vector-icons';
import { Modal, Platform } from 're... |
<script setup lang="ts">
import { Strategy } from '@/modules/lean/strategy'
import { useSimulationStore } from '@/modules/simulation/simulation-store'
const simulationStore = useSimulationStore()
const strategies: Strategy[] = ['push', 'pull', 'push-dps', 'pull-dps']
</script>
<template>
<div class="simulation-das... |
SYNOPSIS
========
mixed * filter(mixed *arg, string fun, string|object ob, mixed extra...)
mixed * filter(mixed *arg, closure cl, mixed extra... )
mixed * filter(mixed *arg, mapping map, mixed extra... )
string filter(string arg, string fun, string|object ob... |
<?php
namespace App\Filament\Pages;
use Filament\Pages\Auth\EditProfile;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Component;
use App\Models\User as Staff;
class MyProfile extends EditProfile
{
protected function getNameFormComponent(): Component
{
return TextInput::make(... |
import {useState, useEffect} from "react";
import {useRates} from './useRates';
import {Block, TBlockProps} from './Block';
function App() {
const [fromCurrency, setFromCurrency] = useState('UAH')
const [toCurrency, setToCurrency] = useState('USD')
const [fromPrice, setFromPrice] = useState(0)
const [t... |
// ignore: depend_on_referenced_packages
import 'package:flutter/material.dart';
import 'package:yourself_in_time_project/common/widgets/comment.dart';
class TestMe extends StatefulWidget {
@override
_TestMeState createState() => _TestMeState();
}
class _TestMeState extends State<TestMe> {
final formKey = Globa... |
<%@ page language="java" contentType="text/html; charset=US-ASCII"
pageEncoding="US-ASCII"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%-- Using Struts2 Tags in JSP --%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="sb" uri="/struts-bootstra... |
#include "main.h"
/**
* _print_rev_recursion - Recursive function that prints a string in reverse
* @s: This is the string to be reversed
* Return: void
*/
void _print_rev_recursion(char *s)
{
if (*s != '\0')
{
_print_rev_recursion(s + 1);
_putchar(*s);
}
} |
import { Module } from '@nestjs/common';
import { APP_FILTER } from '@nestjs/core';
import { ChannelController } from 'src/channel/channel.controller';
import { AllExceptionsFilter } from 'src/common/exception.filter';
import { PrometheusModule } from '@willsoto/nestjs-prometheus';
import { HealthController } from '@/h... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Add New Comment</title>
</head>
<body>
<h1>Please add your comment</h1>
<div>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing el... |
/*
* Copyright (C) 2011 The Android Open Source Project
*
* 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 app... |
# DESTEIN: Navigating Detoxification of Language Models via Universal Steering Pairs and Head-wise Activation Fusion
This repository contains code for the paper "DESTEIN: Navigating Detoxification of Language Models via Universal Steering Pairs and Head-wise Activation Fusion".
# Setup
Please use the command below to... |
import plus from '../../../utils/svg/plus.svg';
import circle from '../../../utils/svg/circle.svg';
import React, { useState } from 'react';
import Styles from './AddStep.module.scss';
import { selectedTodo } from '../../../atoms/selectedTodoAtom';
import { useRecoilValue } from 'recoil';
import axios from '../../../ax... |
CREATE OR REPLACE PROCEDURE criar_pedido(
idCliente IN NUMBER,
idProduto IN NUMBER,
quantidade IN NUMBER,
data_pedido IN DATE
)
IS
qtd_estoque NUMBER;
preco_produto NUMBER;
BEGIN
-- Verifica se o produto está em estoque na quantidade desejada
SELECT quantidade_estoque, preco
INTO qtd_estoque, p... |
# Indexing documents for the Chat App
This guide provides more details for using the `prepdocs` script to index documents for the Chat App.
- [Overview of the manual indexing process](#overview-of-the-manual-indexing-process)
- [Chunking](#chunking)
- [Indexing additional documents](#indexing-additional-documents... |
package serialize
import (
"github.com/aquasecurity/trivy-db/pkg/types"
)
type StringSlice []string
type AnalysisResult struct {
// TODO: support other fields as well
// OS *types.OS
// Repository *types.Repository
// PackageInfos []types.PackageInfo
// Applications ... |
import { CommonPlatformFeeSchema } from "../../schema";
import { DetectableFeature } from "../interfaces/DetectableFeature";
import { TransactionResult } from "../types";
import { ContractWrapper } from "./contract-wrapper";
import type { IPlatformFee } from "@thirdweb-dev/contracts-js";
import { z } from "zod";
/**
*... |
package graph;// Multi Source shortest path algorithm
// we wil store the graph in 2d array/adj matrix instead of adj list
// we will be building a cost matrix , where cost to reach self is 0
//Negative cycle: If the cost of reaching
import java.util.Arrays;
//matrix[i][j] =min(matrix[i][j], matrix[i ][k]+matrix[k][j... |
package http
import (
"bytes"
"github.com/ilhame90/gymshark-task/internal/config"
"github.com/ilhame90/gymshark-task/internal/domain/mocks"
"github.com/ilhame90/gymshark-task/internal/models"
"net/http"
"net/http/httptest"
"testing"
"github.com/golang/mock/gomock"
"github.com/labstack/echo/v4"
"github.com... |
const express = require('express')
const router = express.Router()
/* NYHEDS MODELLEN */
const Detsker = require('../models/detsker.model')
/* const formData = require('express-form-data')
router.use(formData.parse()) */
/* MULTER */
const multer = require('multer')
const upload = multer({
storage: multer.disk... |
import React from 'react'
import { useParams } from 'react-router-dom'
import '../styles/pages/fichelogement.css'
import Logements from '../data/fiches_logement.json'
import LogementSlideShow from '../components/logementSlideShow'
import LogementHeader from '../components/logementHeader'
import LogementDescription from... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Form Input Types & Attributes</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>Form Input Types & Attributes</h1>
<h2>Input... |
import UIKit
class RegistrationViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {
public weak var onEmployeeDataDelegate: (any EmployeeDataSource)?
var employee: Employee!
var vehicle: Vehicle!
var typeContract: TypeContract!
var typeEmployee: TypeEmployee!
... |
@extends('Landing.nav')
@section('content')
{{-- <div class="bg-image-vertical h-100" style="background-color: #EFD3E4;
background-image: url(https://mdbootstrap.com/img/Photos/new-templates/search-box/img1.jpg);
"> --}}
<div class="mask mt-5 align-items-center ">
<div clas... |
import { Delaunay } from "d3-delaunay";
import { useMemo } from "react";
const padding = { top: 0, left: 1.5 * 16, right: 1.5 * 16, bottom: 1.5 * 16 };
const cellGap = 22;
export type Point = {
x: number;
y: number;
};
export type PointWithPath = Point & {
path: string;
};
type UseVoronoiModelProps<T> = {
wi... |
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class CustomerFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'company_id' => $this->faker->number... |
# Copyright 2023 The kauldron 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 applicable law or agreed to in... |
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Runner\Filter;
use PHPUnit\Framework\TestCase;
u... |
import { NgModule, inject } from '@angular/core';
import { ActivatedRouteSnapshot, RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { DettaglioComponent } from './dettaglio/dettaglio.component';
import { MeteoService } from './_services/meteo.service';
const ... |
package com.uleam.appparahelados.ui.registro
import android.annotation.SuppressLint
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shap... |
import {
WebSocketGateway,
WebSocketServer,
MessageBody,
} from '@nestjs/websockets'
import { Logger, UseGuards } from '@nestjs/common'
import { SubscribeMessage } from '@nestjs/websockets/decorators'
import { AuthGuard } from '@nestjs/passport'
import { Socket } from 'socket.io'
import { E_Chat, I_ChatMessage, ... |
package openapi
import (
"encoding/json"
"fmt"
"github.com/blinkops/blink-http/consts"
ops "github.com/blinkops/blink-http/openapi/operations"
"github.com/blinkops/blink-sdk/plugin"
"github.com/blinkops/blink-sdk/plugin/connections"
"github.com/getkin/kin-openapi/openapi3"
"strings"
"unicode"
)
type NamedAct... |
import {
WaterDrop,
Task as MuiTask,
Note as MuiNote,
ArrowBack,
} from "@mui/icons-material";
import {
Typography,
Tabs,
Tab,
Box,
IconButton,
Skeleton,
} from "@mui/material";
import { useState } from "react";
import { useLocation, useNavigate } from "react-router-dom";
import NotesTab from "./T... |
// Copyright 2021 Goldman Sachs
//
// 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 ... |
// Require the Express Module
var express = require('express');
// Create an Express App
var app = express();
// Require body-parser (to receive post data from clients)
var bodyParser = require('body-parser');
var mongoose = require('mongoose');
// Integrate body-parser with our App
app.use(bodyParser.urlencoded({ exte... |
<!DOCTYPE html>
<html lang="pt" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
<meta charset="UTF-8">
<title>Cadastrar-se</title>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/c... |
#install.packages("arsenal")
library(readxl)
library(data.table)
library(lubridate)
library(tidyverse)
library(survival)
library(AdhereR)
library(ggpubr)
library(parallel)
library(arsenal)
memory.limit(size=1000000000)
### STEP1: FIND OPIOID PRODUCT ID
# Lookup lists
lookup_drug_class = data.table(read_excel("\\... |
import { test, expect } from '@playwright/test';
import { JouerQuizzFixture } from '../../src/app/quizz/jouer-quizz/jouer-quizz.fixture';
import { serverUrl } from '../e2e.config';
test.describe('Jouer Quizz', () => {
test('lancement de la page jouer quizz', async ({ page }) => {
let urlListQuiz = server... |
<script setup lang="ts">
import type { Events } from '../../../functions/types'
interface Props {
type: string
events: Array<Events>
}
const {
type,
events,
} = defineProps<Props>()
const { isCurrentDay, currentMonthYear, previousMonth, nextMonth, goToDay, currentMonthDayYear, datesOfThePastMonth, datesOfThe... |
# RedisLiteServer
## Introduction
RedisLiteServer is a lightweight C# implementation inspired by the challenge presented in "Write your own Redis Server" by John Crickett, available at [codingchallenges.fyi](https://codingchallenges.fyi/challenges/challenge-redis). This project aims to provide a simplified Redis-like... |
using CandidateJourney.Domain;
namespace CandidateJourney.API.GraphQLTypes
{
[GraphQLName("AudienceCategory")]
public class AudienceCategoryType : EnumType<AudienceCategory>
{
protected override void Configure(IEnumTypeDescriptor<AudienceCategory> descriptor)
{
descriptor.BindV... |
import type { PublicKey } from '@solana/web3.js';
import { toBidReceiptAccount } from '../accounts';
import { AuctionHouse, Bid, toLazyBid } from '../models';
import {
Operation,
OperationHandler,
OperationScope,
useOperation,
} from '@/types';
import type { Metaplex } from '@/Metaplex';
// -----------------
/... |
import logging
import boto3
from botocore.exceptions import ClientError
from django.conf import settings
logger = logging.getLogger(settings.LOGGER_NAME)
class DynamoDBClient:
_instance = None
def __new__(cls):
if cls._instance is None:
cls._instance = super(DynamoDBClient, cls).__new__... |
import 'dart:convert';
import 'package:flutter_test/flutter_test.dart';
import 'package:number_trivia/features/number_trivia/data/models/number_trivia_model.dart';
import 'package:number_trivia/features/number_trivia/domain/entities/number_trivia.dart';
import '../../../../fixtures/fixture_reader.dart';
void main() ... |
package Class13;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class PreparedStatementAPI {
static {
try {
Class.forName("com.mysql.cj.jdbc.Driver");
}
catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
... |
package main
import (
"fmt"
"log"
"encoding/json"
"math/rand"
"net/http"
"strconv"
"github.com/gorilla/mux"
)
type Movie struct {
ID string `json:"id"`
Isbn string `json:"isbn"`
Title string `json:"title"`
Director *Director `json:"director"`
}
type Director struct {
FirstName string `json:"firstname"`
... |
#include <stdio.h> /*printf*/
#include <assert.h> /*assert*/
#include <stdlib.h> /*malloc*/
typedef struct node {
int data;
struct node *next;
} node;
void add(node *head, int x){
/*pre: head points to the first, empty element. The last element's next is NULL
post: a new node containing x is added to the e... |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0
using System;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Rekognition;
using Amazon.Rekognition.Model;
using AWS.Lambda.Powertools.Logging;
using AWS.Lambda.Powertools.Parameters;
using AWS.Lambda.... |
/**
* Tungsten Scale-Out Stack
* Copyright (C) 2009 Continuent Inc.
* Contact: tungsten@continuent.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is... |
from datetime import datetime
from uuid import uuid4
class Refund:
def __init__(self, reason, value, user_id, booking_id):
self.reason = reason
self.value = value
self.user_id = user_id
self.booking_id = booking_id
@classmethod
def from_dict(cls, refund_dict):
retur... |
import Foundation
import ArgumentParser
import SourceCrawlerKit
@main
struct SourceCrawlerCommand: ParsableCommand {
@Option(name: .shortAndLong, help: "The root path to start the file traversal.")
var rootPath: String?
@Option(name: .customShort("t"), help: "Comma-separated list of file extensions to inc... |
import React, { useContext, useState } from "react";
import { UserContext } from "../UserContext";
import axios from "axios";
export const Stream = () => {
const { username: name, streamKey } = useContext(UserContext);
const [title, setTitle] = useState("");
const [selectedFile, setSelectedFile] = useState(null)... |
package storage
import (
"database/sql"
"fmt"
"os"
"strconv"
_ "github.com/lib/pq"
t "github.com/mrkhay/gobank/type"
"golang.org/x/crypto/bcrypt"
)
type Storage interface {
CreateAccount(*t.Account) error
DeleteAccount(int) error
UpdateAccount(*t.Account) error
GetAccounts() ([]*t.Account, error)
Account... |
C#######################################################################
C
C One- and two-dimensional adaptive Gaussian integration routines.
C
C **********************************************************************
SUBROUTINE GADAP(A0,B0,F,EPS,SUM)
IMPLICIT NONE
C
C PURPOSE - INTEGRATE A F... |
<!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>Todolist</title>
</head>
<body>
<form name="todoForm">
<table>
... |
import Box from '@mui/material/Box'
import Button from '@mui/material/Button'
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'
import dayjs, { Dayjs } from 'dayjs'
import { type AlertColor } from '@mui/material/Alert'
import ... |
import numpy as np
import os
import matplotlib.pyplot as plt
import yaml
ROOT_DIR = os.getcwd()
MAIN_DIR = os.path.join(ROOT_DIR, "standard_map")
DATA_DIR = os.path.join(MAIN_DIR, "data")
CONFIG_DIR = os.path.join(MAIN_DIR, "config")
with open(os.path.join(CONFIG_DIR, "parameters.yaml"), "r") as file:
PARAMETERS... |
//START IMPORTS
import React, { useState } from "react";
import DeleteIcon from "@mui/icons-material/Delete";
import { CircularProgress, IconButton } from "@mui/material";
import EditIcon from "@mui/icons-material/Edit";
import Swal from "sweetalert2";
import { useDeleteProductMutation } from "../../features/product/pr... |
"""
Loading and saving of the .semgrepconfig.yml file.
"""
import re
from pathlib import Path
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
import ruamel.yaml
from attr import asdict
from attr import define
from attr import field
import semgrep.semgrep_interfaces.s... |
import 'package:school/webview.dart';
import 'package:flutter/material.dart';
import 'package:introduction_screen/introduction_screen.dart';
import 'package:shared_preferences/shared_preferences.dart';
class IntroScreen extends StatelessWidget {
final introKey = GlobalKey<IntroductionScreenState>();
List<PageView... |
package top.lijingyuan.mockito.learing.lesson06;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import java.util.ArrayList;
import java.util.List;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;
import static org.mock... |
#
# @lc app=leetcode id=155 lang=python3
#
# [155] Min Stack
#
# https://leetcode.com/problems/min-stack/description/
#
# algorithms
# Easy (45.79%)
# Likes: 4388
# Dislikes: 409
# Total Accepted: 655K
# Total Submissions: 1.4M
# Testcase Example: '["MinStack","push","push","push","getMin","pop","top","getMin"]\... |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Homepage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="ht... |
package fr.progilone.pgcn.service.document.conditionreport;
import static fr.progilone.pgcn.exception.message.PgcnErrorCode.DESC_VALUE_PROPERTY_MANDATORY;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
import fr.progilone.pgcn.dom... |
import { useCodeMirror } from '@uiw/react-codemirror';
import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
import { Transaction, type ChangeSpec } from '@codemirror/state';
import type { ViewUpdate} from '@codemirror/view';
import { useEffect, useRef, useState } from 'react';
import yorkie from 'yor... |
<!DOCTYPE html>
<html>
<head>
<title>Personal Portfolio</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="styles... |
import {
Box,
HStack,
Heading,
Image,
Text,
useDisclosure,
Flex,
Avatar,
SkeletonCircle,
SkeletonText,
} from "@chakra-ui/react";
import styles from "./View.module.css";
import HTMLToReact from "html-to-react";
import React, { useEffect, useRef, useState } from "react";
import { useDispatch, useSele... |
package com.epam.ta.test;
import com.epam.ta.model.CloudProduct;
import com.epam.ta.service.CloudProductCreator;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.epam.ta.page.GoogleCloudHomePage;
import com.epam.ta.page.GoogleCloudPricingCalculatorPag... |
package com.example.demo.controller;
import com.example.demo.entity.Category;
import com.example.demo.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.a... |
import React, { Component } from "react";
import axios from "axios";
import "bootstrap/dist/css/bootstrap.min.css";
import { Link } from "react-router-dom";
export class Edit extends Component {
state = {
aptDate: "",
doctor: "",
patient: "",
type: "",
status: "",
createdBy: ""
};
componen... |
---
title: "Source Code"
output:
html_document:
toc: TRUE
toc_float: TRUE
---
$$\\[.05in]$$
This section of the website provides the source code for both the homepage and tables page of this project. Comments for chunks of code are provided to give context and give purpose to the code.
$$\\[.1in... |
#!/usr/bin/env python
# External imports
import json
from pathlib import Path
from typing import List, Dict
from xml.dom.minidom import Document
import pandas as pd
from ruamel.yaml import CommentedMap, CommentedSeq
from urllib.parse import urlparse
# Wrapica imports
from wrapica.utils.globals import NEXTFLOW_PROCESS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.