Custom ChatGPT Plugin development

ConversAI Solutions

Code faster with the help of AI

Generate code just by typing a text description. AI will create the code for you. Test it now

Questions about programming?Chat with your personal AI assistant

How others used it recently

Generated by the communtiy

generate functionTue, 28 Mar 2023

Menu de 3 opciones una opcion recopilar datos personales y guardarlos en una base de datos la segunda opción que recopile notas de 3 cursos y tercera opción que recopile ausencias y tardías

def menu(): print("1. datos personales") print("2. Notas de cursos") print("3. Ausencias y Tardías") print("4. Salir") opcion = int(input("Ingrese una opción >> ")) if opcion == 1: datos_personales() elif opcion == 2: notas() elif opcion == 3: ausencias() elif opcion == 4: exit() else: print("Opción incorrecta") def datos_personales(): print("Ingrese sus datos") nombre = input("Nombre >> ") apellido = input("Apellido >> ") edad = input("Edad >> ") sexo = input("Sexo >> ") print("") print("Datos Ingresados") print("Nombre: "

Python
Guest
generate functionTue, 20 Jun 2023

create a ChatGpt clone

void chatbot() { while(true) { string userinput; getline(cin, userinput); if(userinput == "hello") cout << "Hello!" << endl; else if(userinput == "why are you so stupid?") cout << "because i am a bot" << endl; else cout << "i dont understand" << endl; } }

C++
Guest
generate functionWed, 10 May 2023

Un carrusel de productos.

var products = [ { name: 'Galletas', description: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.' }, { name: 'Bebidas', description: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.' }, { name: 'Comida', description: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.' }, { name: 'Papas', description: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.' }, { name: 'Tortas', description: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.' }, ] var carousel = document.getElementById('carousel'); var html = ''; html += '<div class="products">' for (var i = 0; i < products.length; i++) { html += '<div class="product">'; html += '<

Javascript
Guest
generate functionThu, 20 Apr 2023

quiero generar un boton que me permita seleccionar opciones utilizanzo react. que me permita filtrar las opciones mediante el texto que muestran y que tambien permita limpiar la seleccion con un icono de cruz en el costado derecho

import React from 'react'; import { Button, Input, Icon } from 'antd'; interface MyButtonProps { selectedOptions: any[]; onSelectedOptionsChange: (selectedOptions: any[]) => void; options: any[]; } const MyButton: React.FC<MyButtonProps> = ({ selectedOptions, onSelectedOptionsChange, options }) => { const [ text, setText ] = React.useState<string>(''); const [ dropdown, setDropdown ] = React.useState<boolean>(false); const [ filteredOptions, setFilteredOptions ] = React.useState<any[]>(options); const handleDropdown = () => { setDropdown(!dropdown); }; const handleTextChange = (e: any) => { const text = e.target.value; setText(text); const filteredOptions = options.filter(opt => opt.text.indexOf(text) > -1); setFil

TypeScript
Guest
generate functionTue, 25 Apr 2023

El Banco Gerencial de Desarrollo BGD, quiere determinar cuánto pagará un cliente que tome un préstamo no mayor de 200,000.00 para pagarlo en 24 meses a una Tasa de Interés de 2% mensual. Se requiere saber el valor o monto total que pagará el cliente en 2 años entre capital e intereses.

def main() principal = 200000 monthly_interest_rate = 0.02 number_of_payments = 24 payment = principal * ((monthly_interest_rate * (1 + monthly_interest_rate)**number_of_payments) / ((1 + monthly_interest_rate)**number_of_payments - 1)) return payment

C#
Guest
generate functionSat, 03 Dec 2022

void型の関数 histgram2() は、4つの引数をもち、順に [0,100] の範囲の値を要素にもつint型の配列変数 a[]、配列 a[] のサイズを表すint型の値 n、および、ヒストグラムの値を代入するためのint型の配列変数 h[]、ヒストグラムの区間の幅を表す int型の値 m である。 histgram2() は、与えられた配列変数 a[] の要素の値が、[0,m-1], [m...

void histgram2(int a[], int n, int h[], int m) { int i, j, k; i = 0; j = 0; k = 0; while (i < n) { if (m * k <= a[i] && a[i] < m * (k + 1)) { h[k]++; } else { k++; h[k]++; } i++; } }

C
Guest
generate functionTue, 17 Jan 2023

Алгоритм шифрования и расшифровки штатной сигнализации Ford C-Max

// Список битов с сообщения // 1 бит - стартовый бит (1) // 2 - 8 бит - биты сообщения (7 бит) // 9 бит - бит паритета (должен быть равен чётности всех битов сообщения) // 10 бит - стоп-бит (0) char start_bit = 1; char message_bit_1 = 0; char message_bit_2 = 0; char message_bit_3 = 0; char message_bit_4 = 1; char message_bit_5 = 0; char message_bit_6

C++
Guest
generate functionSat, 01 Apr 2023

Make a dice class - The class should have a throw method that simulates throwing a die. It returns the number thrown, but it also stores in the instance how many we have thrown, whic...

function Dice() { this.value = 0; this.numberOfThrows = 0; this.renderTo = ""; } Dice.prototype.render = function () { document.querySelector(this.renderTo).innerHTML = this.value; }; Dice.prototype.throw = function () { this.numberOfThrows++; this.value = Math.ceil(Math.random() * 6); }; Dice.prototype.getNumberOfThrows = function () { return this.numberOfThrows; }; Dice.prototype.getValue = function () { return this.value; };

Javascript
Guest
generate functionWed, 03 May 2023

Elaborar un programa en Java que permita mostrar 3 catálogos de libros (novelas, ciencia, tecnología)

import java.util.Scanner; public class Ejercicio4 { public static void main(String[] args) { Scanner entrada = new Scanner(System.in); String[] novelas = { "El Alquimista", "Como agua para chocolate", "Cien años de soledad" }; String[] ciencia = { "La física de lo imposible", "El universo elegante", "La teoría del todo" }; String[] tecnologia = { "El futuro de la humanidad", "El viaje de la computadora", "La revolución de Bitcoin" }; System.out.println("Libros de Novelas"); System.out.println("================"); for (String i : novelas) { System.out.println(i); } System.out.println("Libros de Ciencia"); System.out.println("================"); for (String i : ciencia) { System.out.println(

Java
Guest
generate functionTue, 25 Apr 2023

suponga que el precio unitario de las pelotas de baseball es de 6.50 dolares si se compran 10 o mas y 7.00 dolares en caso de comprar menos. imprima no solo el costo sino tambien el mensaje descuento o el mensaje sin descuento

#include <iostream> using namespace std; int main() { int n = 0; float costo = 0; cout << "Ingrese la cantidad de pelotas que desea comprar: \n"; cin >> n; if (n <= 10){ costo = n * 7.00; cout << "El valor total a pagar es: " << costo << " dolares" << endl; } else{ costo = n * 6.50; cout << "El valor total a pagar es: " << costo << " dolares" << endl; } return 0; }

C++
Guest
translateThu, 23 Mar 2023

Pedir por teclado el tamaño de un arreglo de números y pedir los valores numéricos con los que se rellena. Los valores no se pueden repetir. Mostrar el arreglo con los valores al final.

#include <stdio.h> int main(int argc, char const *argv[]) { int n; printf("Ingrese tamaño del arreglo: \n"); scanf("%d", &n); int numbers[n]; for (int i = 0; i < n; i++) { printf("Ingrese un numero: \n"); scanf("%d", &numbers[i]); } for (int i = 0; i < n; i++) { printf("El numero %d es: %d \n", i, numbers[i]); } return 0; }

C
Guest
generate functionTue, 25 Apr 2023

suponga que el precio unitario de las pelotas de baseball es de 6.50 dolares si se compran 10 o mas y 7.00 dolares en caso de comprar menos. imprima no solo el costo sino tambien el mensaje descuento o el mensaje sin descuento

#include <iostream> using namespace std; int main() { int n = 0; float costo = 0; cout << "Ingrese la cantidad de pelotas que desea comprar: \n"; cin >> n; if (n <= 10){ costo = n * 7.00; cout << "El valor total a pagar es: " << costo << " dolares" << endl; } else{ costo = n * 6.50; cout << "El valor total a pagar es: " << costo << " dolares" << endl; } return 0; }

C++
Guest
generate functionFri, 05 May 2023

Create a Google Chrome extension that, upon activation, opens a new tab in the browser with its graphical interface. The interface should have the necessary options and filters to search for a keyword...

# -*- coding: utf-8 -*- # Copyright (c) 2019, DigiThinkIT and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ProductDetector(Document): pass

Python
Guest
generate functionFri, 28 Jul 2023

Hola

fun hola(name: String) { println("Hola $name") } hola("Miguel")

Kotlin
Guest
generate functionSat, 01 Apr 2023

Make a dice class - The class should have a throw method that simulates throwing a die. It returns the number thrown, but it also stores in the instance how many we have thrown, whic...

function Dice() { this.value = 0; this.numberOfThrows = 0; this.renderTo = ""; } Dice.prototype.render = function () { document.querySelector(this.renderTo).innerHTML = this.value; }; Dice.prototype.throw = function () { this.numberOfThrows++; this.value = Math.ceil(Math.random() * 6); }; Dice.prototype.getNumberOfThrows = function () { return this.numberOfThrows; }; Dice.prototype.getValue = function () { return this.value; };

Javascript
Guest
generate functionFri, 10 Feb 2023

Create dashboard form

Script function createDashboardForm() { var form = document.createElement('form'); //set form attributes form.style.padding = '20px'; form.style.border = '1px dashed #000'; form.style.width = '350px'; //create a title var title = document.createElement('h1'); title.innerHTML = 'Sign up for our newsletter'; //create a description var description = document.createElement('p'); description.innerHTML = 'Enter your information below to receive our free newsletter.'; //create inputs var nameInput = document.createElement('input'); nameInput.setAttribute('type', 'text'); nameInput.setAttribute('placeholder', 'Name'); nameInput.style.display = 'block'; nameInput.style.marginBottom = '10px'; var emailInput = document.createElement('input'); emailInput.setAttribute('type', 'email'); emailInput.setAttribute('placeholder', 'Email'); email

Java
Guest
generate functionSat, 03 Dec 2022

void型の関数 histgram2() は、4つの引数をもち、順に [0,100] の範囲の値を要素にもつint型の配列変数 a[]、配列 a[] のサイズを表すint型の値 n、および、ヒストグラムの値を代入するためのint型の配列変数 h[]、ヒストグラムの区間の幅を表す int型の値 m である。 histgram2() は、与えられた配列変数 a[] の要素の値が、[0,m-1], [m...

void histgram2(int a[], int n, int h[], int m) { int i, j, k; i = 0; j = 0; k = 0; while (i < n) { if (m * k <= a[i] && a[i] < m * (k + 1)) { h[k]++; } else { k++; h[k]++; } i++; } }

C
Guest
generate functionTue, 21 Mar 2023

Add to this the code for generating a grid on the chart, as well as specifying the percentage difference directly on the chart bars plt.figure(figsize = (12, 4)) plt.bar(data.index, data['nutri'], co...

plt.figure(figsize = (12, 4)) plt.bar(data.index, data['nutri'], color = 'darkblue', label = 'nutri') plt.bar(data.index, data['mineral'], color = 'brown', label = 'mineral') plt.title('Comparison of Nutrient and Mineral Content') plt.xlabel('Nutrient|Mineral') plt.ylabel('Amount') plt.legend() plt.show()

Python
View User
text to sql syntaxThu, 27 Apr 2023

Funcio o procediment anomenat Premis_Proven_RHY que generi numero de 1 al 50. Premis_Proven_RHY rebra el numero premiat del sorteigi retorna el premi aconseguit. numero premiat si va del 1 al 20 50 euros, si va de 20 al 30 dinar a la cantina , si va de 30 a 50 un bono bus

DROP PROCEDURE IF EXISTS Premis_Proven_RHY; DELIMITER // CREATE PROCEDURE Premis_Proven_RHY(OUT numero_premiat INT) BEGIN SET numero_premiat = FLOOR(1 + RAND() * 50); END // DELIMITER ; CALL Premis_Proven_RHY(@premi); SELECT @premi;

Guest
generate functionWed, 19 Jul 2023

generar factura

def invoice(name, amount, **kwargs): print(f"Name={name} Amount={amount}") for k,v in kwargs.items(): print(f"{k} : {v}") invoice("Paula", 100, tax=0.16, tip=1.2)

Javascript
View User
generate functionSat, 13 May 2023

Mínimo debe haber 2 empleado por cada cargo y solo 1 empleado por cargo debe estar en turno. (no debe haber identificación repetida, cuando se cree un empleado, se debe verifica que no exista el númer...

import java.util.Scanner; public class Empleado{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String nombre, cargo; int id, horario, salario, numeroID; boolean horarioTurno = false, identificacion = true; System.out.println("Ingrese el número de empleados a registrar: "); int numeroEmpleados = sc.nextInt(); for(int i=0; i < numeroEmpleados; i++){ if(numeroEmpleados <= 10){ System.out.println("Ingrese el nombre: "); nombre = sc.nextLine(); System.out.println("Ingrese el cargo: "); cargo = sc.nextLine(); System.out.println("Ingrese el número de identificación: "); numeroID = sc.nextInt(); System.out.println("

Java
Guest
generate functionSat, 06 May 2023

Identifique la realizacion de un modo alternado de los procesos ("PROC1" , "PROC1"y "PROC2" de forma indefinida.

Script function processes(arr) { var obj = {}; var p1_count = 0; var p2_count = 0; var a = 0; var b = 0; for (var i = 0; i < arr.length; i++) { if (arr[i] === "PROC1") { p1_count += 1; a = p1_count; } else { p2_count += 1; b = p2_count; } if (a === b) { obj[arr[i]] = b; a = 0; b = 0; } } return obj; } processes(["PROC1", "PROC1", "PROC1", "PROC2", "PROC2", "PROC2"]);

Java
Guest
generate functionWed, 24 May 2023

funtion connect and create user in cognito aws

Future<void> signUp(String email, String password) async { var result = await _cognitoUserPool.signUp(email, password, [ AttributeArg(name: 'email', value: email), AttributeArg(name: 'name', value: 'minh'), AttributeArg(name: 'phone_number', value: '0932919800'), AttributeArg(name: 'gender', value: 'male'), ]); print('signUp result: $result'); }

Dart
Guest
text to sql syntaxTue, 17 Jan 2023

Выгрузить все столбцы таблиц с описанием ВСЕХ типов полей по группам типов(например текст, JSONB, число, вещественное число) через case на русском языке. postgresql Выгрузить без пробелов и переносов. выгрузить одной строкой

SELECT string_agg(case data_type when 'character varying' then 'text' when 'integer' then 'integer' when 'double precision' then 'real' when 'jsonb' then 'jsonb' end,',') FROM information_schema.columns where table_schema='public' and table_name='customers';

generate functionThu, 01 Jun 2023

(Lista simplemente enlazada) Se pide a Ud. realizar un aplicativo en java correspondiente a una lista simplemente enlazada, la cual ejecute las siguientes instrucciones: • Insertar al inicio de la lis...

// TODO code application logic here package Lista_Simplemente_Enlazadas; import java.util.Scanner; /** * * @author Juan Camilo */ public class Lista_Simplemente_Enlazadas { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Lista lista = new Lista(); int opcion = 0; int dato = 0; int posicion = 0; do { System.out.println("\nMENU"); System.out.println("1. Insertar al inicio de la lista"); System.out.println("2. Mostrar los elementos de la lista"); System.out.println("3. Insertar en la posición enésima"); System.out.println("4. Devolver la posición enésima de un elemento"); System.out.println("5. Ordenar los elementos de forma crecient

Java
Guest
ContactPrivacy Policyzigarettenautomatkarte.de