Questions tagged [user-input]

User Input is data that the user inputs into the program. It generally takes the form of a String, but may also be an integer, floating-point number, etc.

5580 questions
1
vote
1 answer

Finding minimum and maximums in python without lists

So I need to write a code to find the minimum and maximum number from a set of integers inputted by a user but I am not allowed to use lists. This is what my code looks like so far. sum = 0 counter = 0 done = False while not done: …
kndillon
  • 13
  • 2
1
vote
1 answer

User input in DataTable used for recalculation and update of column in Shiny

I want to create a web app, which allows user to enter input in numericInput object, which is embedded in DataTable and recalculates result (multiplication of column with some static values and a user input column) in another column. I believe that…
gaspers
  • 77
  • 11
1
vote
2 answers

Limit user input in Windows batch script with predefined symbols only

I've written the following windows batch script for WinPE to make some tasks easier: @ECHO OFF CLS :MENU SETLOCAL SET QUIT=FALSE SET /P INPUTCHOICES=Type 1, 2, 3 or 4 and press ENTER: CALL :EXECUTECHOICES %INPUTCHOICES% ENDLOCAL GOTO…
YKKY
  • 605
  • 1
  • 6
  • 18
1
vote
3 answers

Selecting a date on a mobile web site

I'm working on a web site that includes creating appointments on the mobile site. I have to make it work on IE Mobile. The biggest challenge is to come up with a way to do date selection on a mobile site that: Is compact enough to not take forever…
Dan Herbert
  • 99,428
  • 48
  • 189
  • 219
1
vote
1 answer

Going to the end of user input in assembly

This is homework and i need to convert 64-bit (20 char user input). decimal to hex my first step is converting the char to decimal, so I need to convert the ASCII input from user input to decimal. How do I move and grab the last value of a string…
DeCastroAj
  • 30
  • 7
1
vote
3 answers

check if user has not touched the screen

I have to check if user did touch the screen.And perform some task if the application was idle for a time duration. I know that how to use the TouchBegin and touchEnd method but my project is large and some objects are not responding to these…
Kumar sonu
  • 535
  • 11
  • 24
1
vote
2 answers

Counting Number Of User Input in C Program

printf("Enter number of patients:"); int numberOfInputs = scanf("%d", &patients); if (numberOfInputs != 1) { printf("ERROR: Wrong number of arguments. Please enter one argument d.\n"); } I am asking the user to input one number as an argument,…
annie
  • 23
  • 1
  • 4
1
vote
5 answers

When user presses "enter" key or space enter then error message pops up

I would like to print an error message when the user presses enter or space enter instead of a string. I have tried isEquals("") and isEmpty() but haven't found anything that works yet. Here's my code: import java.util.Scanner; public class…
1
vote
3 answers

Javascript form input value comparison to input max

I have a
where I'm trying to compare the value and the max of an input so that if the value exceeds the max I'd apply different styling to the input (like a red border). Suppose I have an input like this:
Clint_A
  • 518
  • 2
  • 11
  • 35
1
vote
1 answer

Here's my code. I am trying to get user input of integers, go through a function utilizing map and returning a list of cubed results

I am using Python 3 vals = int(input("Enter comma separated numbers")) def cube(nums): return nums**3 print(list(map(cube,vals))) I get this error when I input 2,3 #Traceback (most recent call last): File…
Ruben G
  • 23
  • 2
1
vote
3 answers

Not pre defined input or wrong input in " input to switch"

How to set massage when input is different than number to not provide error "Exception in thread "main" java.util.InputMismatchException" ? I have to use if/else statement or what ? Please help my in my poor java :) public static void main(String[]…
1
vote
3 answers

Calling a method from user input in JAVA

I'm looking for a way to call any given method in my class without having to do the whole try-catch statement. EXAMPLE: public void Worker(String handle) throws Exception { if(PROTOCOL.contains(handle)) { …
1nn15
  • 13
  • 1
  • 3
1
vote
1 answer

Assign value from a Tkinter Entry to a Python variable

I am currently learning python and have hit a roadblock. I started in java and enjoyed the use of JOptionPane for input dialogs, and using those dialogs to assign values to variables and parsing them from there. In python I've noticed people use…
Brendan H
  • 21
  • 1
  • 2
1
vote
3 answers

How to pass urls as user input to invoke through Selenium and Python?

Every time I run my script I want it to ask me what is the targeted url using input() so it can store it as a variable and use it in a function but every time I input the url the script won't continue and pressing enter causes it to open the url on…
1
vote
1 answer

Swift JSON data input from file and decoding

I have a JSON decoder but have a couple of questions. Firstly, what is the difference between what I am doing and using the JSONSerialization function? My next question is about files and JSON. How do I go about getting a user defined file to pipe…
PKconversion
  • 71
  • 1
  • 7