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.
Questions tagged [user-input]
5580 questions
1
vote
1 answer
How to predict lm model based on variable selected from a drop down in Shiny App?
I am trying to build a Shiny app that allows the user to predict (lm) an outcome based being able to select the input feature (dataset column) from a dropdown menu.
The problem is I can't find a way to set the input variable into the prediction…

Tsunamimor
- 21
- 1
- 2
1
vote
3 answers
How do I safely scan in an integer in a while loop?
I want to scan in an integer and put it in a while loop so that if an invalid entry is entered the program will ask to enter another integer but when I run this it won't allow me to enter and new integer and just prints invalid entry multiple…

Dawson Chung
- 11
- 1
1
vote
1 answer
WordPress User Registration with Custom Fields
I am currently working on a WordPress website in which it is optional for a user to create an account and save their information via Gravity Forms. (Address, billing address, phone number, email, and name.) This information is then supposed to be…

DcssTesting
- 13
- 3
1
vote
2 answers
Change user console input as they type in C
I am writing a C program which takes user input. The user input requires some special characters which I want the reserve special keys on the keyboard for.
To keep it simple, suppose I want any occurrence of the symbol \ to be replaced with λ. So…

Luke Collins
- 1,433
- 3
- 18
- 36
1
vote
1 answer
How to get a piecewise linear function in MATLAB GUI
I want to implement a GUI in MATLAB 2010a that user be able to input a Piecewise linear function interactively (add/remove points by click and move point by drag and drop). Here is an implementation in C#.
I am hope there is an similar…

Isaac
- 2,332
- 6
- 33
- 59
1
vote
2 answers
Storing user input in array not starting from 0
My problem is that in my code below, in OPTION 2, if the user Store = 1 and the item details overwrites the item[0] with the new details. I want it to store in item[7] and not to overwrite the current information. The Item is found in constructor…

Rohan
- 17
- 5
1
vote
1 answer
securely executing untrusted python code on server
I have a server and a front end, I would like to get python code from the user in the front end and execute it securely on the backend.
I read this article explaining the problematic aspect of each approach - eg pypl sandbox, docker etc.
I can…

thebeancounter
- 4,261
- 8
- 61
- 109
1
vote
2 answers
Treat enter key as invalid in scanner validation
I have this code...
import java.util.*;
public class SwitchExample {
public static void main(String[] args) {
System.out.print("Enter ID: ");
Scanner scanner = new Scanner(System.in);
while (!scanner.hasNextInt()) {
…

Harry
- 21
- 4
1
vote
1 answer
How to quit scanner when input is negative?
This is the instructions.
Write a program that reads a sequence of input values and displays a bar chart of the values using asterisks. You may assume that all values are positive. First figure out the maximum value. That's value's bar should be…

CateDoge
- 55
- 1
- 8
1
vote
2 answers
Continue iterating/repeating while loop until enter (or arbitrary key) is pressed
I'm trying to get a while loop to iterate until a key, ideally enter, is pressed.
Specifically, what I want is for a value to continually update and be visible to the user until he presses enter.
Here is the basic code I'm working with, which…

GeneralPancake
- 535
- 2
- 6
- 15
1
vote
1 answer
Very basic function with parameter
I'm very new to Python and an absolute beginner in functions. I tried to search for the answer but I haven't found it, although I'm sure it's trivial. I want to define a function with a parameter as input. Then I want to call the function, where the…

Mathbeginner
- 201
- 1
- 8
1
vote
4 answers
Read list of doubles separated by spaces (or some other delimiter) repeatedly and for different purposes
I am very much new into C++ and I ran into the following problem.
My goal:
I want to have a code which does the following:
The user enters a line containing doubles separated somehow
The doubles are being parsed into an array of doubles
A…

Dror
- 12,174
- 21
- 90
- 160
1
vote
3 answers
Search and replace string inside .txt file with user input
Background: I am trying to automate some parts of a work process. Manual steps I take: I get a ticket to change an ID inside a text file. I have to go through a network shared folder, create a backup of the file, push the copied file into an…

ZookiePookie
- 29
- 7
1
vote
0 answers
wait for a kivy button press during a for loop
ive got all the data i need to show on this screen within this for loop however its just looping to the end ive been researching how to add a user input for the end of this for loop but i cant seem to find anything on it all while using kivy i need…

36Boxes
- 53
- 7
1
vote
1 answer
Which one is the acceptable convention for undo / redo behavior?
Suppose this is a mathematical application that manipulates waveforms. User opens a waveform file, and edits it.
Now user amplifies waveform using the application toolbox. Amplification may take a long time. Then they undo it. And then they redo it…

Ali Tavakol
- 405
- 3
- 11