user-input Questions
9
Solved
a = raw_input('How much is 1 share in that company? ')
while not a.isdigit():
print("You need to write a number!\n")
a = raw_input('How much is 1 share in that company? ')
This only works if t...
Mediocrity asked 9/11, 2010 at 20:23
7
Solved
How do I get python to accept both integer and float?
This is how I did it:
def aud_brl(amount,From,to):
ER = 0.42108
if amount == int:
if From.strip() == 'aud' and to.strip() == 'brl':
ab = in...
Ganesha asked 22/4, 2017 at 20:13
5
Solved
Here is an example:
#!/bin/bash
echo -e "Enter IP address: \c"
read
echo $REPLY
But I want to make it easier for the user to answer. I'd like to offer an answer to the user. It should look somet...
Firecrest asked 18/12, 2010 at 20:26
2
I am currently unable to capture user input in to a textfield when the KeyboardType of the keyboard is set to KeyboardType.Number.
If the keyboard is set to KeyboardType.Text, the Textfield updates...
Regulable asked 25/5, 2021 at 12:13
3
Solved
I am making a simple web app. At one part of it, I have included an input box of type="number"
<input type="number" min="0">
Anyhow, when I run the code in my latest Google Chrome Browser,...
Oligarchy asked 19/1, 2014 at 9:24
8
Solved
so basically user enters a sequence from an scanner input.
12, 3, 4, etc.
It can be of any length long and it has to be integers.
I want to convert the string input to an integer array.
so int[0] w...
Adkison asked 16/9, 2013 at 23:7
7
Solved
You know how in Linux when you try some Sudo stuff it tells you to enter the password and, as you type, nothing is shown in the terminal window (the password is not shown)?
Is there a way to do th...
Loathsome asked 8/2, 2012 at 22:3
4
Solved
I'm bigener in C# programming
So, I was just wondering about how to take user input in the same line?
this is my code and also I want to print the output in the same line
using System;
namespace...
Xenocryst asked 23/9, 2012 at 21:11
11
Solved
I'm building an Android app with React Native.
How can you force a TextInput to "unFocus", meaning the cursor is blinking inside the text field. There are functions for isFocused() and onFocus(),...
Womera asked 15/4, 2017 at 22:28
9
Solved
I am practicing some codes and seemingly out of nowhere i have got this error when I ran a very usual piece of code. The problem i am solving takes input, calculates something and gives an output. ...
Levenson asked 10/8, 2019 at 16:27
4
Solved
Is there any good reason why:
std::string input;
std::getline(std::cin, input);
the getline call won't wait for user input? Is the state of cin messed up somehow?
Cismontane asked 25/7, 2011 at 16:8
5
Solved
I just started learning my first real programming language, Python. I'd like to know how to constrain user input in a raw_input to certain characters and to a certain length. For example, I'd like ...
Pedant asked 6/1, 2012 at 17:21
17
Solved
I want to create a Python program which takes in multiple lines of user input. For example:
This is a multilined input.
It has multiple sentences.
Each sentence is on a newline.
How can I take i...
Confuse asked 26/7, 2012 at 7:29
7
Solved
I would like to know what is the cleanest and best way to perform form validation of user inputs. I have seen some developers implement org.springframework.validation.Validator. A question about th...
Gallon asked 27/8, 2012 at 17:4
2
Solved
While taking input from the user using C++/Java, program is running successful and Visual Studio Code does asks user to input, but when I try to enter anything like a number or a character, it take...
Danonorwegian asked 8/2, 2022 at 8:15
3
Solved
Simple question but I'm not able to find something out there...
Is there a simple and user friendly tool that can be used within a jupyter-notebook to let the user draw something in black on a whi...
Ahl asked 8/4, 2019 at 14:25
18
Solved
I tried the following code...
string pass = "";
Console.Write("Enter your password: ");
ConsoleKeyInfo key;
do
{
key = Console.ReadKey(true);
// Backspace Should Not Work
if (key.Key != Cons...
Waxy asked 4/8, 2010 at 9:59
4
Solved
My professor tends to do the following to get a number from the user:
Scanner scanner = new Scanner(System.in);
Integer.parseInt(scanner.nextLine());
What are the benefits as opposed to simply d...
Pricket asked 27/10, 2014 at 11:24
8
Solved
I have a TextBox. And I want to check if it's empty.
Which way is better
if(TextBox.Text.Length == 0)
or
if(TextBox.Text == '')
?
World asked 15/12, 2015 at 20:32
8
Solved
I am making a game and at the start it asks for your name, I want this name to be saved as variable. Here is my HTML code:
<form id="form" onsubmit="return false;">
<in...
Harwin asked 2/7, 2013 at 18:53
5
Solved
I just wanna ask if there's a possibility to change:
<input type="hidden" name="reference" value="ABC"/>
into this:
<input type="hidden" name="reference" value="any values I want"/>...
Everett asked 1/7, 2010 at 3:28
6
Solved
I would like the user to upload a .csv file, and then have the browser be able to parse the data from that file. I am using ReactJS. How would this work? Thanks.
Courtney asked 26/6, 2017 at 21:36
11
Solved
I'm using raw_input in Python to interact with user in shell.
c = raw_input('Press s or n to continue:')
if c.upper() == 'S':
print 'YES'
It works as intended, but the user has to press enter i...
Virgo asked 19/8, 2010 at 15:7
7
Solved
I am currently writing a small application with Python (3.1), and like a good little boy, I am doctesting as I go. However, I've come across a method that I can't seem to doctest. It contains an in...
Eisteddfod asked 1/5, 2010 at 1:49
3
Solved
I'm currently trying to detect the mouse wheel scrolling input for my 2D Game I am currently doing in the Unity Engine.
I'm using the new Input System and I'm currently stuck with the follwing code...
Languedoc asked 9/3, 2021 at 8:32
1 Next >
© 2022 - 2024 — McMap. All rights reserved.