text stringlengths 184 4.48M |
|---|
import numpy as np
import matplotlib.pyplot as plt
import torch
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../professad'))
from system import System
from functionals import IonElectron, Weizsaecker
# the single electron quantum harmonic oscillator (QHO) is a non-... |
package tuf_a2zdsacourse.bsproblems;
import java.util.*;
public class BookAllocationProblem {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
ArrayList<Integer> ls=new ArrayList<>(Arrays.asList(12,34,67,90));
int n=ls.size();
System.out.print("Enter the ... |
const Header = ({ course }) => {
return (
<h1>{course.name}</h1>
)
}
const Part = ({ part }) => {
return (
<div>
<p>{part.name} {part.exercises}</p>
</div>
)
}
const Content = ({ parts }) => {
return (
<div>
<Part part={parts[0]}/>
<Part part={parts[1]}/>
<Part part={... |
import WebSocket from 'ws';
import fetch from 'node-fetch';
// define the websocket and REST URLs
const wsUrl = 'wss://api.vitex.net/v2/ws';
const restUrl = "https://api.vitex.net/api/v2/markets";
const response = await fetch(restUrl);
//extract JSON from the http response
const myJson = await response.json();
var c... |
'use strict';
const apiUrl = 'http://127.0.0.1:9999/api/hw36/posts';
let posts = [];
const rootEl = document.getElementById('root');
const loaderEL = document.createElement('div');
loaderEL.dataset.id = 'loader';
loaderEL.textContent = 'Данные загружаются';
rootEl.appendChild(loaderEL);
let selectedPostEl = null;
let ... |
<template>
<div
class="msg-img clear"
:style="{
height: IsLoad ? '100px' : 'auto',
width: IsLoad ? '100px' : 'auto'
}"
>
<img
ref="img"
v-show="url"
:src="url"
@load="loadHandle($event)"
@error="errorHandle($event)"
@loadstart="loadstartHandle"
@... |
import { Injectable, UnauthorizedException } from "@nestjs/common"
import { PassportStrategy } from "@nestjs/passport"
import { ExtractJwt, Strategy } from "passport-jwt"
import { UsersService } from "../users/users.service"
import { JwtPayload } from "./interfaces/jwt-payload.interface"
@Injectable()
export class Jwt... |
library(tidyverse)
library(abc)
library(jsonlite)
source("../data/helpers.R")
basedir <- "post_21000_2022-12-05"
# Observed heterozygosity and pairwise stats
observed_df <- read.csv(file.path(basedir, "cleaned_results/observed.csv"))
observed <- observed_df$x
names(observed) <- rownames(observed_df)
# Simulated heter... |
package org.intra_mart.common.aid.jdk.java.lang;
import java.util.LinkedList;
import org.intra_mart.common.platform.log.Logger;
public class ExtendedThread extends Thread {
private static Logger _logger = Logger.getLogger();
/**
* スレッド実行するロジックを持ったオブジェクト
*/
private Runnable runner = null;
/**
* スレッド停止リスナー... |
prams.uwind = wind;
prams.vortStrength = vortStrength;
prams.sinkStrength = sinkStrength;
prams.dx = dx;
addpath ../src
usePlot = false;
savePlot = false;
saveFrames = false;
saveData = true;
saveMovie = false;
if saveMovie
writerObj = VideoWriter('test','MPEG-4');
open(writerObj);
end
filename = 'fireLine';
Vna... |
"use client";
import Kappke from "@/assets/KappkeLogo";
import {
BellIcon,
CalendarIcon,
ChatBubbleLeftIcon,
Cog6ToothIcon,
CreditCardIcon,
DocumentIcon,
FolderIcon,
HomeIcon,
PencilIcon,
PhotoIcon,
PowerIcon,
QuestionMarkCircleIcon,
ShoppingCartIcon,
UserGroupIcon,
} from "@heroicons/react... |
#[cfg(test)]
mod tests {
// use gas_api::IGasEstimateApiDispatcherTrait;
use core::debug::PrintTrait;
use snforge_std::{declare, ContractClassTrait};
use gas_api::gas_api::{IGasEstimateApiDispatcher, IGasEstimateApiDispatcherTrait};
#[test]
fn get_minimum_gas_price_to_work() {
// First ... |
import { FastifyInstance } from 'fastify'
import { ZodTypeProvider } from 'fastify-type-provider-zod'
import { z, ZodError } from 'zod'
import { auth } from '@/http/middlewares/auth'
import { prisma } from '@/lib/prisma'
import { errorSchema, suitabilitySchema } from '@/schemas/base-schema'
import { CalculateSuitabili... |
import UIKit
extension UIView {
func addGradient(colors: [UIColor]) {
// Remove any existing gradient layer
for (index, sublayer) in (self.layer.sublayers ?? []).enumerated() where sublayer is CAGradientLayer {
self.layer.sublayers?.remove(at: index)
}
// Add new gradien... |
"use client";
import { useNextForm } from "@/components/next-form";
import { ValidationSchema, validationSchema } from "@/schema/user.schema";
import { create } from "@/server-actions/form.action";
import { zodResolver } from "@hookform/resolvers/zod";
export default function DashboardIndex() {
const {
handleSu... |
Design:
Sequence contains a node and a variable that stores current size of the Sequence as well as two pointers to Nodes, *head and *tail. Each node contains two pointers to Nodes, *prev and *next, along with a variable of type ItemType that stores a value.The list does not contain a dummy node and is not circular.
... |
#ifndef SUPERVISOR_H
#define SUPERVISOR_H
#include "floor.h"
/*!
* \brief The Supervisor class
* Chooses the destination for the packages, sends orders
*/
class Supervisor : public QObject
{
Q_OBJECT
public:
/*!
* \brief Constructor of the class
*/
Supervisor();
/*!
* \brief Adds shel... |
import { useState } from "react";
import "../App.css"
const CreateRecipe = () => {
const blankForm = { name: "", ingredients: [""], instructions: "" };
const [form, setForm] = useState(blankForm);
const handleIngredientChange = (index, value) => {
const updatedIngredients = [...form.ingredients];
updat... |
package com.linkallcloud.core.util;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import com.linkallcloud.core.lang.Strings;
import org.apache.commons.logging.Log;
import org.apache.com... |
import React, { createContext, useReducer } from 'react'
// Reducer function to handle notification actions
const notificationReducer = (state, action) => {
switch (action.type) {
case 'SET_NOTIFICATION':
return action.payload
case 'CLEAR_NOTIFICATION':
return null
default:
return state... |
############################################################################
############################################################################
############################################################################
#
# In this file we load and format the CPRD dataset.
#
###########################... |
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle ... |
<template>
<v-container>
<h1 class="text-center">Востановление пароля</h1>
<v-row>
<v-col>
<v-form
ref="form"
v-model="valid"
lazy-validation
>
<v-text-field
v-model="email"
label="Почта"
:rules="emailRules"
... |
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.frontend.taglib.servlet.taglib;
import com.liferay.frontend.taglib.form.navigator.FormNavigatorCategoryProvider;
import com.lifer... |
#pragma once
#include <stdlib.h>
#include <time.h>
#include <iostream>
#include <thread>
#include <vector>
#include "tablero.h"
class Juego {
public:
// constructores
Juego();
Juego(int dim_x, int dim_y, int num_celulas_vivas, std::vector<int> pos_x,
std::vector<int> pos_y);
// metodos para el auto... |
package com.greatmrpark.common.provider;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
* <p>
* <pre>
*
* ContextProvider.java
* 개정이력(Modifica... |
import { Injectable } from '@angular/core';
import {
HttpInterceptor,
HttpRequest,
HttpHandler,
HttpErrorResponse,
} from '@angular/common/http';
import {
BehaviorSubject,
Observable,
catchError,
filter,
switchMap,
take,
throwError,
} from 'rxjs';
import { AuthService } from './auth.service';
imp... |
package com.example.furniturecloudy.present.fragments.shopping
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.fragment.app.viewModels
import androidx.lifecycle.Lifecycle... |
---
title: VSCode の Prettier の設定を理解する
time: 2020-01-13 15:31
---
# VSCode の Prettier の設定を理解する
VSCode で prettier を使う際に、なんとなくで設定していてたまに困るので整理する。 prettier の vscode 用拡張機能のページをちゃんと読めば、いろいろと書いてあったのでメモ。[https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode](https://marketplace.visualstudio.com/items?ite... |
import db from '../../modules/database';
import exception from "../../modules/exception";
import tool, {getUUID} from "../../services/tool";
import UserUtil from "../../utils/UserUtil";
import config from "../../config.js";
import {sendmail} from "../../services/ses.js";
export class User {
public app: string
... |
<!-- templates/signup.html -->
{% extends 'base.html' %}
{% load static %}
{% block title %}Sign Up{% endblock %}
{% block content %}
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js" defer></script>
<div class="container max-w-full mx-auto md:py-24 px-6">
<div class="max-w-sm mx-auto... |
package starspire;
//import java.io.OutputStream;
/**
* The debug class is a wrapper for output.
* It will allow us to print to system.out but will also enable logging. Not only that it will let us
* disable console output for everything in a central place.
* @author Patrick Fiaux
*/
public class Debug {
pri... |
"""Car Module."""
class Car:
"""Car Class."""
def __init__(self, make, model, year):
"""Initialize Car."""
self.make = make
self.model = model
self.year = year
def get_description(self):
"""Get a full description of the car."""
return f"{self.year} {self.mak... |
package com.anderson.secomp_backend_help_RS.controller;
import com.anderson.secomp_backend_help_RS.dto.UserDto;
import com.anderson.secomp_backend_help_RS.model.User;
import com.anderson.secomp_backend_help_RS.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframewor... |
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
Future<bool?> showConfirmationDialog({
required BuildContext context,
String title = "Are you sure ?",
required String description,
required VoidCallback? onValidate,
}) async {
return await showDialog<bool?>(
context: con... |
---
id: 657efdcf7fe23b76c0cff9ec
title: Step 7
challengeType: 20
dashedName: step-7
---
# --description--
Add an `else` clause on the same level as the existing `if` statement, inside the `for` loop. Add characters that are already in lowercase to the list of converted characters inside the body of the `else` clause.... |
<template>
<div class="p-2 rounded text-sm ">
<div class="relative">
<Textarea @keyup.ctrl.enter="saveComment" ref="textareaRef" autocomplete="new-text" rows="3" v-model="content"
class="dark:bg-slate-500 border-separate" :placeholder="placeholder" </Textarea>
<div class="absolute right-2 bott... |
use log::LevelFilter;
use std::path::PathBuf;
#[derive(Debug, clap::Parser)]
#[command(version)]
pub struct Command {
#[command(subcommand)]
pub command: SubCommands,
#[arg(long, default_value = "askew_config.toml")]
pub config: PathBuf,
/// Print debug logs
#[arg(short = 'l', long, default_v... |
import 'package:easy_localization/easy_localization.dart';
import 'package:expansion/domain/repository/user_repository.dart';
import 'package:expansion/utils/value.dart';
import 'package:get/get.dart';
import 'package:surf_logger/surf_logger.dart';
/// класс для отлеживания очков и апгрейда
/// различных параметров иг... |
<?php
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*... |
package com.mary.avjava.services;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org... |
import styled, { css, DefaultTheme } from 'styled-components';
import { TextType } from './Text';
type TextProps = {
type: TextType;
theme: DefaultTheme;
isActive?: boolean;
};
const textStyled = ({ theme, type, isActive = false }: TextProps) => {
switch (type) {
case 'logo-title': {
return css`
... |
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/03/a/RAM64.hdl
/**
* Memory of 64 registers, each 16 bit-wide. Out holds the value
* stored at the memory location specified by address. If load==1, then
* the... |
<!doctype html>
<html lang="en">
<head>
<title>Title</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="./css/style.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https:/... |
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Prometheus;
namespace gpxoverlay
{
public class PrometheusMiddleware
{
private readonly RequestDelegate _next;
priv... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('subcategorias', function (Blueprint $table) ... |
package com.gzunzu.videogames.api;
import com.gzunzu.common.adapters.api.BaseController;
import com.gzunzu.videogames.domain.dto.GenreDTO;
import com.gzunzu.videogames.ports.GenreService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
i... |
import 'package:flutter_test/flutter_test.dart';
import 'package:runnoter/data/model/workout.dart';
import 'package:runnoter/ui/service/workout_stage_service.dart';
void main() {
test(
'calculate distance of workout stage, '
'distance stage, '
'should simply return distance',
() {
const double ... |
import { Callout } from "nextra/components";
import REPL from "../../components/REPL";
> Returns a new string with one, some, or all matches of a pattern replaced by a replacement.
## Syntax
```ts
import { strReplace } from '@opentf/std';
strReplace(str: string,
pattern: string | RegExp,
repla... |
using ActivityImporter.Engine.ActivityAPI.Models;
using Common.DataUtils.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
namespace ActivityImporter.Engine.ActivityAPI.Loaders;
/// <summary>
/// Activity API implementation for ActivitySummaryLoader
/// </summary>
public class WebContentMetaDataLoader... |
#!/usr/bin/env python
import argparse
import os
import copy
import json
import subprocess
import logging
from urllib import request, parse
LOG = logging.getLogger(__name__)
def execute_command(cmd: str, shell=True, encoding="utf-8", timeout=None, return_code_dict=None) -> (bool, str):
try:
logging.info("... |
#lang racket
(require berkeley)
;A “perfect number” is defined as a number equal to the sum of all its factors less than itself.
;For example, the first perfect number is 6, because its factors are 1, 2, 3, and 6,
;and 1+2+3=6. The second perfect number is 28, because 1+2+4+7+14=28.
;What is the third perfect number? ... |
package com.example.smu
import android.annotation.SuppressLint
import android.content.ContentValues
import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
class DatabaseChat private constructor(context: Context) : SQLiteOpenHelper(context, DATABASE... |
/**
* Control DMX de 3 leds.
* Basado en el ejemplo:
*
* https://wltd.org/dmx-to-rgbw-led
*
* xlr 1 / gnd
* xlr 2 white
* xlr 3 black
*/
#include <DMXSerial.h>
#include <VirtualWire.h>
#define default_level 0
int motor_1_pin = 3; // 9 no va
int led_1_pin = 10;
int motor_2_pin = 5; // 10 no va
int led_2_pin... |
import { Component, OnInit } from '@angular/core';
import { Observable, BehaviorSubject, combineLatest, Subject } from 'rxjs';
import { Post } from '../../models/models';
import { PostsService } from '../../services/posts.service';
import { Router } from '@angular/router';
import { shareReplay, map, flatMap, takeUntil,... |
package org.bertspark.classifier.block
import ai.djl.ndarray._
import ai.djl.ndarray.types._
import ai.djl.nn._
import ai.djl.nn.core.Linear
import ai.djl.nn.norm.BatchNorm.batchNorm
import ai.djl.training.ParameterStore
import ai.djl.translate.StackBatchifier
import ai.djl.util.PairList
import org.bertspark.dl.block.... |
package com.jlaby.world;
/*
* @(#)Position.java 0.1 99/Feb/12
*
* Copyright TARSEC Corp.
* 8047 Zurich, Switzerland, All Rights Reserved.
*
* CopyrightVersion 1.0
*/
import java.io.*;
/**
* This class is a holder for information about the
* position of any object within the Laby world.
*
* @author Marcel... |
# strncpy.s (check out the man page for strncpy)
# ADDITIONAL TO DO: test the strlen() function
# TO DO: write a strlen() function and use that instead of
# prompting the user, i.e., get the length of src
# and copy all of the bytes over to dest
#
# TO DO: write a strncmp() function (...Exam 1)
#
.... |
#include "Debug.h"
#include "Event/Manager.h"
#include "Event/Listener.h"
#include "Event/IListenerDelegate.h"
#include "Graphic/Renderer.h"
#include "Graphic/Scene.h"
#include "Widget/Widget.h"
#include "Widget/GraphicWidget.h"
#include "Menu/Login.h"
#include "Menu/IMenuDelegate.h"
#include "Application.h"
class Tes... |
#' @title sp2coords function
#'
#' Function to extract the coordinates matrix from a class Polygon, Polygons, SpatialPolygons, or SpatialPolygonsDataFrame object that containins a single polygon.
#' Warning: Do not use this function if the inout spatial object contains more than coordinates matrix.
#'
#' @param x sp:... |
import React, { useState } from 'react'
import { SERVER_PREFIX } from '../App.jsx'
import { languages } from '../constants/index.js'
import { request } from '../utils/index.js'
import { AudioStreamPlayer, Dropdown, LoadingSpinner, SpeechToText } from './index.js'
import ContentWrapper from './ContentWrapper.jsx'
const... |
#include <iostream>
#include <fstream>
#include <functional>
#include "llrec.h"
using namespace std;
/**
* Reads integers (separated by whitespace) from a file
* into a linked list.
*
* @param[in] filename
* The name of the file containing the data to read
* @return
* Pointer to the linked list (or NULL if em... |
import { Transform } from "class-transformer";
import { IsNotEmpty, IsNumber, IsString } from "class-validator";
export class SaveProductDTO {
@IsString()
@IsNotEmpty()
productDescription: string;
@Transform(({ value }) => parseFloat(value))
@IsNumber()
salePrice: number;
@Transform(({ value }) => pars... |
import asArray from "./helpers/asArray";
import { QueueItem } from "./types";
const Queue = function (initialItems: QueueItem[]) {
/**
* Add a single or several steps onto the `waiting` queue.
*/
const add = function (steps: QueueItem[] | QueueItem): typeof Queue {
_queue = _queue.concat(asArray<QueueIte... |
@extends('layouts.dashboard')
@section('title', 'Usuarios')
@section('content')
<div class="block mx-auto my-12 p-8 bg-white w-1/3 border border-gray-200 rounded-lg shadow-lg" style="width:900px">
<h1 class="text-3xl text-center font-bold">Crear un usuario</h1>
<br>
<center>
<form action="{{route('... |
<template>
<div :id="id" :class="className" :style="{ height: height, width: width }"></div>
</template>
<script lang="ts">
import { defineComponent, onMounted, watch, nextTick } from 'vue';
import { init, EChartsOption } from 'echarts';
export default defineComponent({
props: {
className: {
... |
import Foundation
public struct GreenstandWalletSDKConfiguration {
public struct WalletAPIConfiguration {
let apiKey: String
let rootURL: URL
let rootWalletName: String
let rootPassword: String
public init(
apiKey: String,
rootURL: URL,
... |
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<!-- get the fun spinner up so it looks like we are doing something -->
<script>
const startTime = performance.now();
window.addEventListener("load", function () {
const loader = document.getElementById("loader");
loader... |
<?php
/**
* The admin-specific functionality of the plugin.
*
* Defines the plugin name, version, and two hooks to
* enqueue the admin-facing stylesheet and JavaScript.
* As you add hooks and methods, update this description.
*
* @package Plugnmeet
* @subpackage Plugnmeet/admin
* @author Jibon Costa <ji... |
import 'settings/PacientePropriedade.dart';
import 'settings/connection.dart';
import 'dart:convert';
import 'dart:async';
import 'package:http/http.dart' as http;
import 'Usuario.dart';
class Paciente extends Usuario {
int codigo = 0;
String cartaoSUS = "";
Paciente(codigo, nome, sobrenome, dataNascimento, c... |
import { closeIcon } from 'assets/images/icons'
import classnames from 'classnames'
import React, { FC, useEffect, useState } from 'react'
import cl from './style.module.scss'
import { AlertType } from './types'
interface CustomAlertProps {
message: string
type: AlertType
styleTypes: AlertType[]
}
const CustomAle... |
#!/usr/bin/python3
"""Rectangle class module"""
from models.base import Base
class Rectangle(Base):
"""Class Rectangle"""
def __init__(self, width, height, x=0, y=0, id=None):
"""constructor"""
self.width = width
self.height = height
self.x = x
self.y = y
super(... |
import React from 'react';
import { Formik, Field, Form } from 'formik';
import { initialValuesSignIn, validationSchemaSignIn } from '../../validation/validation-signin';
import OutlinedInput from '@mui/material/OutlinedInput/OutlinedInput';
import { FormControl } from '@mui/material';
import InputLabel from '@mui/mate... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { OnboardingRoutingModule } from './onboarding-routing.module';
import { OnboardingListComponent } from './onboarding-list/onboarding-list.component';
import { OnboardingDetailsComponent } from './onboarding-details/onboar... |
const fs = require('fs/promises');
const path = require('path');
const leastFilesQuantity = 10;
// Indicates processing time
function timestamp() {
return `${performance.now().toFixed(2)}ms`;
}
const dataPath = path.join(__dirname, './data');
// Get an array from arrays with unique users
async function getArrsOfU... |
# Fraud Detection with Feature Store<a name="feature-store-fraud-detection-notebook"></a>
## Step 1: Set Up Feature Store<a name="feature-store-setup"></a>
To start using Feature Store, create a SageMaker session, boto3 session, and a Feature Store session\. Also, set up the S3 bucket you want to use for your featur... |
import { LegacyRef, useEffect, useRef, useState } from 'react';
type Options = {
offset?: string;
shouldStop?: boolean;
onLoadMore?: () => Promise< void >;
};
/** useInfiniteScroll */
export function useInfiniteScroll( options?: Options ) {
const { offset = '0px', shouldStop = false, onLoadMore } = options ?? {};... |
from datetime import datetime
from random import randint
from time import sleep
import numpy as np
import pandas as pd
import requests
from bs4 import BeautifulSoup
class BooksScraper:
"""Automated data collection tool (web-scraper) that is specifically
tailored to scrape data on Bookdepository based on spec... |
# Copyright DataStax, 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 in writing, softwa... |
# Copyright (c) 2021 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
import gc
import re # For finding containers with asterisks in the constraints and for detecting backup files.
import time
import sqlite3 as db
from typing import Any, cast, Dict, List, Optional, Set, Type, TYPE_CHECKIN... |
#!/usr/bin/env perl
# -*- perl -*-
use strict;
use warnings FATAL => qw ( all );
use Common::Config;
use Common::Messages;
use Seq::Storage;
use Seq::Help;
my ( $prog_name, $signature, $usage, $args, $seqs, $out_formats );
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>> USAGE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$prog_name = ( ... |
# CRACO [](https://travis-ci.org/sharegate/craco) [](https://github.com/sharegate/craco/pulls)
**C**reate **R**eact **A**pp **C**onfiguration **O**verride is an easy and comprehensi... |
import React from 'react';
import AssetTypeImage from '../../Components/AssetTypeImage';
import CountryImage from '../../Components/CountryImage';
import { useAppDispatch, useAppSelector } from "../../hooks"
import { RootState } from "../../store";
import { setQuery, setResults, TodayResult } from "./todaySlice";
int... |
package valkyrie.ide.doc
//import valkyrie.language.psi_node.ValkyrieClassStatementNode
//import valkyrie.language.psi_node.ValkyrieTraitStatementNode
import com.intellij.openapi.editor.colors.EditorColorsManager
import com.intellij.openapi.editor.richcopy.HtmlSyntaxInfoUtil
import com.intellij.psi.PsiElement
import c... |
package landing.l2.applicationCode.scanner;
import landing.l3.domainCode.scanner.NumberBuilder;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
public class NumberBuilderTest {
@Test
public void testDetermineStringForValueFromInteger() {
... |
class Searchable::Indexer
MESSAGE_SEARCHABLE_FIELDS = [
{ name: :title, formatter: :string },
{ name: :sender_name, formatter: :string },
{ name: :html_visualization, formatter: :html_string },
]
def self.index_message_thread(message_thread)
record = ::Searchable::MessageThread.find_or_initialize... |
/*
* MIT License
*
* Copyright (c) 2022 XenFork Union
*
* 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, mo... |
package part2actors
import akka.actor.{Actor, ActorSystem, Props}
object ActorsIntro extends App {
//part1 - actor systems
val actorSystem=ActorSystem("firstActorSystem")
println(actorSystem.name)
// part2 - create actors
// word count actor
class WordCountActor extends Actor {
// internal data
... |
import React, { Component } from 'react'
import { Header, Grid, List } from 'semantic-ui-react'
import LinkButton from '../link_button'
const trufflConfig = `aldwych: {
host: 'localhost',
port: 8545,
network_id: '*'
}`
export default class Faucet extends Component {
render () {
return (
<Grid.Column... |
package game.settings;
import game.gameobjects.player.components.PlayerConfiguration;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* @author Mateusz Żebrowski
*/
@Component
public class InternalSettings {
@Getter
@Val... |
import './featuredMovie.scss'
import { PlayArrow, InfoOutlined } from '@material-ui/icons'
import { useEffect, useState } from 'react'
import { Link } from 'react-router-dom'
import axios from 'axios'
const FeaturedMovie = ({ type }) => {
const [ content, setContent ] = useState({})
useEffect(() => {
const g... |
#
# @lc app=leetcode.cn id=938 lang=python3
#
# [938] 二叉搜索树的范围和
#
# https://leetcode-cn.com/problems/range-sum-of-bst/description/
#
# algorithms
# Easy (81.89%)
# Likes: 252
# Dislikes: 0
# Total Accepted: 99K
# Total Submissions: 120.8K
# Testcase Example: '[10,5,15,3,7,null,18]\n7\n15'
#
# 给定二叉搜索树的根结点 root,返回... |
<template>
<doc-alert title="【交易】分销返佣" url="https://doc.iocoder.cn/mall/trade-brokerage/" />
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="用户编号" prop="userId">
... |
import type { Context } from 'react';
import type { ReactReduxContextValue } from 'react-redux';
import { setupListeners } from '@reduxjs/toolkit/query';
import type { Api } from '@reduxjs/toolkit/dist/query/apiTypes';
/**
* Can be used as a `Provider` if you **do not already have a Redux store**.
*
* @example
* ``... |
//
// BookDetailFull.swift
// ReadLog
//
// Created by 이만 on 2023/11/21.
//
import SwiftUI
import CoreData
struct BookDetailFull: View {
@Environment(\.managedObjectContext) private var viewContext
@Environment(\.dismiss) var dismiss
@StateObject private var viewModel: ReadingTrackerViewModel
@Sta... |
import { useNavigate, useParams } from "react-router-dom";
import { useDataContext } from "../Context/DataContext";
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import { Avatar, Box, Button, Divider, Paper, Typography } from "@mui/material";
import { RatingFormModal } from "../Component/RatingFormModal"... |
import React, { useRef } from 'react';
import './App.css';
import { FocusableInput, FocusableInputRef } from './FocusableInput'
export type Props = {
initialText: string
}
const App = () => {
const inputRef = useRef<FocusableInputRef>(null)
const handleClick = () => {
if (inputRef.current) {
inputRe... |
---
title: Adobe Experience Manager Mobili - Preparazione al RGPD
description: Scopri come Adobe Experience Manager è pronta ad aiutarti con gli obblighi di conformità ai requisiti RGPD.
contentOwner: trushton
exl-id: d06e675f-fb61-47da-85de-e0b50dd44153
source-git-commit: 8b4cb4065ec14e813b49fb0d577c372790c9b21a
workf... |
import 'package:dio/dio.dart';
import 'package:lettutor/clean_architectures/data/models/token/sign_in_response.dart';
import 'package:injectable/injectable.dart';
import 'package:retrofit/retrofit.dart';
import '../../../models/user/auth_response.dart';
part 'auth_api.g.dart';
@injectable
@RestApi()
abstract class A... |
<script setup>
import { productsInfo } from '../stores/data';
import vue3starRatings from 'vue3-star-ratings'
const search = ref('')
const error = ref('')
const filterProducts = computed(() => {
return productsInfo.products.filter((product) => product.name.includes(search.value))
})
watch(search, () => {
if (filte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.