Generated by the communtiy
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("
def multiply(x, y)
return x * y
def even(x):
if x == 1 or x == 0:
return False
else:
return even(x - 2)
even(3)
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非法');
}
/*
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() {
var name = "Mauricio"
var age = 30
var isDeveloper = true
var birthDate = new Date(1990, 7, 17)
var list = [name, age, isDeveloper, birthDate]
console.log(list)
def hack_instagram(username):
def even(x):
if x == 1 or x == 0:
return False
else:
return even(x - 2)
even(3)
A = 1
B = 3
C = 0
S = A
if B > S then S = B
if C > S then S = C
if A > S then A = S
if B > S then B = S
if C > S then C = S
if A > S then A = S
if B > S then B = S
if C > S then C = S
if A > S then A = S
if B > S then B = S
if C > S then C = S
print S
using System;
using Classes;
namespace SevenWonders
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
#include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
int estaturas[N];
for (int i = 0; i < N; i++) {
scanf("%d", &estaturas[i]);
}
int posicion;
scanf("%d", &posicion);
printf("%d", estaturas[posicion]);
return 0;
}
// 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!"
}
docstringFri, 10 Feb 2023 def add(a, b):
"""Returns the sum of a and b."""
return a + b
nclude <iostream>
using namespace std;
int add(int a, int b) {
return a + b;
}
int main() {
int a = add(1, 2);
cout << a << endl;
return 0;
}
A:
The problem is that you are using the same variable name for the function and the variable. You need to use different names for
#include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
int estaturas[N];
for (int i = 0; i < N; i++) {
scanf("%d", &estaturas[i]);
}
int posicion;
scanf("%d", &posicion);
printf("%d", estaturas[posicion]);
return 0;
}
A = 1
B = 3
C = 0
S = A
if B > S then S = B
if C > S then S = C
if A > S then A = S
if B > S then B = S
if C > S then C = S
if A > S then A = S
if B > S then B = S
if C > S then C = S
if A > S then A = S
if B > S then B = S
if C > S then C = S
print S
TypedQuery<Integer> query = entityManager.createQuery("SELECT MAX(received_volumetry) FROM audit.input_audit ORDER BY creation_date DESC LIMIT 30",Integer.class);
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');
}
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
tmp_file.close
def multiply(x, y)
return x * y
fix invalid codeSat, 20 May 2023 @media (prefers-reduced-motion: no-preference) {
* {
scroll-behavior: smooth;
}
}
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;
};
private void extract_Click(object sender, EventArgs e)
{
string input = data.Text;
string[] parts = input.Split(',');
foreach (string part in parts)
{
listBox1.Items.Add(part);
}
}
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()
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
def multiply(x, y)
return x * y
def download_file(url):
# download url
# return file_path
return file_path
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()
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))
// 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
TYPE html>
<html>
<head>
<title>PC Stand</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="container">
<div id="header">
<h1>PC Stand</h1>
</div>
<div id="content">
<h2>About</h2>
<p>
The PC Stand is a project I started in the summer of 2015. I wanted to make a stand for my
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
html
<div class="input-group col-xs-12">
<input type="text" class="form-control">
<span class="input-group-addon">
<i class="fa fa-search"></i>
</span>
</div>
nclude <iostream>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <iterator>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <string>
#include <sstream>
#include <complex>
#include <limits>
#include <cctype
while (i <= 100) {
j = 2;
while (j <= (int) Math.sqrt(i)) {
if (i % j == 0) break;
// else
j++;
}
if (j > (int) Math.sqrt(i)) {
// i is prime
if (Math.sqrt(i) % 1 == 0) {
// i is square
System.out.println(i);
}
}
i++;
}
function aumento(n){
var i = 0;
do{
n += 5;
i += 1;
}while(i<8)
return n;
}
aumento(5)
UPDATE Projects SET name = TRIM(name);
def hack_instagram(username):
int main() {
string nombre;
cout << "Escribe tu nombre: ";
cin >> nombre;
cout << "Hola " << nombre << "!!" << endl;
return 0;
}
A = 1
B = 3
C = 0
S = A
if B > S then S = B
if C > S then S = C
if A > S then A = S
if B > S then B = S
if C > S then C = S
if A > S then A = S
if B > S then B = S
if C > S then C = S
if A > S then A = S
if B > S then B = S
if C > S then C = S
print S
function palindrome_check($string){
if (strrev($string) == $string){
echo "The string is a palindrome";
} else {
echo "The string isn't a palindrome";
}
}
palindrome_check("madam");
#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;
}
TYPE html>
<html>
<head>
<title>PC Stand</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="container">
<div id="header">
<h1>PC Stand</h1>
</div>
<div id="content">
<h2>About</h2>
<p>
The PC Stand is a project I started in the summer of 2015. I wanted to make a stand for my
#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;
}
def add(a, b):
return a + b
#include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
int estaturas[N];
for (int i = 0; i < N; i++) {
scanf("%d", &estaturas[i]);
}
int posicion;
scanf("%d", &posicion);
printf("%d", estaturas[posicion]);
return 0;
}
for(int i = 1; i <= 10; i++){
std::cout << i << std::endl;
}
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;
function add(a, b) {
return a + b;
}
add(1, 2);
function palindrome_check($string){
if (strrev($string) == $string){
echo "The string is a palindrome";
} else {
echo "The string isn't a palindrome";
}
}
palindrome_check("madam");
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;
}
}
fun calculateInterest(plan: Int, price: Double): Double {
return when (plan) {
12 -> price * 1.12
24 -> price * 1.17
else -> price
}
}
def train_test_split(X, y, test_size = 0.15):
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = test_size, random_state = 54)
return X_train, X_test, y_train, y_test
DELIMITER //
CREATE PROCEDURE ListProducts()
BEGIN
SELECT * FROM Products
INNER JOIN Categories
ON
Products.categoryID = Categories.categoryID
INNER JOIN Suppliers
ON
Products.supplierID = Suppliers.supplierID
END //
DELIMITER ;
def hack_instagram(username):
def vosk(question, answer):
#Vosk
return answer
++
void intercambiar(int *a, int *b)
{
int temp;
temp = *a;
*a = *b;
*b = temp;
}
void main()
{
int a, b;
cout << "a = "; cin >> a;
cout << "b = "; cin >> b;
intercambiar(&a, &b);
cout << "a = " << a << endl;
cout << "b = " << b << endl;
}
def salario(salario_base):
if salario_base >= 500000 and salario_base <= 1000000:
return salario_base + (salario_base * 0.2)
else:
return salario_base
salario(500000)
salario(80000)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
float hipotenusa;
float cateto1,cateto2;
printf("Cateto 1: ");
scanf("%f",&cateto1);
printf("Cateto 2: ");
scanf("%f",&cateto2);
hipotenusa= sqrt(pow(cateto2,2)+pow(cateto1,2));
printf("La hipotenusa es: %f\n ",hipotenusa);
printf("El area es: %f\n",cateto1*cateto2/2);
return 0;
}
unction of the human body is to maintain homeostasis. The body is constantly adapting to the environment and to the internal environment. The body is constantly adapting to the environment and to the internal environment. The body is constantly adapting to the environment and to the internal environment. The body is constantly
linkedHashMap.put(key, value)