Mini java chatbot

I am new to Java and trying to make a simple mini chatbot, that answers to 3 questions with user input and if/else statement. I do not know if I am correct, but I got this far: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Hello… Read More Mini java chatbot

Javascript, convert inline html js to normal js

So I have this input tag: <input … onkeypress="return /^[A-Za-z0-9 -]*$/.test(event.key) id="id_title"> And I want it to accept only numbers, letters and spaces. I wonder how to rewrite it in my js file with jquery in modern js version, because all methods from the Internet with old js are crossed out. Like in here, https://www.codegrepper.com/code-examples/javascript/allow+only+letters+in+input+javascript&hellip; Read More Javascript, convert inline html js to normal js

message = 'Hello ${name}' doesn't replace the name parameter in the message string immediately

I cannot make working the basic typescript feature that I see written everywhere over the Internet, that says that : var a = "Bob" var message = ‘Hello ${a}’ would see a console.log(message) print "Hello Bob". When I attempt this: import { Component } from ‘@angular/core’; import { environment } from ‘../environments/environment’; @Component({ selector: ‘app-root’,… Read More message = 'Hello ${name}' doesn't replace the name parameter in the message string immediately

How to associate label with checkbox but not using "for=id"

i have this code: <li><input type="checkbox" id="checkboxThree" value="Alergia3" ><label for="checkboxThree">Alergia 1</label></li> <li><input type="checkbox" id="checkboxFour" value="Alergia4"><label for="checkboxFour">Alergia 1</label></li> <li><input type="checkbox" id="checkboxFive" value="Alergia5"><label for="checkboxFive">Alergia 1</label></li> <li><input type="checkbox" id="checkboxSix" value="Alergia6" ><label for="checkboxSix">Alergia 1</label></li> But I don’t want to use "id" and "for" because I have to do other thing later and I can’t use them. I have see… Read More How to associate label with checkbox but not using "for=id"