Top "User-input" questions

User Input is data that the user inputs into the program.

Integer.parseInt(scanner.nextLine()) vs scanner.nextInt()

My professor tends to do the following to get a number from the user: Scanner scanner = new Scanner(System.in); …

java performance integer java.util.scanner user-input
In a bash script, how do I sanitize user input?

I'm looking for the best way to take a simple input: echo -n "Enter a string here: " read -e STRING …

bash shell user-input sanitization
Handle spaces in argparse input

Using python and argparse, the user could input a file name with -d as the flag. parser.add_argument("-d", "…

python command-line-arguments user-input argparse spaces
Use Javascript to change which submit is activated on enter key press

I have a form on an HTML page with multiple submit buttons that perform different actions. However, when the user …

javascript html webforms submit user-input
How to convert user input to string in python 2.7

When I enter username = str(input("Username:")) password = str(input("Password:")) and after running the program, I fill in the …

python string python-2.7 user-input nameerror
How do I drop a pin with MapKit?

I would like to allow the user of my app to pick a location in the map. The native map …

iphone google-maps mkmapview user-input mkannotation
Javascript to clear form field on button click

I have a field called 'inputaddress' which a user types address details into, so they can perform a google map …

javascript google-maps-api-3 user-input textinput
HTML/ASP.NET: <input type="hidden" name="reference" value="ABC"/>

I just wanna ask if there's a possibility to change: <input type="hidden" name="reference" value="ABC"/> into …

asp.net html dynamic-data user-input payment-processing
How can I use powershell's read-host function to accept a password for an external service?

I have a script I'm writing that makes a connection to a SOAP service. After the connection is made, I …

powershell powershell-2.0 user-input securestring
What is the fastest way to determine a key press and key holding in Win32?

What is the fastest way to determine a key press and also how to determine if a key is being …

c++ winapi input keyboard user-input