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 functionSat, 25 Mar 2023

Si en cualquier momento S1 es HIGH entonces salida1 y salida2 serán LOW (Activar salida1 y esperar 5 segundos si entrada1 es HIGH Activar salida2 y esperar 5 segundos si entrada2 es HIGH)

++ bool S1 = 0; bool S2 = 0; bool S3 = 0; bool S4 = 0; bool S5 = 0; bool S6 = 0; bool S7 = 0; bool S8 = 0; bool S9 = 0; bool S10 = 0; bool S11 = 0; bool S12 = 0; bool S13 = 0; bool S14 = 0; bool S15 = 0; bool S16 = 0; void setup() { pinMode(S1, OUTPUT); pinMode(S2, OUTPUT); pinMode(S3, OUTPUT); pinMode(S4, OUTPUT); pinMode(S5, OUTPUT); pinMode(S6, OUTPUT); pinMode(S7, OUTPUT); pinMode(S8, OUTPUT); pinMode(S9, OUTPUT); pinMode(S10, OUTPUT); pinMode(S11, OUTPUT); pinMode(S12

C
Guest
generate functionSun, 05 Feb 2023

9. Разработайте приложение «7 чудес света», где каждое чудо будет представлено отдельным классом. Создайте дополнительный класс, содержащий точку входа. Распределите приложение по файлам проекта и с помощью пространства имён обеспечьте возможность взаимодействия классов.

using System; using Classes; namespace SevenWonders { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } }

C#
Guest
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, 04 Apr 2023

entendes castellano?

function hablarEspañol(persona) { if (persona === "español" || persona === "colombiano") { console.log("¡Hola!"); } else { console.log("¡Hablas inglés!"); } }

Javascript
Guest
generate functionFri, 21 Apr 2023

suma de matrices con vectores

import numpy as np def add_matrix_and_vector(x, y): return x + y matrix = np.array([[1, 2], [3, 4]]) vector = np.array([6, 7]) add_matrix_and_vector(matrix, vector)

Python
Guest
generate functionFri, 21 Apr 2023

suma de matrices con vectores

import numpy as np def add_matrix_and_vector(x, y): return x + y matrix = np.array([[1, 2], [3, 4]]) vector = np.array([6, 7]) add_matrix_and_vector(matrix, vector)

Python
Guest
generate functionMon, 08 May 2023

推送公告

Script def push_notice(message): for user in users: user.receive_message(message) push_notice('hello!')

Java
Guest
generate functionWed, 12 Apr 2023

Realizar un script en Python que calcule las resistencias en paralelo o en serie, pidiendo primero la cantidad de resistencias, luego el tipo de conexión en formato string si es en “serie” o en “paral...

def serie(resistencias): total = 0 for resistencia in resistencias: total += resistencia return total def paralelo(resistencias): total = 0 for resistencia in resistencias: if resistencia == 0: return 0 total += 1 / resistencia return 1 / total def total(resistencias, tipo): if tipo == "serie": return serie(resistencias) elif tipo == "paralelo": return paralelo(resistencias) else: print("Tipo de resistencia no reconocida") return None resistencias = [] while True: cantidad = int(input("Ingrese la cantidad de resistencias: ")) if cantidad > 0: break print("Ingrese una cantidad positiva") for i in range(cantidad): while True:

Python
Guest
generate functionTue, 28 Mar 2023

Make a program that receives as parameter a file called directorios.txt that will contain the names of directories that exist in your system. The program will have to read from the file the names of ...

def file_to_dict(file_name): file_dict = {} # open the file with open(file_name) as f: # loop through each line in the file for line in f: # remove new line character key = line.rstrip() # get the number of files in the directory file_dict[key] = len(os.listdir(key)) return file_dict def file_to_sorted_list(file_name): file_dict = file_to_dict(file_name) # return a list of directory name and number of files return sorted(file_dict.items(), key=lambda kv: kv[1]) # test for dir_name, number_of_files in file_to_sorted_list('directorios.txt'): print(f'{dir_name} has {number_of_files} files')

Java
Guest
generate functionFri, 21 Apr 2023

generar codigo QR

function generar_qr(texto) { if (texto.length >= 100) { return "El texto es demasiado largo" } return "https://api.qrserver.com/v1/create-qr-code/?data=" + texto + "&size=250x250" }

Javascript
Guest
generate functionTue, 18 Apr 2023

> m2 <- clm(categorical_FOD_FODs ~ 0 + Condition_FODs:Language_used_FODs - 1, random = ~1|subject, data = indvar_FODs) > summary(m2) formula: categorical_FOD_FODs ~ 0 + Condition_FODs:Language_used_FO...

#LMM library(lme4) m2 <- clm(categorical_FOD_FODs ~ 0 + Condition_FODs:Language_used_FODs - 1, random = ~1|subject, data = indvar_FODs) summary(m2) #LM m2 <- clm(categorical_FOD_FODs ~ Condition_FODs:Language_used_FODs - 1, data = indvar_FODs) summary(m2) #post-hoc analysis library(lsmeans) contrast(m2, "pairwise", list(Condition_FODs = c("A", "B", "C", "D"))) library(emmeans) emmeans(m2, pairwise~Condition_FODs, adjust = "bonferroni")

generate functionFri, 16 Jun 2023

construya un programa en c que al recibir como datos N números enteros, obtenga la suma de los números pares y calcule el promedio de los impares

#include <stdio.h> int main(int argc, char const *argv[]) { int n; scanf("%d", &n); int numbers[n]; for (int i = 0; i < n; i++) { int number; scanf("%d", &number); numbers[i] = number; } int sumOfEvens = 0; int sumOfOdds = 0; for (int i = 0; i < n; i++) { int number = numbers[i]; if (number % 2 == 0) { sumOfEvens += number; } else { sumOfOdds += number; } } printf("%d\n", sumOfEvens); if (sumOfOdds == 0) { printf("No hay números impares"); } else { printf("%.2

C
Guest
generate functionMon, 28 Nov 2022

generate a function swaps two struct value

fn swap(left: &mut usize, right: &mut usize) { let temp = *left; *left = *right; *right = temp; } fn main() { let mut left = 1; let mut right = 2; swap(&mut left, &mut right); println!("left: {}, right: {}", left, right); }

Rust
Guest
generate functionTue, 28 Mar 2023

Make a program that receives as parameter a file called directorios.txt that will contain the names of directories that exist in your system. The program will have to read from the file the names of ...

def file_to_dict(file_name): file_dict = {} # open the file with open(file_name) as f: # loop through each line in the file for line in f: # remove new line character key = line.rstrip() # get the number of files in the directory file_dict[key] = len(os.listdir(key)) return file_dict def file_to_sorted_list(file_name): file_dict = file_to_dict(file_name) # return a list of directory name and number of files return sorted(file_dict.items(), key=lambda kv: kv[1]) # test for dir_name, number_of_files in file_to_sorted_list('directorios.txt'): print(f'{dir_name} has {number_of_files} files')

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
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 functionFri, 30 Jun 2023

1. Cálculo de la suma de todos los elementos de un vector, así como la media aritmética. arreglos unidimensionales

public class Ejercicio02 { public static void main(String[] args) { int[] numeros = new int[20]; int suma = 0; int media; System.out.println("Array original:"); for (int i = 0; i < 20; i++) { numeros[i] = (int)(Math.random() * 401); System.out.print(numeros[i] + " "); suma += numeros[i]; } System.out.println("\n\nArray modificado:"); media = suma / 20; for (int i = 0; i < 20; i++) { if (numeros[i] < media) { numeros[i] = numeros[i] * -1; } System.out.print(numeros[i] + " "); } } }

Java
Guest
generate functionFri, 28 Jul 2023

Hola

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

Kotlin
Guest
generate functionFri, 21 Apr 2023

generar codigo QR

function generar_qr(texto) { if (texto.length >= 100) { return "El texto es demasiado largo" } return "https://api.qrserver.com/v1/create-qr-code/?data=" + texto + "&size=250x250" }

Javascript
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 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 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 functionThu, 22 Jun 2023

Construya una función que reciba como parámetro una lista y una verdura, la función debe agregar el elemento a la lista solo si este no esta en la lista, es decir no pueden haber verduras repetidas. La función retorna un mensaje si se pudo agregar o no la verdura a la lista.

def agregar_verdura(lista, verdura): if verdura not in lista: lista.append(verdura) return "{} agregada exitosamente".format(verdura) else: return "La verdura ya está en la lista" verduras = ['lechuga', 'cebolla'] agregar_verdura(verduras, 'tomate')

Python
Guest
generate functionWed, 12 Apr 2023

Realizar un script en Python que calcule las resistencias en paralelo o en serie, pidiendo primero la cantidad de resistencias, luego el tipo de conexión en formato string si es en “serie” o en “paral...

def serie(resistencias): total = 0 for resistencia in resistencias: total += resistencia return total def paralelo(resistencias): total = 0 for resistencia in resistencias: if resistencia == 0: return 0 total += 1 / resistencia return 1 / total def total(resistencias, tipo): if tipo == "serie": return serie(resistencias) elif tipo == "paralelo": return paralelo(resistencias) else: print("Tipo de resistencia no reconocida") return None resistencias = [] while True: cantidad = int(input("Ingrese la cantidad de resistencias: ")) if cantidad > 0: break print("Ingrese una cantidad positiva") for i in range(cantidad): while True:

Python
Guest
generate functionMon, 08 May 2023

推送公告

Script def push_notice(message): for user in users: user.receive_message(message) push_notice('hello!')

Java
Guest
generate functionWed, 24 May 2023

make a get API with response "Test"."Test" word should come from mysql DB and Admin portal should also be there which should be linked with DB to change the word and host on heroku or any Hosting site.

// This is a "stub" file. It's a little start on your solution. // It's not a complete solution though; you have to write some code. // Package greeting should have a package comment that summarizes what it's about. // https://golang.org/doc/effective_go.html#commentary package greeting // HelloWorld needs a comment documenting it as package does. func HelloWorld() string { return "Hello, World!" }

Javascript
Guest
generate functionWed, 03 May 2023

** Realizar un programa que lea una letra de la A a la L. Imprimir en pantalla el mes correspondiente a la letra. Ejemplo A es Enero, B es Febrero, C es Marzo, etc.

int main(){ char letra, mes[13]; printf("Ingrese una letra de la A a la L: "); scanf("%c", &letra); switch(letra){ case 'A': case 'a': printf("Enero"); break; case 'B': case 'b': printf("Febrero"); break; case 'C': case 'c': printf("Marzo"); break; case 'D': case 'd': printf("Abril"); break; case 'E': case 'e': printf("Mayo"); break; case 'F': case 'f': printf("Junio"); break; case 'G': case 'g': printf("Julio"); break; case 'H': case 'h': printf("Agosto"); break; case 'I': case

C++
Guest
generate functionThu, 29 Jun 2023

Realice una función int sumoveravg(int valores[ ], int n) que recibe como parámetro un arreglo de n elementos enteros y retorne la suma de los elementos que están por encima del promedio. Se conoce la función float avg(int nums[ ], int n), que retorna el promedio de los n números en 'nums'.

#include <stdio.h> float avg(int nums[ ], int n) { int i, sum = 0; for(i = 0; i < n; i++) { sum += nums[i]; } return ((float)sum)/n; } int main() { int nums[] = {1, 2, 3, 4, 5}; printf("%f", avg(nums, 5)); }

C
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
ContactPrivacy Policyzigarettenautomatkarte.de