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 functionSun, 30 Apr 2023

Implementar una Calculadora de Números Enteros, mediante un proyecto de consola en C++, cuyo algoritmo permita: 1. Mostrar un menú de 6 opciones: • 1. Sumar dos números. • 2. Restar dos números. • 3. ...

#include <iostream> using namespace std; int menu(){ int option; cout << "1. Sumar dos numeros.\n"; cout << "2. Restar dos numeros.\n"; cout << "3. Multiplicar dos numeros.\n"; cout << "4. Dividir dos numeros.\n"; cout << "5. Número Primo?.\n"; cout << "6. Salir.\n"; cout << "Ingrese opción: "; cin >> option; return option; } int suma(int a, int b){ return a+b; } int resta(int a, int b){ return a-b; } int multiplicacion(int a, int b){ return a*b; } int division(int a, int b){ if (b == 0){ return 0; } return a/b; }

C++
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, 28 Jul 2023

Hola

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

Kotlin
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 functionSun, 16 Jul 2023

almacenar 4 productos en un arreglo tridimensional las ventas mensuales de cada uno de ellos y el promedio de ventas durante los últimos 3 años.

#include<stdio.h> #include<stdlib.h> #include<windows.h> int main() { float producto[3][4][12],promedio[4][12]; int i,j,k; for(i=0;i<3;i++) { for(j=0;j<4;j++) { for(k=0;k<12;k++) { printf("Ingrese venta del producto %d, mes %d, año %d\n",i+1,j+1,k+1); scanf("%f",&producto[i][j][k]); } } } for(j=0;j<4;j++) { for(k=0;k<12;k++) { promedio[j][k]=0; for(i=0;i<3;i++) { promedio[j][k

C++
Guest
generate functionSat, 22 Apr 2023

create a function that takes key and plain text as inputs and outputs a cipher text using hill cipher algorithm

public string hillCipher(string key, string plainText) { string cipherText = ""; int[] keyInt = key.Select(c => (int)c).ToArray(); int[] plainTextInt = plainText.Select(c => (int)c).ToArray(); int[,] keyMatrix = new int[2, 2]; int[,] plainTextMatrix = new int[2, 1]; keyMatrix[0, 0] = keyInt[0] - 65; keyMatrix[0, 1] = keyInt[1] - 65; keyMatrix[1, 0] = keyInt[2] - 65; keyMatrix[1, 1] = keyInt[3] - 65; plainTextMatrix[0, 0] = plainTextInt[0] - 65; plainTextMatrix[1, 0] = plainTextInt[1] - 65; int[,] cipherTextMatrix = new int[2, 1]; cipherTextMatrix[0, 0] = (keyMatrix[0,

C#
Guest
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 functionWed, 26 Jul 2023

Haz un mapa de Argentina

import matplotlib.pyplot as plt import cartopy.crs as ccrs plt.axes(projection=ccrs.PlateCarree()) plt.contourf(lon, lat, temp_data[0, :, :], 60, transform = ccrs.PlateCarree()) plt.colorbar(orientation='horizontal', shrink = 0.8) plt.show()

Python
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 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 functionMon, 03 Jul 2023

I need my image the size of the page: .backgroundr { padding: 20%; position: absolute; opacity: 0.1; max-width: 100%; max-height: 100%; background-size: cover; background-position: center 100%; }

int main(int argc, char** argv) { // Create a file reader cv::VideoCapture cap; // Open the video file cap.open(0); // Create a window to display the video cv::namedWindow("Video"); // Show the image in the window cv::imshow("Video", video); // Wait for the user to press a button cv::waitKey(0); }

C++
Guest
code to explanationFri, 06 Jan 2023

if(dw_hourmeter_value >= HOUR_METER_MAX) /*if hour meter cross the maximum value, so roll-over hour meter value and trip meter shold rese...

the if statement checks the value of dw_hour_meter_value and if the value is greater or equal to the HOUR_METER_MAX then the value of dw_hour_meter_value is set to 0, the gsw_hour_meter_count is set to 0, the fnby_WritePort function is used to write 0 to the AMIL, the fnv_TripA_reset function and the fnv_TripB_reset function are called to reset the trip a and trip b variables.

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

create a function that takes key and plain text as inputs and outputs a cipher text using hill cipher algorithm

public string hillCipher(string key, string plainText) { string cipherText = ""; int[] keyInt = key.Select(c => (int)c).ToArray(); int[] plainTextInt = plainText.Select(c => (int)c).ToArray(); int[,] keyMatrix = new int[2, 2]; int[,] plainTextMatrix = new int[2, 1]; keyMatrix[0, 0] = keyInt[0] - 65; keyMatrix[0, 1] = keyInt[1] - 65; keyMatrix[1, 0] = keyInt[2] - 65; keyMatrix[1, 1] = keyInt[3] - 65; plainTextMatrix[0, 0] = plainTextInt[0] - 65; plainTextMatrix[1, 0] = plainTextInt[1] - 65; int[,] cipherTextMatrix = new int[2, 1]; cipherTextMatrix[0, 0] = (keyMatrix[0,

C#
Guest
code to explanationFri, 06 Jan 2023

if(dw_hourmeter_value >= HOUR_METER_MAX) /*if hour meter cross the maximum value, so roll-over hour meter value and trip meter shold rese...

the if statement checks the value of dw_hour_meter_value and if the value is greater or equal to the HOUR_METER_MAX then the value of dw_hour_meter_value is set to 0, the gsw_hour_meter_count is set to 0, the fnby_WritePort function is used to write 0 to the AMIL, the fnv_TripA_reset function and the fnv_TripB_reset function are called to reset the trip a and trip b variables.

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
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 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 functionSat, 06 May 2023

Login con conexión a MySQL con contraseña encriptada

import mysql.connector import hashlib import sys def login(username, password): """ """ # Create connection mydb = mysql.connector.connect( host="localhost", user="user", passwd="pass", database="mydatabase" ) # Create cursor to execute queries cursor = mydb.cursor() # Create query and execute query = f"SELECT * FROM login WHERE username = '{username}'" cursor.execute(query) # Fetch all results result = cursor.fetchall() # Check if query was successful if result == []: print("Invalid username and/or password") return # Check if user exists if len(result) != 1: print("ERROR: More than one user exists") return # Check if password is correct # Load password from database db_password = result[0][1] # Encrypt password

Python
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
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
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 functionSat, 26 Nov 2022

masonry layout grid vue js

import { Vue, Component, Prop, Watch } from "vue-property-decorator"; @Component({ name: "Masonry", }) export default class GridLayout extends Vue { @Prop({ default: false }) horizontal!: boolean; @Prop({ default: 200 }) gutter!: number; @Prop({ default: 0 }) column!: number; @Prop({ default: null }) minWidth!: number | null; @Prop({ default: null }) maxWidth!: number | null; @Prop({ default: null }) breakpoint!: number | null; @Prop({ default: true }) transition!: boolean; @Prop({ default: "fade" }) transitionMode!: string; @Prop({ default: 300 }) transitionDuration!: number; private $slots = this.$slots; private $props = this.$props; private currentWidth: number = 0; private currentGutterSize: number = 0; private transitionDurationStyle

TypeScript
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 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
code to explanationMon, 14 Nov 2022

function checkValidOrderId(orderid, account, platid, outputObject) { if (typeof orderid !== 'string') { throw new Error('参数错误,orderid非法'); } //格式:代理编号 +yyyyMMddHHmmssSSS+ account if (account !=...

function checkValidOrderIdOnly(s) { let len = s.length; if (len !== 17) throw new Error('参数错误,orderid非法'); let v = parseInt(s); if (!Number.isFinite(v)) throw new Error('参数错误,orderid非法'); let d = new Date(v); if (d.getTime() !== v) throw new Error('参数错误,orderid非法'); let now = Date.now(); if (v > now || v < now - 24 * 60 * 60 * 1000) throw new Error('参数错误,orderid非法'); }

Guest
ContactPrivacy Policyzigarettenautomatkarte.de