text stringlengths 184 4.48M |
|---|
package service
import (
"fmt"
"mime/multipart"
awsDownload "rojgaarkaro-backend/aws/download"
awsUpload "rojgaarkaro-backend/aws/upload"
errorWithDetails "rojgaarkaro-backend/baseThing"
userModel "rojgaarkaro-backend/user/model"
userRepo "rojgaarkaro-backend/user/repository"
"gorm.io/gorm"
)
type Service st... |
/* -*-c++-*- */
/*
* osgEarth is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope ... |
<?php
declare(strict_types=1);
namespace App\Model\Table;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
/**
* Reply Model
*
* @property \App\Model\Table\TicketsTable&\Cake\ORM\Association\BelongsTo $Tickets
* @property \App\Model\Table\StaffsTable&\Cake\ORM\Ass... |
//
// HTTPClient.swift
// MoviesApp
//
// Created by Vedran Novak on 13.08.2023..
//
import Foundation
enum NetworkError: Error {
case badURL
case noData
case decodingError
}
class HTTPClient {
func getMoviesBy(search: String, completion: @escaping (Result<[Movie]?, NetworkError>) -> Void) {
... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { render } from '@testing-library/react';
import { renderHo... |
import React, { createContext, useContext } from "react";
import { Blog } from "types/src/Blog";
import { Post } from "types/src/Post";
import { Media } from "types/src/Media";
import { fetchBlog, editBlog as editBlogService, FETCH_BLOG_DENY } from "../services/blogs";
import { fetchMedia, deleteMedia as deleteMedia... |
import React, { useState } from "react";
import Photo1 from "../assets/Photo1.webp";
import Photo2 from "../assets/Photo2.jpeg";
import Photo3 from "../assets/Photo3.jpeg";
import Photo4 from "../assets/Photo4.webp";
import { motion, AnimatePresence } from "framer-motion";
const arrOfPhotos = [Photo1, Photo2, Photo3, ... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* Checks if two Rectangles intersect.
*
* A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangl... |
-- Aula (11/09/2021)
CREATE DATABASE "ADS_NOTURNO" -- Identificador do BD
TEMPLATE = template0 -- Aplicação de herança de modelo pré-existente
ENCODING 'UTF-8' -- Codificação suportada pelo BD (acentuações/moeda)
CONNECTION LIMIT 100; -- Número de conexões simultâneas suportadas
-- Cr... |
<template>
<div>
<div class="box">
<div class="header">
<span class="login is-active">登录</span>
<span class="register">注册</span>
</div>
<el-form
:model="ruleForm"
status-icon
:rules="rules"
ref="ruleForm"
label-width="100px"
class="... |
import { useState,useContext } from "react";
import {
createUserWithEmailAndPasswordCustom,
createUserDocumentFromAuth}
from '../../utils/firebase/firebase.utils'
import FormInput from "../form-input/form-input.component";
import './sign-up-form.styles.scss'
import Button from "../button/button.component";... |
//
// APIMovie.swift
// CoreDataFavoriteMovies
//
// Created by Parker Rushton on 11/5/22.
//
import Foundation
struct APIMovie: Codable, Identifiable, Hashable {
let title: String
let year: String
let imdbID: String
let posterURL: URL?
var id: String { imdbID }
enum CodingKeys: Strin... |
import {
useContext,
useEffect,
useLayoutEffect,
useRef,
useState,
} from "react";
import Frame from "../Frame";
import { DragContext } from "../SplitPane";
/**
* A wrapper around an iframe that loads any changes to the src in the background,
* keeping around the current content in the meantime. It does this by... |
import 'dart:convert';
import 'package:erp_management/model/fees_model.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:path_provider/path_provider.dart';
import 'package:path/path.dart' as path;
import 'package:erp_management/extra/constants.dart' as constants;
import 'package:http/http.da... |
import React, { useState, useEffect } from "react";
import ConnectionsSearchbar from "../components/ConnectionsSearchbar";
import ConnectionCard from '../components/ConnectionCard';
import ConnectionSendModalContent from '../components/ConnectionSendModalContent';
import { makeRequest } from "../helpers";
import './Con... |
<template>
<q-dialog v-model="dialog" persistent>
<q-card style="width: 700px; max-width: 80vw">
<q-toolbar>
<q-toolbar-title class="text-h6 text-weight-medium">
Presupuestos
</q-toolbar-title>
<q-btn flat round dense icon="close" @click="$emit('closeModal')" />
</q-t... |
#include "stdafx.h"
#include "Rect.h"
#define LT 0
#define RT 1
#define RB 2
#define LB 3
Rect::Rect(const float& left, const float& top, const float& right, const float& bottom) : Shape(4)
{
m_vertices[LT] = { left, top };
m_vertices[RT] = { right, top };
m_vertices[RB] = { right, bottom };
m_vertices[LB] = { l... |
/**
* Definitions for all event types fired by the Model.
*
* Import this class into your project/plugin for strong-typed api references.
**/
package com.jeroenwijering.events {
import flash.events.Event;
public class ModelEvent extends Event {
/** Definitions for all event types. **/
public static var BUFFE... |
# Name: ADCM
#
# Label: Concomitant Medications Analysis Dataset
#
# Input: cm, adsl
library(admiral)
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)
# Load source datasets ----
# Use e.g. haven::read_sas to read in .sas7bdat, or other suitable funct... |
use clap::{Command, Arg, ArgAction};
use regex::{Regex, RegexBuilder};
use std::error::Error;
use std::fs::{self, File};
use std::io::{BufRead, BufReader};
use walkdir::WalkDir;
type MyResult<T> = Result<T, Box<dyn Error>>;
#[derive(Debug)]
pub struct Config {
pattern: Regex,
files: Vec<MyResult<String>>,
... |
/* Copyright (C) 2006-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Volker Friese, Denis Bertini [committer] */
/** @file CbmTofPoint.cxx
** @author Volker Friese <v.friese@gsi.de>
** @author Christian Simon <c.simon@physi.uni-heidelberg.de>
** @... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_copy_strv.c :+: :+: :+: ... |
package io.github.kangjinghang.chapter1_3.exercise;
import io.github.kangjinghang.chapter1_3.Node;
/**
* 编写一个方法 delete(),接受一个 int 参数 k,删除链表的第 k 个元素(如果它存在的话)。
*/
public class Ex20<T> {
Node<T> first;
public Ex20(Node<T> first) {
this.first = first;
}
public void delete(int k) {
// ... |
import "./navbar.css"
import { Link } from "react-router-dom";
import { useContext } from "react";
import DataContext from "../store/dataContext";
import ReactDOM from 'react-dom'
function Navbar(){
const cart = useContext(DataContext).cart
return (
<nav className="navbar navbar-expand-lg bg-body-tertia... |
package com.example.navigationinjetpackcompose
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import android... |
const express = require('express');
const cors = require('cors');
const connection = require('./connection');
const session = require('express-session');
const app = express();
app.use(cors());
app.use(express.json());
app.use(
session({
secret: "some secret",
// cookie: { maxAge: 30000 },
saveUninitial... |
#include "header.h"
/* quicksort: sort v[left]...v[right] into increasing order */
void quicksort(int v[], int left, int right)
{
int i, last;
extern void swap(int v[], int i, int j);
if (left >= right) /* do nothing if array contains fewer than two elements */
return;
swap(v, ... |
import { useNavigate } from "react-router-dom";
import SideBar from "../components/sideBar/sideBar";
import Navbar from "../components/navbar";
import { userContext } from "../context/userContext";
import { useContext, useState } from "react";
import AddNew from "../components/add-new";
export function Assignments() {... |
//
// LLJAboutSwiftController.swift
// Dandelion-swift
//
// Created by 刘帅 on 2021/5/21.
//
import UIKit
//MARK: - extension -
extension LLJAboutSwiftController {
/*
* 1. extension 不是创建属性,属性只能在class里创建。可以使用计算属性来关联属性(类似oc动态添加属性)
*/
}
class LLJAboutSwiftController: LLJFViewController {
//MAR... |
/*
* Copyright (c) 2022 Razeware LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publis... |
import searchIcon from "../../assets/icons/search.svg";
import { CustomerRow } from "../CustomerRow";
import { Pagination } from "../Pagination";
import "./CustomersList.scss";
const customersList = [
{
name: "Jane Cooper",
company: "Microsoft",
phone: "(225) 555-0118",
email: "jane@microsoft.com",
... |
<!DOCTYPE html>
<html lang="ru" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
<title>Редактировать профиль</title>
<div th:insert="blocks/webjars :: webjars"></div>
<link rel="stylesheet" th:href="@{/css/profileStyle.css}">
<link rel... |
import { Form, json, useNavigation, useSearchParams, Link, useActionData } from "react-router-dom";
import classes from './AuthForm.module.css'
const AuthForm = () => {
const navigation = useNavigation();
const data = useActionData();
const [serchParams] = useSearchParams();
const isLogin = serchParams... |
# Start time: 2024-04-10 14:59:27.347537
'''
Prompt:
The prompt describes the relationship between the inputs and outputs. Given that the prompt is: Summary for Input Column Data:
- The input column data consists of URLs in the format of protocol=//domain/path.
- Each URL in the input column data follows a similar str... |
using Abp.Dependency;
using Castle.MicroKernel.Registration;
using Castle.Windsor.MsDependencyInjection;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using FintrakERPIMSDemo.EntityFrameworkCore;
using FintrakERPIMSDemo.Identity;
namespace FintrakERP... |
import React, { Fragment } from 'react';
import '../../../components/styles/Demo.css';
import Tabs from '../../../tabs/Tabs.js';
import {Link} from 'react-router-dom';
import Fade from 'react-reveal/Fade';
import Quiz from '../../../components/quiz/Quiz.js';
import fire from '../../../config/Fire';
import Login from '... |
import { Button, Divider, TextField, Typography } from "@mui/material";
import { Box } from "@mui/system";
import React, { useEffect } from "react";
import { useNavigate } from "react-router-dom";
import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";
import { useCart } from "../../Context/CartContextProv... |
'''
@Author Jared Scott ☯
This script will open a socket connection at the specified port number hosted from localhost (127.0.0.1)
This socket when conntacted will generate a random data value and return this data over the socket.
'''
import socket
import random
def main():
port = 10150 #Port where the ... |
<div class="col-md-12" id="new_car_form">
<%@user ||=current_user %>
<%= simple_form_for(@car, class:"form-horizontal") do |f| %>
<div class="col-sm-5 col-md-4">
<div class="text-center">
<section>
<%= car_image(@car,:normal, class:"img-rounded img-responsitive") %>
</section>
<h3><%=t(".upload_... |
import { Schema, Prop, SchemaFactory } from '@nestjs/mongoose';
import { SchemaTypes, Types } from 'mongoose';
import { AgeGroup } from 'src/common/staticSchema/ageGroup.schema';
import { Gender } from 'src/common/staticSchema/gender.schema';
import { v4 as uuidv4 } from 'uuid';
import { ExitSurveyForm } from './exitSu... |
import { useEffect, useState } from 'react'
import { useFormik, FormikHelpers } from 'formik';
import useCheckWeb3 from '../../hooks/useWeb3.hook';
import { EChainIds } from '../../interfaces/useCheckWeb3.interface';
import { HomePage } from './home.page';
import { getContractValidSchema } from '../../validations/getCo... |
// @ts-nocheck
"use client";
import { useSession } from "next-auth/react";
import { useEffect, useState } from "react";
import { useRouter } from "next/navigation";
import ProfilePage from "components/profilepage/ProfilePage";
/**
* This function fetches the user details from the database and displays them.
*
* @c... |
import { Navbar, TextInput, Button } from 'flowbite-react';
import { Link, useLocation } from 'react-router-dom';
import { AiOutlineSearch } from 'react-icons/ai';
import { FaMoon } from 'react-icons/fa';
export default function Header() {
const path = useLocation().pathname;
return (
<Navbar className='border... |
import React from "react";
import "./content-wrapper.css";
interface ContentWrapperProps {
contentSpacing?: "p0" | "p1" | "p2" | "p3" | "p4";
horizontalOnly?: boolean;
children: React.ReactNode;
}
const spacingPropToClassName = ({
contentSpacing,
horizontalOnly,
}: Pick<ContentWrapperProps, "contentSpacing"... |
//
// MapsViewController.swift
// Map App
//
// Created by Mutlu Çalkan on 20.06.2022.
//
import UIKit
import MapKit
import CoreLocation
import CoreData
class MapsViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate {
@IBOutlet weak var placeNameTF: UITextField!
@IBOutlet weak var... |
import { Application } from 'express';
import express from 'express';
import simpleGit from 'simple-git';
import { promises as fs } from 'fs';
import path from 'path';
import { v4 as uuid } from 'uuid';
const app: Application = express();
app.post('/diff', async (req, res) => {
const { old: oldContent, new: newCont... |
<script lang="ts" setup>
import { defineComponent, onMounted, reactive } from 'vue'
import DynamicIcon from '@/components/DynamicIcon.vue'
import gBack from '@/components/gBack/gBack.vue'
import gMusicGalleryList from '@/components/gMusicGallery/gMusicGalleryList.vue'
import gMusicSongListNotFound from '@/components/g... |
//
// CategoryTableViewController.swift
// Restaurant
//
// Created by Ahmad Nader on 8/08/23.
import UIKit
import UserNotifications
class CategoryTableViewController: UITableViewController {
var categories = [String]()
override func viewDidLoad() {
super.viewDidLoad()
MenuContr... |
import { spawn } from "node:child_process";
import path from "node:path";
import os from "node:os";
import fs from "node:fs";
import net from "node:net";
import _ from "lodash";
import { Reader } from "gocsv";
import {
randEmail,
randFullName,
randHexaDecimal,
randPastDate,
randText,
} from "@ngneat/falso";
... |
# Exercício 1
a)
* VARCHAR: serve para qualquer caracteres de até 255;
* PRIMARY KEY como id única;
* NOT NULL para mostar que é um parametro necessário;
* DATE para data.
b)
* SHOW DATABASES: mostra as informações do meu banco de dados;
* SHOW TABLES: mostra minhas tables criadas.
c) mostra os detalhes da table.
... |
import React from 'react';
import {
View,
Text,
Alert,
TextInput,
StyleSheet,
Image,
ImageBackground,
} from 'react-native';
const moment = require("moment");
import { Toast } from '../util/Toast';
import { login } from '../Server/login';
import { getRule } from '../Server/getRule';
import AuthorizationSc... |
<!DOCTYPE html>
<html>
<!-- Toutes les balises d'entête -->
<head>
<!-- Encodage de la page -->
<meta charset="utf-8" lang="fr"/>
<!-- Nom de la page -->
<title>Fomulaire JS</title>
<!-- Lien vers le fichier de style CSS -->
<link type="text/css" rel="stylesheet" href="JS_Form_tp_DS.css"/>
<!-- Image onglet -... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title></title>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"></script>
<script type="appl... |
import { Injectable, Logger } from '@nestjs/common';
import Axios, { AxiosRequestConfig, AxiosInstance } from 'axios';
@Injectable()
export default class HttpClient {
readonly #logger: Logger = new Logger(HttpClient.name);
readonly #axios: AxiosInstance = null;
constructor() {
this.#axios = Axios.create();
... |
# Compressed Big Brother FileSystem (CBBFS)
The Compressed Big Brother FileSystem (CBBFS) is a userspace filesystem implemented using the FUSE (Filesystem in UserSpace) framework and aims to provide 2 distinct functionalities:
1. Logging any filesystem operation that happens in the cbbfs to a log file
2. Compressing ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BSONRegExp = void 0;
var error_1 = require("./error");
function alphabetize(str) {
return str.split('').sort().join('');
}
/**
* A class representation of the BSON RegExp type.
* @public
*/
var BSONRegExp = /** @class */ (functi... |
import { isEmpty } from 'lodash';
import Link from 'next/link';
import { useState } from 'react';
const Nav = ({ header, headerMenus }) => {
if (isEmpty(headerMenus)) {
return null;
}
const [isMenuVisible, setMenuVisibility] = useState(false);
return (
<nav className="flex items-cente... |
# Display art
# Generate random account
# format account data
# ask user to guess
# check if user is correct
## get follower
## use if statement to check if user is correct
# give user feedback on their guess
# make game repeatable
# swap b to a and generate new random b
from art import logo, vs
import game_data impo... |
/**
* Basic tool library
* Copyright (C) 2014 kunyang kunyang.yk@gmail.com
*
* @file ky_flags.h
* @brief 装配枚举类型为旗语标志
*
* @author kunyang
* @email kunyang.yk@gmail.com
* @version 1.0.1.1
* @date 2018/08/01
* @license GNU General Public License (GPL)
*
* Change History :
* Date | Ve... |
import { useState } from 'react'
import { BsHash } from 'react-icons/bs'
import { FaChevronDown, FaChevronRight, FaPlus } from 'react-icons/fa'
const topics = ["tailwind-css", "react-js"]
const questions = ["jit-compilation", "purging files", "dark/light mode"]
const random = ["npm packages", "plugins", "memes"]
con... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>Portfolio</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN... |
from __future__ import annotations
# coding: utf-8
# graph.py
from abc import ABC, abstractmethod
from typing import TypeVar, NewType, Tuple, Iterator, Union
from UnionFind import *
#################### Type ####################
Edge = Tuple[Node, Node]
Weight = Union[int, float]
WeightedEdge = Tuple[Node, Node, ... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAddressesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('addresses', f... |
import {
Button,
Checkbox,
FormControl,
FormLabel,
Input,
InputGroup,
InputLeftAddon,
InputRightElement,
Textarea,
useToast
} from "@chakra-ui/react";
import React, { useContext, useEffect, useState } from "react";
import { FiCheck, FiChevronLeft, FiChevronRight, FiX } from "reac... |
<?php
namespace App\Controllers\admin;
use App\Controllers\BaseController;
use App\Models\BooksModel;
use App\Models\OtherModel;
use App\Models\BorrowBooksModel;
use App\Models\SettingsModel;
use App\Controllers\Mail;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\Validation\ValidationInterface;
class Activi... |
import { createSlice, createAsyncThunk } from "@reduxjs/toolkit";
import axios from "axios";
import { url } from "./api";
import { jwtDecode } from "jwt-decode";
const initialState = {
token: localStorage.getItem("token"),
name: "",
email: "",
_id: "",
registerStatus: "",
registerError: "",
... |
"use client";;
import { listInfo } from "../AddressList/state";
import { TabsContent } from "@/components/ui/tabs";
import { Card } from "@/components/ui/card";
import NetCurveChart from "@/components/net-curve-chart";
import { UTCTimestamp } from "lightweight-charts";
import { useSelector } from "@legendapp/state/reac... |
# Valid Anagram
#
# Given two strings s and t, return true if t is an anagram of s, and false otherwise.
# An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
#
# Example 1:
# Input: s = "anagram", t = "nagaram"
# Outpu... |
<?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>
<div>
<div class="blog-card mt-4">
<img :src="image" alt="" class="img-responsive" />
<div class="card-body">
<p class="header m-0">
{{ post.title }}
</p>
<span> Posted on {{ callDate(post.created_at, "fullDate") }}</span>
<p class="card-text">
... |
import { Dispatch, SetStateAction } from "react"
import { Border, Cursor, GradientType, paddingSizeButton, sizeVariant, typeOfButton, variant } from "../constants/constant"
export interface CardsProps {
className?: string,
nameCard: string,
buttons?: ButtonProps[],
inputBox?: JSX.Element,
typograph?... |
import { ReactNode } from "react"
import { IconContext } from "react-icons/lib"
import { useTheme } from "styled-components"
import { StyledButton, StyledOutlineButton, RightSpace } from "./style"
interface TextIconButtonProps {
icon: ReactNode
iconSize?: string
iconColor?: 'primary' | string
text: str... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
void printMenu(); //void function (with no parameters) prototype
bool checkChoice(char iChoice); //non-void function with a parameter and formal argument iChoice
int readInteger(); //non-void function with no parameters
double tackyAdd(int iNum1, int iNum2);
... |
scalar Date
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
type Product {
id: ID!
name: String!
shortDescription: String
}
type Variant {
id: ID!
name: String!
shortDescription: String
}
type Question {
id: ID!
textA: String!
textB: String!
textC: String!
}
type Que... |
package lv.lu.df.combopt.domain;
import ai.timefold.solver.core.api.domain.entity.PlanningEntity;
import ai.timefold.solver.core.api.domain.variable.PlanningListVariable;
import ai.timefold.solver.core.api.domain.variable.PlanningVariable;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.... |
# Best Practices in ETL
Het implementeren van best practices in ETL-processen is essentieel voor efficiëntie, schaalbaarheid en gegevenskwaliteit. Hier zijn enkele belangrijke richtlijnen:
## Efficiëntiepraktijken: Verbetering van de efficiëntie van ETL
- **Optimaliseer gegevensverwerking:** Minimaliseer resource-in... |
(function (window) {
var createModule = function (angular) {
var module = angular.module('FBAngular', []);
module.factory('Fullscreen', ['$document', function ($document) {
var document = $document[0];
var serviceInstance = {
all: function () {
... |
import WeekDayButtons from "../WeekDayButtons/WeekDayButtons"
import { Form, ButtonsContainer, Footer, CloseButton, SaveButton } from "./styled"
import StyledInput from "../StyledInput"
import { useContext, useState } from "react"
import apiHabits from "../../services/apiHabits"
import { UserContext } from "../../conte... |
/*
Write a program to calculate the total salary of a person. The user has to enter the basic salary (an integer) and the grade (an uppercase character), and depending upon which the total salary is calculated as -
totalSalary = basic + hra + da + allow – pf
where :
hra = 20% of basic
da = 50% of basic
allow =... |
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_hei... |
use nom::{
number::complete::{be_u16, be_u32, be_u8},
IResult,
};
use super::PageType;
#[derive(Debug)]
pub struct PageHeader {
pub page_type: PageType,
pub first_free_block: u16,
pub cell_count: usize,
pub cell_start_index: usize,
pub fragmented_free_bytes_count: u8,
pub right_most_po... |
export class ClaimDocument {
private documentName: string;
private documentUrl: string;
private documentType: string;
constructor(obj: any) {
this.documentName = obj.documentName;
this.documentUrl = obj.documentUrl;
this.documentType = obj.documentType;
}
/**
*... |
package com.indivisible.clearmeout.service;
//
//import java.io.File;
//import java.io.FilenameFilter;
//import android.app.Service;
//import android.content.Intent;
//import android.content.SharedPreferences;
//import android.content.SharedPreferences.Editor;
//import android.os.IBinder;
//import android.preference.P... |
//binary-tree-right-side-view
import java.util.List;
import java.util.Queue;
import java.util.ArrayList;
import java.util.LinkedList;
class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode() {}
TreeNode(int val) { this.val = val; }
TreeNode(int val, TreeNode left, TreeNode... |
import {rpc} from 'sock-harness';
import loglevel from 'loglevel-decorator';
import roles from '../middleware/rpc/roles.js';
import {on} from 'emitter-binder';
import PlayerDeck from 'models/PlayerDeck';
import DeckStoreError from 'errors/DeckStoreError';
/**
* RPC handler for the matchmaker component
*/
@loglevel
e... |
/**
Сущность "Генератор случайных чисел"
*/
import Foundation
protocol GeneratorProtocol {
// хранит алгоритм, возвращаюший новое случайное значение
func getRandomValue() -> Int
}
class NumberGenerator: GeneratorProtocol {
private let startRangeValue: Int
private let endRangeValue: Int
... |
<?php
namespace backend\modules\sys\controllers;
use Yii;
use yii\data\Pagination;
use yii\web\NotFoundHttpException;
use common\enums\StatusEnum;
use common\helpers\ArrayHelper;
use common\models\sys\Config;
use common\models\sys\ConfigCate;
use common\helpers\ResultDataHelper;
use common\components\CurdTrait;
/**
... |
<div class="container-table">
<div class="title-button">
<h1>LISTADO CLIENTES</h1>
<button class="btn" onclick="location.href='registrar-cliente';">
Registrar Clientes
</button>
</div>
<div class="mb-3 row d-flex justify-content-center">
<div class="col-sm-auto search align-self-end">
... |
import { Component, OnInit } from '@angular/core';
import { GithubService } from '../services/github.service';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-projects',
templateUrl: './projects.component.html',
styleUrls: ['./projects.component.css']
})
export class ProjectsCompon... |
import {
Entity,
Column,
PrimaryGeneratedColumn,
UpdateDateColumn,
CreateDateColumn,
ManyToMany,
JoinTable,
OneToMany,
} from 'typeorm';
import { Roles } from '../roles/roles.entity';
import { Posts } from '../posts/posts.entity';
@Entity()
export class Users {
@PrimaryGeneratedColumn('uuid')
id: s... |
package org.gnori.bunkerbot.service.command.impl.text.commands.state.impl;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import org.gnori.bunkerbot.domain.BotUserState;
import org.gnori.bunkerbot.service.BunkerGame;
import org.gnori.bunkerbot.service.Messag... |
import os
import logging
import requests
import json
import subprocess
from celery import Celery
from jinja2 import Environment, FileSystemLoader
from requests.auth import HTTPBasicAuth
logging.basicConfig(level=logging.INFO)
app = Celery('worker', broker=os.environ.get('CELERY_BROKER_URL'))
app.conf.task_queues = {
... |
// Copyright 2019 The Abseil 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
package co.syalar.sfdiexample.didemo.controllers;
import co.syalar.sfdiexample.didemo.services.GreetingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
/**
* Created by jd.rodriguez... |
import {
useReactTable,
getPaginationRowModel,
getFilteredRowModel,
getCoreRowModel,
getExpandedRowModel,
ColumnDef,
SortingState,
getSortedRowModel,
PaginationState,
} from '@tanstack/react-table'
import React, { useMemo, useState, useCallback } from 'react'
import { Table } fro... |
import { graphql } from "gatsby"
import _get from "lodash/get"
import React from "react"
import PageWideWrapper from "../../components/PageWideWrapper"
import PostAuthorAbout from "../../components/PostAuthorAbout"
import PostBody from "../../components/PostBody"
import PostLayout from "../../components/PostLayout"
im... |
---
title: เพิ่มสี่เหลี่ยมผืนผ้าลงในเอกสาร XPS ด้วย Aspose.Page สำหรับ .NET
linktitle: เพิ่มสี่เหลี่ยมผืนผ้าลงในเอกสาร XPS
second_title: Aspose.Page .NET API
description: ปรับปรุงการสร้างเอกสารด้วย Aspose.Page สำหรับ .NET เรียนรู้วิธีเพิ่มสี่เหลี่ยมลงในเอกสาร XPS ในบทช่วยสอนทีละขั้นตอนนี้
type: docs
weight: 13
url: /th... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Plot init and final Temperature salinity diagrams %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% You can change number of the bins by a_bins %%
%% ex.: %%
%% >> a_bins=50.; %%
%%... |
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { AuthService } from 'src/app/services/auth.service';
import { DarkModeService } from 'src/app/services/dark-mode.service';
import { ManageLanguageService } from 'src/app/services/manage-language.service';
@Component({... |
using PagedList;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using YueBoAdmin.Models;
namespace YueBoAdmin.Controllers
{
public class PostsController : Controller
{
private Yue... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.