text
stringlengths
184
4.48M
import * as core from "@actions/core"; import * as github from "@actions/github"; import * as fs from "fs"; import { components } from "@octokit/openapi-types"; import { GitHub } from "@actions/github/lib/utils"; export type Octokit = InstanceType<typeof GitHub>; export type Review = components["schemas"]["pull-reques...
#include<Servo.h> //servo motor kütüphanesini ekle #define led 6 //6 nolu pine led ismini ver #define alarm 7 #define yagmur A0 Servo motor; int su_miktari ; //int tipinde su_miktari adında bir değişken oluştur int uyari = 0 ; //int tipinde uyari adında bir d...
from rest_framework import serializers from django.conf import settings from core._shared.serializers.list_meta_response_serializer import ListMetaResponseSerializer from core.cast_member.domain import CastMemberType class EnumField(serializers.ChoiceField): # TODO: find a better way to serialize enums def ...
import {IsNumber, IsString, IsUUID} from "class-validator"; import {ApiProperty} from "@nestjs/swagger"; export class UserDto { @ApiProperty({ type: 'uuid', description: 'User id', }) @IsUUID() public id: string; @ApiProperty({ type: 'string', description: 'User te...
// // ContentView.swift // WordScramble // // Created by Kamil Krzych on 16/06/2021. // import SwiftUI struct ContentView: View { @State private var usedWords = [String]() @State private var rootWord = "" @State private var newWord = "" @State private var errorTitle = "" @State private var erro...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_printf.h :+: :+: :+: ...
//-------------------------------------------------------------------------------------- // File: Shadersasd.fx // // Copyright (c) Microsoft Corporation. // Licensed under the MIT License (MIT). //-------------------------------------------------------------------------------------- #define NUM_LIGHTS (1) #define NEA...
<script lang="ts"> import { computed, defineComponent, ref } from 'vue'; import { useManifest } from '~/composables'; import { ConfigurationTableColumn } from '~/types'; export default defineComponent({ props: { component: { type: String, required: true } }, setup(pr...
package it.polimi.db2.project.entities; import java.io.Serializable; import java.util.List; import javax.persistence.*; @Entity @Table(name = "user", schema = "db2") @NamedQueries({ @NamedQuery(name = "User.findAllInsolvent", query = "SELECT u FROM User u WHERE u.insolvent=true"), @NamedQuery(name = "User.checkCred...
package org.academiadecodigo.felinux.gtfo.characters.enemies; import org.academiadecodigo.felinux.gtfo.field.Field; import org.academiadecodigo.simplegraphics.graphics.Color; import org.academiadecodigo.simplegraphics.graphics.Rectangle; import org.academiadecodigo.simplegraphics.graphics.Text; import org.academiadec...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <canvas width="570" height="570" id="my_Canvas"></canvas> </body> <script> var canvas = document.getElementById("my_Canvas"); var gl = canvas.getContext("webgl"); var vertexSource = "attribute vec4 aVertexPosition;attr...
<template> <q-page class="bg-brown-1"> <div class="q-pa-md"> <q-card class="q-pa-md"> <q-breadcrumbs separator="---" class="text-brown" active-color="black"> <q-breadcrumbs-el label="Main Menu" icon="widgets" /> <q-breadcrumbs-el label="Penjualan" icon="storefront" /> </q...
// // PetitionDetailContract.swift // AI-Image-Demo // // Created by Aitor Zubizarreta on 2023-03-20. // import UIKit import Combine // MARK: - View /// View Output (Presenter -> View) protocol PresenterToViewPetitionDetailProtocol { var presenter: ViewToPresenterPetitionDetailProtocol? { get set } ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
<?php /** * Plugin recommandations. * * @package Positor * @subpackage TGM-Plugin-Activation * @author Thomas Griffin, Gary Jones, Juliette Reinders Folmer * @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later * @link https://github.com/TGMPA/TGM-Plugin-Activation * @see h...
<template lang="pug"> main.container(role="main" v-if="dataLoaded") div#contact.container.contact-form h1(id='content') Contact Me if error p #{ error } span(v-html="formHTML") </template> <script lang="ts"> import Vue from 'vue'; import Component from 'vue-class-component'; imp...
import { createSlice } from "@reduxjs/toolkit"; interface IFilters { sort: string; numberGames: number; } const filterSlice = createSlice({ name: "filters", initialState: { sort: "Saldo de gols (melhor)", numberGames: 5, }, reducers: { setSort: (state: IFilters, action) => { state.sort =...
//`timescale 1ns/10ps module sram #(parameter ADDR_WIDTH = 32 , parameter DATA_WIDTH = 16 , parameter MEM_INIT_FILE = "" ) ( //--------------------------------------------------------------- // i...
<?php namespace App\Exports; use App\Http\Resources\LaboursResource; use App\Models\Company\Labour; use App\Models\Company\Unit; use App\Models\User; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithMapping; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\S...
# Be pessimistic or optimistic **Pessimistic lock**: the idea is that before I want to touch this system resource (not have to be database records), it could be a file or network port, ***I want to assume that everyone else who uses this resource will affect my work***. so I want to lock them to prevent others from ma...
import type { Validator, BasicType } from '../../_utils'; import type { PropType, ExtractPropTypes } from 'vue'; import type { VmSize, VmIcon, HandleChange } from '../../_interface'; export declare const Props: { /** 绑定值 */ readonly modelValue: { readonly required: true; readonly type: BooleanCo...
import { useEffect, useCallback } from 'react'; import { signIn as signInApi, signUp as signUpApi } from 'api'; import AsyncStorage from '@react-native-community/async-storage'; import { User, SignInPayload, SignUpPayload } from 'types'; import { useAuthDispatch, useAuthState } from './useAuthContext'; const storageUs...
<!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>Forms</title> </head> <body> <h2>This is html forms tutorial</h2> <form action="backend.php"> ...
import React, { useState, useEffect } from 'react' import { Button, Table, Space, Tag, Modal, Form, Input, message } from 'antd' import './admin.less' import { reqGetAllLabels, reqGetIssues, reqGetRepoInfo, reqUpdateIssue } from '../../api' import config from '../../config/config' const { ColumnGroup, Column } ...
import { Text, View, StyleSheet, TouchableOpacity } from "react-native"; import { ChartData } from "react-native-chart-kit/dist/HelperTypes"; import DigiLineChart from "@Components/Charts/LineChart"; import { formatTimeAgo } from "@DigiUtils/helperFunctions"; import OutfitBox from "@Components/Box/OutfitBox"; import { ...
// import { useState } from "react"; import { useContext } from "react"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import styles from "./Home.module.scss"; import QuizContext from "@/context/quizContext"; const Home = () => { const levels = ["easy", "medium", "ha...
!-----------------------------------------------------------------------------! ! CP2K: A general program to perform molecular dynamics simulations ! ! Copyright (C) 2000 - 2011 CP2K developers group ! !-----------------------------------------------------------------------------! ...
const express = require('express'); const bodyParser = require('body-parser'); const app = express(); const mongoose = require('mongoose'); const User = require('../client/src/components/models/User'); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); mongoose.connect('mongodb+srv://hema...
<template> <div class="file-view"> <component :is="component" :content="content" :path="path" ref="fileRef" /> </div> </template> <script setup lang="ts"> import { ref, watch, computed, markRaw, onMounted } from 'vue' import type { Component } from 'vue' import { invoke } from '@tauri-apps/api/tauri' i...
#!/usr/bin/env python3 """ filtered_logger module """ import re from typing import List import logging import mysql.connector from os import environ PII_FIELDS = ("name", "email", "phone", "ssn", "password") class RedactingFormatter(logging.Formatter): """ Redacting Formatter class """ REDACTION =...
// Foolowing on from the example // DrawSingleShape_CodeExample in week 1 of this unit. // This example can draw multiple shapes // Each shape is now contained in a DrawnShape object // It uses a "DrawingList" to contain all the DrawnShape instances // as the user creates them float[][] edge_matrix = { { 0, -2, 0 }...
import React, { useEffect } from 'react'; import { CssBaseline, Hidden, Drawer, Container } from '@material-ui/core'; import { useTheme } from '@material-ui/core/styles'; import { useState } from 'react'; import { useStyles } from './static/style'; import SideDrawer from './components/SideDrawer'; import MobileHeader f...
using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace AwfulGarbageMod.Items.Armor { // The AutoloadEquip attribute automatically attaches an equip texture to this item. // Providing the EquipType.Body value here will result in TML expecting X_Arms.png, X_Body.png and X_FemaleBody.png sprite-s...
import { faSearch } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, Input, Table } from 'antd'; import { useEffect, useState } from 'react'; import TransactionDetail from './TransactionDetail'; import { useGetListTransaction } from '../../../...
import emailService from "../services/EmailService/email.service"; import prisma from "../prisma"; export async function createOrGetUser({ email, facebookId, googleId, }: { email: string; facebookId?: string; googleId?: string; }) { const olderUser = await prisma.user.findUnique({ where: { email } }); ...
import { useState, useEffect } from "react"; import { FaSearch } from "react-icons/fa"; import { Link } from "react-router-dom"; import { couponApi } from "../../../../service/coupon.service"; import { toast } from "react-toastify"; const Coupons = () => { const [coupons, setCoupons] = useState([]); const [searchK...
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runtime // inf2one returns a signed 1 if f is an infinity and a signed 0 otherwise. // The sign of the result is the sign of f. func inf2one(f float64)...
--- title: "Cuadro de diálogo de configuración de tema (heredado) | Documentos de Microsoft" ms.custom: ms.date: 11/04/2016 ms.reviewer: ms.suite: ms.tgt_pltfrm: ms.topic: reference f1_keywords: System.Workflow.ComponentModel.Design.ThemeConfigurationDialog.UI helpviewer_keywords: - themes, configuring - Theme Conf...
$(document).ready(function() { // Tax calculation function function calculateTax(income, age) { const exemptedIncome = 800000; let taxableIncome = income - exemptedIncome; let tax = 0; if (taxableIncome <= 0) { return 0; } if (age < 40) { ...
import { z } from 'zod'; export const UserProfileSchema = z.object({ firstName: z.string().min(3, 'First Name is required').max(50, 'First Name must be between 2 and 50 characters'), lastName: z.string().min(3, 'Last Name is required').max(50, 'Last Name must be between 2 and 50 characters'), username: z.string(...
import UIKit import UnsplashPhotoPicker class MainCoordinator: AbstractCoordinator { // MARK: - Properties var navigationController: UINavigationController var coordinators: [AbstractCoordinator] = [] private let constants: Constants = Constants.shared // MARK: - Init ...
import { expect, test } from "vitest"; import { generateTypeOverrideFromDocumentation } from "./generateTypeOverrideFromDocumentation"; test("finds a type override", () => { const docString = "this is some property \n here is the type override @kyselyType('admin' | 'member') "; expect(generateTypeOverrideFro...
using System; using System.Globalization; using Jint.Native.Function; using Jint.Native.Object; using Jint.Runtime; using Jint.Runtime.Interop; namespace Jint.Native.Date { public sealed class DateConstructor : FunctionInstance, IConstructor { internal static readonly DateTime Epoch = new DateTime(197...
package main import ( "bytes" "fmt" "io" "net" "net/http" "testing" "time" "github.com/awoodbeck/gnp/ch09/handlers" ) func TestSimpleHTTPServer(t *testing.T) { // http 서버 객체 생성 srv := &http.Server{ // 서버 주소 및 포트 Addr: "127.0.0.1:8081", // 입출력 핸들러 함수 및 대기 제한시간 2분이 지나면 // 3번째 인수로 넣은 에러 메세지를 바디로 하여 50...
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; import { CourseType } from 'src/interfaces/course.interface'; import { applyInstructor } from './instructor.action'; import { InstructorIntialStateType } from './instructor.interface'; const initialState: InstructorIntialStateType = { isLoading: false, e...
import React from 'react' interface props { Icon: any; title: string; selected?: boolean; } export default function HeaderOption({ Icon, title, selected }: props) { return ( <div className={`flex items-center space-x-1 border-b-4 border-transparent hover:te...
from asyncore import write import email from .models import User from rest_framework import serializers class UserSerializer(serializers.Serializer): id = serializers.IntegerField(read_only=True) username = serializers.CharField() email = serializers.CharField() birthdate = serializers....
function data = elbeat(data) % Identify beats from EKG data and calculate running average of BPM % % The input "data" is a structure generated by running an Edulogger experiment, % consisting of the following fields: % Time: The time (s) since the start of the experiment of each sample. % (double) % Concern: Whether or...
""" Week 7: Make grids of IGRF """ import datetime import numpy as np import xarray as xr import verde as vd import pygmt import igrf def igrf_grid(region, spacing, height, date): """ Make a grid of Bx, By, Bz at a uniform height. """ longitude, latitude = vd.grid_coordinates(region, spacing=spacing, ...
/* * Copyright 2020 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 applica...
<?php // // Description // This method will update a message in the database. // // Arguments // --------- // api_key: // auth_token: // tnid: The ID of the tenant the message is attached to. // // Returns // ------- // <rsp stat='ok' /> // function ciniki_fatt_messageUpdate(&$ciniki) { // // Find all ...
import 'package:flutter/material.dart'; import 'package:task_hyd/models/task_model.dart'; import 'package:task_hyd/repos/task_repos.dart'; import 'package:velocity_x/velocity_x.dart'; class HomeBody extends StatelessWidget { // final TaskModel? taskModel; const HomeBody({ super.key, // required this.taskMo...
import Image from "next/image"; import { FaStar, FaCodeBranch, FaEye } from "react-icons/fa"; const fetchRepo = async (name) => { const response = await fetch( `https://api.github.com/repos/dazzlerabhi30800/${name}`, { next: { revalidate: 60 }, } ); const repo = await response.json(); return ...
package biz.belcorp.salesforce.modules.developmentpath.core.data.repository.salesconsultant.dto.co import biz.belcorp.salesforce.core.constants.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import biz.belcorp.salesforce.core.utils.JsonUtil.JsonEncodedDefault @Serializable class T...
// // EpisodeDetailViewModel.swift // RickAndMortyAPI // // Created by Tuğrul Özpehlivan on 24.02.2023. // import Foundation protocol EpisodeDetailViewModelInterface { var view: EpisodeDetailViewInterface? { get set } func viewDidLoad() func getCharacters() } final class EpisodeDetailViewModel { ...
import styled from "styled-components"; import { darken } from "polished"; import Link from "next/link"; import Image from "next/image"; import { Flex, FlexBetween, FlexCenter, FlexColumn, FlexStart, } from "../styles"; import { Text } from "../text"; import { PrimaryButton } from "../button"; import { InfoIc...
package com.javalex.ex; import java.io.IOException; import java.io.PrintWriter; import java.util.Arrays; import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServl...
--- import alien from "/images/symbols/alien.svg"; import "../styles/global.css"; --- <!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="icon" href="/icons/Icon.jpg" type="image/svg+xml" /> <title>Fin du...
# Write-Ahead Log Write-ahead log written in TypeScript ## Installation ```shell npm install write-ahead-log ``` ## Performance | Operation | # of Operations | Duration (in seconds) | Throughput (ops/ms) | | --------- | --------------- | --------------------- | ------------------- | | Write | 1 000 000 |...
package com.mprog.hangman; import android.content.Context; import android.graphics.*; import android.graphics.drawable.BitmapDrawable; import android.util.Log; import android.view.Display; import android.view.View; import android.view.WindowManager; import java.lang.reflect.Array; /** * This class draws the gamescr...
# VirtualBoxへのUbuntu Serverのインストール [Install Ubuntu Server (Ubuntu公式サイト)](https://ubuntu.com/tutorials/install-ubuntu-server) [VirtualBox](https://www.virtualbox.org)の仮想マシンにUbuntu Serverをインストールする手順を説明します。 ## Ubuntu Serverのインストールメディアの準備 [ここ](https://ubuntu.com/download/server)からUbuntu Serverのインストールディスクイメージファイルをダウンロード...
This code implements the SHA256 hashing algorithm specified in FIPS180-4. It also implements a NIST approved Hash_DRBG Random Number Generator based on SHA256, which includes the Continuous Random Number Generator Test specified in FIP140-2. It also implements a Random Number Generator for generating 256-bit OTPMK val...
/* Copyright (c) 2024 Red Hat, 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, software...
import React from "react"; import { Box, Badge, Button } from "@chakra-ui/react"; import Image from "next/image"; import Link from "next/link"; import { Center, useColorModeValue, Heading, Text, Stack, } from "@chakra-ui/react"; function Product({ _id, image, name, price, category }) { return ( <Center...
import React,{Component} from 'react'; import { StyleSheet, Text, View,Dimensions } from 'react-native'; import MapView from 'react-native-maps'; const{width,height}=Dimensions.get('window') export default class App extends Component { constructor(){ super() this.state={ region:{ latitude:nul...
import { Request, Response } from "express"; import { handleErrorResponse, handleHttpError } from "../utils/error.handle"; import { PermissionService } from "../services/permissions.service"; export class PermissionController { static async findAll(req: Request, res: Response) { try { const data = await Pe...
import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../providers/cart.dart'; class CartItem extends StatelessWidget { final String id; final String productId; final double price; final int qunatity; final String title; CartItem( this.id, this.productId, th...
export enum ActionTypes { SET_FILES, SET_IS_LOADING } export interface SetFiles { type: typeof ActionTypes.SET_FILES; payload: File[]; } export interface SetIsLoading { type: typeof ActionTypes.SET_IS_LOADING; payload: boolean; } export interface State { files: File[]; isLoading: bool...
"""Sensor implementaion routines""" import logging from typing import Callable import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant.components import sensor from homeassistant.config_entries import ConfigEntry from homeassistant.const import UnitOfEnergy, UnitOfVolume from h...
/* * Copyright (C) 2021 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...
using UnityEngine; /// <summary> /// Represents different states of the game. /// </summary> public enum GameStatus { Stick, // Rocketball is attached to the stick. Fly, // Rocketball is flying through the air. Death, // The game is over due to some reason. Reset // Resetting the game to its ...
<!DOCTYPE html> <html> <head> <title>Azure ChatGPT3.5</title> <style> .message { margin-bottom: 10px; white-space: pre-wrap; } .chat-interface { display: flex; flex-direction: column; justify-content: center; align...
import Card from './Card' import { DateTime } from 'luxon' import Sort from './Sort' import { useState } from 'react' import { useSelector } from 'react-redux' import { posts } from '../posts' interface RootState { searchedPosts: any searchMode: Boolean } const Main = () => { const selectSearchedPosts = (state:...
<?php namespace App\Http\Controllers\Admin; use App\Models\Product; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Category; use Illuminate\Validation\ValidationException; class ProductController extends Controller { // public function product() // { // return view('ad...
local status_ok, lspconfig = pcall(require, "lspconfig") if not status_ok then return end -- Change diagnostic sign local signs = { { name = "DiagnosticSignError", text = "󰅚" }, { name = "DiagnosticSignWarn", text = "󰀪" }, { name = "DiagnosticSignHint", text = "󰌶" }, { name = "DiagnosticSignInfo", text = "󰋽" ...
# BuddyPress xProfile fields administration Highlight the best of your community members by creating an unlimited number of Extended Profile (xProfile) Fields and/or groups of Extended Profile Fields custom-made for your community site. To start creating xProfile fields, go to administration menu Users > Profile Fiel...
/* * Example of 'Flyweight' design pattern. * Copyright (C) 2016 Leo Wang * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * $Id$ * * Copyright (c) 2019-2024, CIAD Laboratory, Universite de Technologie de Belfort Montbeliard * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the ...
import { createAsyncThunk } from "@reduxjs/toolkit"; import URL from "../../api/URL"; import API_KEY from "../../api/api_key"; import { addSearchQuery } from "../Slices/videoSlice"; export const searchVideosAsync = createAsyncThunk( "videos/searchVideos", async function (searchQuery, { rejectedWithValue, dispatc...
import {Test, TestingModule} from '@nestjs/testing'; import {CompetenzeService} from './competenze.service'; import {HttpModule} from '@nestjs/axios'; import {Observable} from 'rxjs'; import {AxiosResponse} from 'axios'; import {CompetenzeModule} from './competenze.module'; import {UpdateCompetenzeDto} from './dto/upda...
import edu.princeton.cs.algs4.StdOut; import edu.princeton.cs.algs4.StdRandom; public class Quick5Sample { public static void sort(Comparable[] a){ StdRandom.shuffle(a); sort(a,0,a.length-1); } private static void sort(Comparable[] a ,int lo,int hi){ if(hi<=lo+4){ Insertion.sort(a, lo, hi); ...
<?php namespace App\Providers\App\Listeners; use App\Models\User; use Illuminate\Auth\Events\Registered; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailer; use Illuminate\Queue\InteractsWithQueue; class RegisteredListener { private $mailer; private $eloquent; /** * Create the e...
import { mkdirSync, writeFileSync } from "fs"; import { execSync } from "child_process"; import { generateConfigFiles } from "../configfiles/generateConfigFiles"; import { generateReactFiles } from "../reactTemplate/reactTemplate"; import { generateHtmlTemplate } from "../htmlTemplate/htmlTemplate"; import { generateWe...
# Copyright 2023, Erik Myklebust, Andreas Koehler, MIT license """ Various variations of PhaseNet Author: Erik Myklebust """ import tensorflow as tf import tensorflow.keras.layers as tfl import tensorflow.keras.backend as K import numpy as np def crop_and_concat(x, y): to_crop = x.shape[1] - y.shape[1] if ...
import { Item } from "./Item"; import { Pages } from "./pages"; export class Comics extends Item { constructor(protected _title: string, protected _artist: string ,protected _author: string, readonly pages: Pages){ super(); } get title(): string{ return this._title; } set title(newT...
import cv2 import os import tempfile import time import gradio as gr from gradio_rerun import Rerun import rerun as rr import rerun.blueprint as rrb from color_grid import build_color_grid # NOTE: Functions that work with Rerun should be decorated with `@rr.thread_local_stream`. # This decorator creates a generator...
import { Component, OnInit, ViewChild } from '@angular/core'; import { User } from '../../models/interfaces/user.interface'; import { Message, STATES } from '../../models/interfaces/message.interface'; import { Storage } from '@ionic/storage'; import { IonInfiniteScroll, NavParams } from '@ionic/angular'; import { Acti...
STRING digits = "123456789"; [4]CHAR chosen; STRING available := digits; FOR i TO UPB chosen DO INT c = ENTIER(random*UPB available)+1; chosen[i] := available[c]; available := available[:c-1]+available[c+1:] OD; COMMENT print((chosen, new line)); # Debug # END COMMENT OP D = (INT d)STRING: whole(d,0); # ...
@page "/EstadoPrestamos" @inject PagosBLL PagosBLL @inject NotificationService notificationService @inject PersonasBLL PersonasBLL @inject PrestamosBLL prestamosBll <EditForm Model="Listaprestamos"> <DataAnnotationsValidator /> <div class="card"> <div class="container"> <div class="card-...
import React, { useState } from "react"; import { useForm, Controller, SubmitHandler } from "react-hook-form"; import { Flex, VStack, Input as ChakraInput, InputGroup, FormLabel, FormControl, InputLeftElement, FormHelperText, Button, FormErrorMessage, Image, Box, SimpleGrid, RadioGroup, Ra...
package com.cs407.bluedrop.receiver import android.app.Application import android.content.Context import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.viewModelScope import com.cs407.bluedrop.Constants import com.cs407.bluedrop.models.FileTransfer import com.cs407.bluedrop.models.ViewState import kotli...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { compose } from 'redux'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { FormattedMessage, injectIntl, intlShape } from '../../util/reactIntl'; import { propTypes } from '../../util/types...
using System; namespace VirtualPet { class Pet { public string Name { get; } public string Type { get; } public int Hunger { get; private set; } public int Happiness { get; private set; } public int Health { get; private set; } public Pet(string name, string ty...
const createError = require('http-errors'); const express = require('express'); const path = require('path'); const cookieParser = require('cookie-parser'); const logger = require('morgan'); const db = require('./models/sequelize').sequelize const indexRouter = require('./routes/index'); const usersRouter = require('....
function [FitPa,fval,exitflag,fitx,fity] = FitRatioOfGaussians(x,y, ... varargin) %hn 9/18/12 %fits ratio of Gaussian model (based on Cavanaugh, Bair, Movshon, 2002) %to size tuning data. %R(x) = k_c*L_c(x)/(1+k_s*L_s(x)), %where % k_c: gain of center RF % k_s: gain of surround field % L_c = (2/(pi)...
// // Copyright(c) 2002 Mediatrix Telecom, Inc. ("Mediatrix") // Copyright(c) 2003 M5T Centre d'Excellence en Telecom Inc. ("M5T") // Copyright(c) 2007 Media5 Corporation ("Media5") // // NOTICE: // This document contains information that is confidential and proprietary to // Media5. // // ...
import Image from 'next/image'; import Link from 'next/link'; import { useState, useCallback } from 'react'; import ContentInner from 'components/Common/ContentInner'; import LinkBtn from 'components/Common/LinkBtn'; import Title from 'components/Common/Title'; import styled from 'styled-components'; import { mediaQuer...
import './App.css'; import 'bootstrap/dist/css/bootstrap.min.css'; import HomePage from './Pages/Home/HomePage'; import NavBarLogin from './Components/Utility/NavBarLogin'; import Footer from './Components/Utility/Footer'; import { BrowserRouter, Route, Routes } from 'react-router-dom'; import LoginPage from './Pages/A...
/** * Copyright © 2007-2008 Glaxstar Ltd. All rights reserved. */ #include "nsISupports.idl" /** * The data transfer object to be user between API methods and API consumers. */ [scriptable, uuid(2025DE0D-7CC2-4264-A8DD-D625F2E496F6)] interface gsICMTransferObject : nsISupports { /** * Parses the given JSON s...
syntax = "proto3"; package member.v1; option go_package = "go-mall/server/user/api/gen/v1/user;memberpb"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; service MemberService { rpc GetMemberById(IdRequest) returns(MemberEntity); // 通过用户id获取会员信息 rpc GetMemberByPhone(PhoneRequest) re...