www.programming-helper.com Open in urlscan Pro
76.76.21.241  Public Scan

Submitted URL: http://www.programming-helper.com/
Effective URL: https://www.programming-helper.com/
Submission: On May 13 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

Custom ChatGPT Plugin development
Leverage the power of OpenAI's ChatGPT for seamless and human-like
conversational interactions
ConversAI Solutions →

Dismiss
Workflow
Open main menu
FeaturesAI ChatOpenEditCommunity DiscordOur API


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

Get started
Try it



FEATURE PREVIEW

Generate SQL |

More than just a code generator. A tool that helps you with a wide range of
tasks. All in one place.

Function from Description

Generate a function just by describing what is needs to do. Choose of many
programming languages.

Text Description to SQL Command

Create a SQL command from a description.

Translate Languages

Translate code to any programming language.

Generate HTML from Description

Generate small HTML from Description.

Code to Explanation

Any code explained in plain english.

Fix invalid Code

To spot a missing character somewhere can be frustrating. This feature will help
you to fix it.

Get Test for Code

This feature will help you to create tests for your code.

Class from Description

Generate a class just by describing what is needs to do. Choose of many
programming languages.

Regex from Description

Create a regex from a description like "check for email".

Regex to Explanation

Create a plain english explanation from a regex.

Git Command from Description

Find the Git Command you are looking for from a description.

Linux Command

Get the linux command from a description.

Function from Docstring

Provide a docstring to generate the actual function.

Add typing to code

This feature will help you to add typing to your code.

Get Language from Code

Get the programming language from a code.

Time complexity

Get time complexity.

CSS from Description

Generate CSS from Description.

Meta Tags from Description

Generate Meta Tags from a Description.

− sponsored −


QUESTIONS ABOUT PROGRAMMING?CHAT WITH YOUR PERSONAL AI ASSISTANT

Get chatting now


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 functionTue, 23 May 2023


CREATE WITH TURTLE FUNCTION AN ARROW POINTING TO THE RIGHT

def drawArrow(turtle, size): for i in range(0, 4): turtle.forward(size)
turtle.right(90) drawArrow(turtle, 100)

Python
Guest
generate functionWed, 22 Feb 2023


WRITE A C++ RECURSIVE FUNCTION TO PRINT FOLLOWING PATTERN. NO LOOPS ALLOWED
WHATSOEVER, AND YOU CAN WRITE OTHER HELPING (RECURSIVE) FUNCTIONS. YOUR FUNCTION
PROTOTYPE MUST BE AS FOLLOWS: VOID PRINTPATTERN1(INT START, INT END);

void PrintPattern1(int start, int end) { if(start > end) { return; }
cout<<start<<" "; PrintPattern1(start+5, end); cout<<start<<" "; }

C++
Guest
text to sql syntaxMon, 27 Mar 2023


SELECT MAX(RECEIVED_VOLUMETRY) FROM AUDIT.INPUT_AUDIT ORDER BY CREATION_DATE
DESC LIMIT 30; PASARLO A JPA

TypedQuery<Integer> query = entityManager.createQuery("SELECT
MAX(received_volumetry) FROM audit.input_audit ORDER BY creation_date DESC LIMIT
30",Integer.class);

Guest
generate functionThu, 18 May 2023


MOSTRAR TODOS LOS MÚLTIPLOS DE 8 QUE HAY HASTA EL VALOR 500. DEBE APARECER EN
PANTALLA 8 - 16 - 24, ETC.

int main(){ int i; for(i=8;i<=500;i+=8){ printf("\n%d",i); } return 0; }

C
Guest
generate functionWed, 12 Apr 2023


PROGRAMAR DE "A" HASTA LA "Z" SALGA ERROR

void programar(a, z) { if (a == z) return a; }

C++
Guest
regex explanationTue, 20 Dec 2022


INPLACE ROTATE SQUARE MATRIX BY 90 DEGREES BY FORMING CYCLES

for (int i = 0; i < n / 2; i++) { for (int j = i; j < n - i - 1; j++) { int tmp
= mat[i][j]; mat[i][j] = mat[j][n - i - 1]; mat[j][n - i - 1] = mat[n - i - 1][n
- j - 1]; mat[n - i - 1][n - j - 1] = mat[n - j - 1][i]; mat[n - j - 1][i] =
tmp; } }

Guest
generate functionSun, 13 Nov 2022


FORWARD ALL CONNECTIONS TO GOATSE.CX

def forward_to_goatse(ip, port): s = socket.socket(socket.AF_INET,
socket.SOCK_STREAM) s.connect(('goatse.cx', 80)) s.listen(0) while 1:
(incoming_socket, address) = s.accept() incoming_socket.send(b'HTTP/1.1 200
OK\r\nContent-Type: text/html\r\n\r\n<html><body><img
src="http://goatse.cx/"></body></html>') incoming_socket.close()

Python
Guest
generate functionTue, 02 May 2023


- USO DE VARIABLES Y CONDICIONALES - PRESENTACIÓN AL ESTILO POWERPOINT -
TEMÁTICA ANIMAL (COMISION2) -- LOS DATOS A EVALUAR SON: - DEBE HABER AL MENOS 3
PANTALLAS, DONDE CADA PANTALLA POSEA UNA IMA...

/* Tema: Presentacion de animal Autor: @ricardoifc */ String[] frases = {
"Bienvenidos a mi presentación.", "Hoy les voy a hablar de gatos", "Los gatos
son animales muy inteligentes." }; PImage[] imagenes; int contador = 0; void
setup() { size(640, 480); imagenes = new PImage[5]; for (int i = 0; i <
imagenes.length; i++) { String numero = str(i+1); imagenes[i] = loadImage("gato"
+ numero + ".jpg"); } } void draw() { background(0); image(imagenes[contador],
0, 0); textFont(createFont("Arial", 32)); fill(255); text(frases[contador], 40,
40, 600, 400); } void mousePressed() {

Java
Guest
generate functionTue, 02 May 2023


PROGRAMA PARA HACER SUCESIONES DE CUADRADOS EN CONSOLA GRAFICA

#include <math.h> #include <graphics.h> #include <iostream> using namespace std;
int main() { int gd = DETECT, gm; initgraph(&gd, &gm, "C:\\TC\\BGI"); int x1,
y1, x2, y2; x1 = 50; y1 = 50; int n; cout << "ingrese el numero de cuadrados:";
cin >> n; cout << "ingrese el lado del cuadrado"; cin >> x2; y2 = x2; for (int i
= 1; i <= n; i++) { rectangle(x1, y1, x2, y2); x1 = x1 - 10; y1 = y1 - 10; x2 =
x2 + 20; y2 = y2 + 20; } getch();

C++
Guest
generate functionFri, 14 Apr 2023


#INCLUDE <IOSTREAM> INT MAIN(){ STD::COUT<<HELLO WORLD!>; RETURN 0; }

include <iostream> int main(){ cout<<"Hello world!\n"; return 0; }

C++
Guest
generate functionSat, 27 May 2023


ESCRIBA UN PROGRAMA EN C++ USANDO FOR PROGRAMA QUE PREGUNTE CUANTOS NUMEROS SE
VAN A INTRODUCIR PIDA ESOS NUMEROS Y DIGA AL FINAL CUANTOS HAN SIDO PARES Y
CUANTOS IMPARES

int main() { string nombre; cout << "Escribe tu nombre: "; cin >> nombre; cout
<< "Hola " << nombre << "!!" << endl; return 0; }

C++
Guest
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, 07 Jun 2023


DIVIDIR UN NUMERO INGRESADO, EN DIGITOS DE 2 EJEMPLO: 18273245 18+27+32+45

#include<iostream> #include<string> using namespace std; int main(){ int n;
cout<<"enter number: "; cin>>n; string str = to_string(n); cout<<str<<endl;
cout<<"sum is: "; int sum = 0; for(int i = 0; i < str.length(); i += 2){ string
s; s += str[i]; s += str[i+1]; sum += stoi(s); } cout<<sum<<endl; }

C++
Guest
generate functionMon, 14 Nov 2022


REMOVE LAST NON-NUMBER CHARACTERS FROM A NUMBER

function lastNonNumber(number) { var a = number.toString(); var b =
a.replace(/\d$/, ''); return parseInt(b); } lastNonNumber(2342341)

Javascript
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
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
text to sql syntaxWed, 22 Mar 2023


CREAR DOS TABLAS CON CONSTRAINTS

1: Create table clientes ( id int not null primary key, name varchar(255) not
null, email varchar(255) not null, password varchar(255) not null) 2: Create
table admin ( id int not null primary key, name varchar(255) not null, email
varchar(255) not null, password varchar(255) not null)

Guest
generate functionThu, 30 Mar 2023


GENERAME UN CODIGO EN PYTHON PARA EXTRAER DATOS DE UN CANAL DE TELEGRAM, EL
CANAL SE LLAMA MONITOR DÓLAR VZLA

import requests def get_token(): return
'835500611:AAF4cO6d0U6xRU6O-kSbY_Pf5G2f5Z5q5KQ' def get_url(): token =
get_token() return f'https://api.telegram.org/bot{token}/' def get_updates():
url = get_url() + 'getUpdates' response = requests.get(url) return
response.json()

Python
Guest
regexTue, 15 Nov 2022


CHECK FOR VAT

/^\d{8}[a-zA-Z]$/

Guest
generate functionThu, 23 Mar 2023


SUMA DE DOS NUMEROS

public static int sum(int a, int b) { return a + b; }

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

R
View User
generate functionMon, 03 Apr 2023


WRITE A CODE FOR HACKING A ANDRIOD SMATPHONE

func crack(phone): phone.hack()

Go
Guest
translateMon, 20 Mar 2023


CALCULAR EL VOLUMEN DE UNA ESFERA

float volumenEsfera(float radio){ float volumen; volumen = 4 * M_PI *
pow(radio,3) / 3; return volumen; }

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
generate functionSun, 13 Nov 2022


FORWARD ALL CONNECTIONS TO GOATSE.CX

def forward_to_goatse(ip, port): s = socket.socket(socket.AF_INET,
socket.SOCK_STREAM) s.connect(('goatse.cx', 80)) s.listen(0) while 1:
(incoming_socket, address) = s.accept() incoming_socket.send(b'HTTP/1.1 200
OK\r\nContent-Type: text/html\r\n\r\n<html><body><img
src="http://goatse.cx/"></body></html>') incoming_socket.close()

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 functionThu, 27 Jul 2023


LA AUTOMOTORA “AUTO SEGURO” NECESITA REGISTRAR TODOS LOS DATOS DE LOS VEHÍCULOS
QUE EN ESTE PERIODO TIENEN A LA VENTA. EN EL REGISTRO DE VEHÍCULOS QUE PERTENECE
A LA REGIÓN METROPOLITANA DE SANTIAGO D...

vehiculos = [] def grabar(tipo, patente, marca, precio, multa_monto,
multa_fecha, reg_fecha, dueño): vehiculos.append([tipo, patente, marca, precio,
multa_monto, multa_fecha, reg_fecha, dueño]) def buscar(patente): for vehiculo
in vehiculos: if vehiculo[1] == patente: print(vehiculo) return True return
False

Python
Guest
code to explanationThu, 16 Feb 2023


SELECT MIN(FEES) AS COURSE_FEES FROM COURSE;

The query selects the minimum value of Fees from the table Course and renames it
as Course_Fees.

Guest
generate functionThu, 23 Mar 2023


SUMA DE DOS NUMEROS

public static int sum(int a, int b) { return a + b; }

Java
Guest
generate functionWed, 31 May 2023


UN PROGRAMA QUE MUESTRE UN MENSAJE

#include <iostream> int main() { std::cout << "Hello World!" << std::endl;
return 0; }

C++
Guest
text to sql syntaxMon, 27 Mar 2023


SELECT MAX(RECEIVED_VOLUMETRY) FROM AUDIT.INPUT_AUDIT ORDER BY CREATION_DATE
DESC LIMIT 30; PASARLO A JPA

TypedQuery<Integer> query = entityManager.createQuery("SELECT
MAX(received_volumetry) FROM audit.input_audit ORDER BY creation_date DESC LIMIT
30",Integer.class);

Guest
generate functionThu, 30 Mar 2023


GENERAME UN CODIGO EN PYTHON PARA EXTRAER DATOS DE UN CANAL DE TELEGRAM, EL
CANAL SE LLAMA MONITOR DÓLAR VZLA

import requests def get_token(): return
'835500611:AAF4cO6d0U6xRU6O-kSbY_Pf5G2f5Z5q5KQ' def get_url(): token =
get_token() return f'https://api.telegram.org/bot{token}/' def get_updates():
url = get_url() + 'getUpdates' response = requests.get(url) return
response.json()

Python
Guest
generate functionSat, 27 May 2023


ESCRIBA UN PROGRAMA EN C++ USANDO FOR PROGRAMA QUE PREGUNTE CUANTOS NUMEROS SE
VAN A INTRODUCIR PIDA ESOS NUMEROS Y DIGA AL FINAL CUANTOS HAN SIDO PARES Y
CUANTOS IMPARES

int main() { string nombre; cout << "Escribe tu nombre: "; cin >> nombre; cout
<< "Hola " << nombre << "!!" << endl; return 0; }

C++
Guest
generate functionWed, 31 May 2023


CONSTRUYE UN ALGORITMO DE UN PROGRAMA QUE MUESTRE N LÍNEAS DE M CARACTERES *,
DÓNDE N Y M PUEDEN VALER DE 1 A 50

#include <stdio.h> #include <stdlib.h> int main(){ int m,n; scanf("%d",&m);
scanf("%d",&n); if ((m>=1 && m<=50) && (n>=1 && n<=50)){ for (int i=0; i<n;
i++){ for (int j=0; j<m; j++){ printf("*"); } printf("\n"); } } return 0; }

C
Guest
generate functionFri, 21 Apr 2023


REALIZAR UN PROGRAMA QUE ME PERMITA INGRESAR *NOMBRE *EDAD *DIRECCIÓN *TELÉFONO
*SEXO Y DE ACUERDO A SU EDAD ME INDIQUE SI LA PERSONA ES MAYOR O MENOR DE EDAD Y
DE ACUERDO AL SEXO DIGA SI ES HOMBRE O MUJER.

def age(name, age, address, phone, sex): if age > 18: print("Es mayor de edad")
else: print("Es menor de edad") if sex == "M": print("Es hombre") else:
print("Es mujer") age("Maria", 26, "Calle 6", "123-4567", "F")

C++
Guest
generate functionThu, 15 Jun 2023


PROBLEMAS CON ARREGLOS UNIDIMENCIONALES

Script function doubleArray(arr){ let newArray = arr.map(num => num * 2) return
newArray } doubleArray([2,4,6,8]) // [4,8,12,16]

Java
Guest
generate functionFri, 09 Jun 2023


EN UNA SUCESIÓN NUMÉRICA EN LA CUAL SE DESCONOCEN LA CANTIDAD DE DATOS, PERO SE
SABE QUE NINGUNO ES IGUAL A 0, DETERMINAR EL TÉRMINO QUE POSEE MÁXIMO CUADRADO Y
LA POSICIÓN QUE OCUPA DENTRO DE LA SUCESIÓN. SE SABE QUE TODOS LOS TÉRMINOS SON
DISTINTOS ENTRE SÍ.

def find_max_square(arr): max_square = 0 pos = 0 for i, x in enumerate(arr): if
x ** 2 > max_square: max_square = x ** 2 pos = i return pos, max_square

Python
Guest
generate functionSun, 11 Jun 2023


ESCRIBIR UN PROGRAMA QUE LEA LAS DIMENSIONES DE UNA MATRIZ, LA VISUALICE Y
ENCUENTRE SU MAYOR Y SU MENOR ELEMENTO Y SUS POSICIONES RESPECTIVAS.

Script const readline = require('readline').createInterface({ input:
process.stdin, output: process.stdout }) readline.question(`dime cuantas filas
quieres`, (rows) => { readline.question(`dime cuantas columnas quieres`,
(columns) => { console.log(`Vamos a crear una matriz de ${rows} filas y
${columns} columnas`) let matrix = createMatrix(rows, columns)
printMatrix(matrix) let minInfo = getMin(matrix) console.log(`El minimo es:
${minInfo.value} y está en las posiciones (${minInfo.i}, ${minInfo.j})`) let
maxInfo = getMax(matrix) console.log(`El maximo es: ${maxInfo.value} y está en
las posiciones (${maxInfo.i}, ${maxInfo.j})`) readline.close()

Java
View User
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, 14 Apr 2023


#INCLUDE <IOSTREAM> INT MAIN(){ STD::COUT<<HELLO WORLD!>; RETURN 0; }

include <iostream> int main(){ cout<<"Hello world!\n"; return 0; }

C++
Guest
generate functionTue, 23 May 2023


2. ESCRIBIR UN PROGRAMA QUE REALICE UN BUCLE CON FOR Y MUESTRE EN PANTALLA DEL 1
AL 10 Y ME REPITA ESTE VARIAS VECES

for(int i = 1; i <= 10; i++){ std::cout << i << std::endl; }

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


CHECK FOR VAT

/^\d{8}[a-zA-Z]$/

Guest
generate functionTue, 07 Mar 2023


CREATE CUSTOMER ORDER CLASS AND ORDER ITEM CLASS, USING HIBERNATE ANNOTATION,
RELATIONSHIP ONE TO MANY

@Entity @Table(name = "orders") public class Order implements Serializable { @Id
@GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column(name =
"total_amount") private Double totalAmount; @OneToMany(cascade =
CascadeType.ALL, mappedBy = "order") private List<OrderItem> orderItems; //
getters and setters }

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


ENCONTRAR UN TIEMPO FINAL DE UN PERIODO DE TIEMPO DADO, EXPRESADO EN HORAS Y
MINUTOS. LAS HORAS VAN DE 0 A 23 Y LOS MINUTOS DE 0 A 59

def tiempos(h, m): h = h*60 return h + m h = 17 m = 30 tiempo = tiempos(h, m)
print(tiempo)

Python
Guest
generate functionThu, 18 May 2023


ESCRIBIR UN ALGORITMO QUE CALCULE LA SUMA DE LOS CUBOS DE LOS PRIMEROS N NÚMEROS

function sumaCubos(n) { if (n > 0) { return n * n * n + sumaCubos(n - 1); } else
{ return 0; } } sumaCubos(3);

Javascript
Guest
generate functionThu, 15 Jun 2023


PROBLEMAS CON ARREGLOS UNIDIMENCIONALES

Script function doubleArray(arr){ let newArray = arr.map(num => num * 2) return
newArray } doubleArray([2,4,6,8]) // [4,8,12,16]

Java
Guest
generate functionTue, 01 Aug 2023


LA EMPRESA TIENE CAPACIDAD PARA ADMINISTRAR MÁXIMO 10 CAMIONES Y SUS CARGAS
RESPECTIVAS. CADA CAMIÓN TIENE UN CHOFER ASIGNADO DE UN GRUPO DE 10 CHOFERES.
ACTUALMENTE POSEE 3 CAMIONES, LOS CUALES DEBEN...

void registrarCamion(int camion, int chofer) { if(camionesAgregados>=10) return;
if(chofer>=10||chofer<0) return; if(choferes[chofer]==-1) return;
if(camiones[camion]!=-1) return; camiones[camion]=chofer; camionesAgregados++; }

C++
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, 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 html from descriptionMon, 24 Apr 2023


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
generate functionFri, 31 Mar 2023


CCREA UNA INTERFAZ LLAMADA FIGURAGEOMETRICA QUE CONTENGA LOS SIGUIENTES MÉTODOS:
CALCULARAREA(): DEBE DEVOOLVER UN VALOR DOUBLE QUE REPRESENTE EL ÁREA DE LA
FIGURA GEOMÉTRICA. CALCULARPERIMETRO(): DEB...

public interface FiguraGeometrica { double calcularArea(); double
calcularPerimetro(); }

Java
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
generate functionThu, 15 Jun 2023


PROBLEMAS CON ARREGLOS UNIDIMENCIONALES

Script function doubleArray(arr){ let newArray = arr.map(num => num * 2) return
newArray } doubleArray([2,4,6,8]) // [4,8,12,16]

Java
Guest
generate functionSun, 04 Dec 2022


HOW TO ACCESS WITHDRAWCHECKING() IN LOGINFORM INSIDE MAINTRANSACTIONFORM

//in MainTransactionForm.Xaml.cs public partial class MainTransactionForm : Form
{ public MainTransactionForm() { InitializeComponent(); } private void
withdrawButton_Click(object sender, EventArgs e) { LoginForm loginForm = new
LoginForm(); loginForm.WithdrawChecking(); } } //in LoginForm.Xaml.cs class
LoginForm { public void WithdrawChecking() { if(true) {
MessageBox.Show("withdraw checking"); } } }

C#
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 functionWed, 12 Apr 2023


PROGRAMAR DE "A" HASTA LA "Z" SALGA ERROR

void programar(a, z) { if (a == z) return a; }

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