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, 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

in html you can generate a beating heart with effects and colors neon

<div class="heart"> <div class="heart-main"> <div class="heart-line"> <div class="heart-line1"></div> <div class="heart-line2"></div> <div class="heart-line3"></div> <div class="heart-line4"></div> <div class="heart-line5"></div> <div class="heart-line6"></div> <div class="heart-line7"></div> <div class="heart-line8"></div> <div class="heart-line9"></div> <div class="heart-line10"></div> <div class="heart-line11"></div> <div class="heart-line12"></div> <div class="heart-line13"></div> <div class="heart-line14"></div> <div class="heart-line15"></div> <div class="heart-line16"></div> <div class="heart-line17"></div>

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, 21 Apr 2023

標準入力から 2 つの整数を入力し、大きいほうの値を表示するプログラムを作成せよ。 (ヒント:2 つの変数を a、b とすると、a>b が「正しいとき」と「正しくないとき」でそれぞれどちらを表 示すればよいかが判断できるはずである。もし両者が同じ値のときは、a と b のどちらを表示してもよい)

a = input("a:") b = input("b:") if a > b: print(a) else: print(b)

Java
Guest
generate functionMon, 27 Mar 2023

1 2

def add(a, b): print(a) print(b) return a + b add(1, 2)

Python
Guest
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 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, 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 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 functionSun, 30 Jul 2023

extracts work experience from unstructured resume text using a trained mlp model loaded with spacy

import spacy import sys import pickle nlp = spacy.load('en_core_web_sm', disable=['parser', 'tagger']) def extract_experience(text): doc = nlp(text) X = pd.DataFrame([[ent.text, ent.start_char, ent.end_char, ent.label_] for ent in doc.ents], columns = ["text", "start", "end", "label"]) X_test = X[X["label"] == "ORG"].copy() X_test["tokens"] = X_test["text"].apply(lambda x: [token.text for token in x.split()]) with open(f"model.pkl", 'rb') as f: model = pickle.load(f) y_pred = model.predict(X_test["tokens"]) return list(zip(X_test["text"], y_pred))

Python
Guest
generate functionWed, 02 Aug 2023

I want to make a panel with a text box and a button to execute and another to delete and another to copy from the clipboard

# public static Panel CreatePanel() { var panel = new Panel(); var textBox = new TextBox(); textBox.Location = new Point(10, 10); textBox.Size = new Size(200, 50); panel.Controls.Add(textBox); var button = new Button(); button.Location = new Point(10, 70); button.Size = new Size(200, 50); button.Text = "Execute"; panel.Controls.Add(button); return panel; } private void button1_Click(object sender, EventArgs e) { var panel = CreatePanel(); Controls.Add(panel); }

C
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 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 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 functionMon, 08 May 2023

Write a C program to implement Caesar cipher encryption-decryption

#include <stdio.h> int main() { char message[100], ch; int i, key; printf("Enter a message to encrypt: "); gets(message); printf("Enter key: "); scanf("%d", &key); for(i = 0; message[i] != '\0'; ++i){ ch = message[i]; if(ch >= 'a' && ch <= 'z'){ ch = ch + key; if(ch > 'z'){ ch = ch - 'z' + 'a' - 1; } message[i] = ch; } else if(ch >= 'A' && ch <= 'Z'){ ch = ch + key; if(ch > 'Z'){ ch = ch - 'Z' + 'A' - 1; } message[i] = ch; } } printf("Encrypted message: %s", message); return 0

C
Guest
generate functionSun, 23 Apr 2023

Realice una diagrama de barras con la información encontrada en la columna "Nivel"; donde éste tenga titulo, marcado el eje , el eje , las barras sean coloreadas de diferente color y las categorías en la columna "Nivel" tenga marquillas.

df = pd.read_csv("/home/oscar/Documentos/python/data.csv") df.head() df['Nivel'].value_counts().plot(kind="bar", color=["green", "blue", "red"]) plt.xlabel("Nivel") plt.ylabel("Frecuencia") plt.title("Diagrama de barras") plt.show()

Python
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 functionMon, 12 Dec 2022

get a list of users from active directory from police department, output to spreadsheet, order column by name

def get_police_users(department): import ldap import re from openpyxl import Workbook from openpyxl import load_workbook wb = Workbook() ws = wb.active # connect to active directory conn = ldap.initialize('ldap://ldap.yourdomain.com') # search for users in department in active directory results = conn.search_s('dc=yourdomain,dc=com', ldap.SCOPE_SUBTREE, "department=" + department, ['cn']) # create spreadsheet and add users in department to it ws.append(["Users"]) for result in results: ws.append([re.findall('(?<=cn=).*', result[1]['cn'][0].decode('utf-8'))[0]]) wb.save("output.xlsx") # open spreadsheet and sort by last name wb = load

Python
Guest
generate functionWed, 21 Dec 2022

dice gambling script

from random import randint def diceRoll(userGuess, numRoll): if userGuess == numRoll: return True else: return False def main(): numRoll = randint(1, 6) userGuess = int(input("Guess a number from 1 to 6: ")) if diceRoll(userGuess, numRoll): print("You win!") else: print("You lose. Better luck next time!") main()

Python
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 functionSat, 22 Apr 2023

un codigo para hacer un sistema basico de movimiento

public class Movimiento { public bool MovimientoBasico(int[] posicion, int[] destino) { if ( destino == posicion ) { return false; } else if ( destino[0] >= posicion[0] ) { posicion[0] ++; } else if ( destino[0] <= posicion[0] ) { posicion[0] --; } else if ( destino[1] >= posicion[1] ) { posicion[1] ++; } else if ( destino[1] <= posicion[1] ) { posicion[1] --; } else { return false; } return true; } }

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
generate functionTue, 15 Nov 2022

thread create another thread

#include <stdio.h> #include <pthread.h> void *thread_func(void *arg) { printf("New thread created\n"); return NULL; } int main() { pthread_t tid; pthread_create(&tid, NULL, thread_func, NULL); pthread_join(tid, NULL); return 0; }

C
Guest
generate functionTue, 30 May 2023

Prendere in input da utente 3 valori (diff_d1, diff_d2, diff_d3) che rappresentano il valore dei dadi del difensore. • Controllare che il valore dei dadi sia compreso nel range [0, 6]. • Controllare c...

#include <iostream> using namespace std; int main() { float diff_d1, diff_d2, diff_d3; do { cout << "Inserire il valore dei dadi del difensore:\n"; cin >> diff_d1 >> diff_d2 >> diff_d3; } while (diff_d1 < 0 || diff_d1 > 6 || diff_d2 < 0 || diff_d2 > 6 || diff_d3 < 0 || diff_d3 > 6 || (diff_d1 == 0 && diff_d2 == 0 && diff_d3 == 0)); }

C++
Guest
generate functionFri, 05 May 2023

Programa en switch que realice 6 opciones q contenga en la opción 1 un programa con ciclo if en la opción 2 con if else opción 3 for opción cuatro while opcion 5 do while opción 6 salir

++ #include<stdio.h> #include<stdlib.h> int main() { int opcion; do { printf("1. if \n"); printf("2. if else\n"); printf("3. for\n"); printf("4. while \n"); printf("5. do while \n"); printf("6. salir \n"); scanf("%d",&opcion); switch(opcion) { case 1: printf("Usted eligio la opcion if"); break; case 2: printf("Usted eligio la opcion if else"); break; case 3: printf("Usted eligio la opcion for"); break; case 4: printf("Usted eligio la opcion while"); break; case 5: printf("Usted eligio la opcion do while"); break; case 6: printf("Usted eligio la opcion salir"); break; default: printf("opcion invalida");

C
Guest
generate functionFri, 26 Apr 2024

área y perímetro cuadrado

ript function area(x) { return x * x; } function perimetro(x) { return x * 4; } function areaPerimetro(x) { return x * x + x * 4; } function areaPerimetro2(x) { return x * x + x * x + x * 4; } function areaPerimetro3

Javascript
Guest
ContactPrivacy Policyzigarettenautomatkarte.de