Questions tagged [input]

11109 questions
1

votes
1

answer
118

Views

Set default directive for all input in app

I use mat-form-field with custom css in order to change the be look like appearance='outline' directive. In Angular Material v 7.2.1 appearance='outline' was added to the mat-form-field options. How can I declare appearance='outline' as a default for each input fields in my app?
Stack Overflow
1

votes
1

answer
103

Views

How to enable/disable inputs in blazor

I am trying to Enable/Disable a group of time inputs in Blazor based on a checkbox ; while for inputs of type button the below solution works ,for inputs of type time it doesn't : Solution for button input that works [Parameter] public bool state{get;set;} public string SetButton() { string resul...
Bercovici Adrian
1

votes
3

answer
47

Views

The specified value “undefined” is not a valid number

I´m learning for an exam which is about company inventories. I thought i could do myself a favor and learn something new about coding while learning for this exams. Normally i only do frontend with very little javascript at my company. What i´m trying to do is setting up a table with 2 input rows....
Jurijcorn
1

votes
3

answer
35

Views

How to find average, maximum, and minimum numbers of a list from user input in HTML

I'm trying to make a code that will evaluate numbers in a list from user input and will calculate the sum, average, minimum, and maximum of that list. I have already gotten the sum part from help from others. I can't seem to find how to get the maximum and minimum numbers from the list. Im trying to...
Max Muchnick
1

votes
2

answer
139

Views

Clilcking on a button is giving a Bad Path error

I'm trying to make a pen which incorporates the javascript exercises I'm learning. Here is the Pen: https://codepen.io/ychalfari/pen/JVYoNW In this specific case I'm trying to accept an array from an input and run a function which sums the array when you click the button, and the result should show...
Yitz Chalfari
1

votes
1

answer
45

Views

Jupyter notebook: let a user inputs a drawing

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 white space (let say of size (x,y) pixels) after running a cell? The drawing has to be returned (or even te...
s.k
1

votes
2

answer
35

Views

Multiple data in one user input

I am having a trouble with multiple numbers in one user input. The idea is to multiply each user`s number with a predetermined one. Does it even possible to loop through? in1 = input('Enter ') in2 = 10 def count(): s = [x*in2 for x in in1] print(s) count() With input like this '5 5 5' terminal gave...
Dmitri_V
1

votes
5

answer
21

Views

How to evaluate a string input and check if it is a decimal

I use python 3 and am trying to figure out how to evaluate a user input string and check for certain characters. I know that this title is probably going to make it sound like I haven't heard of the .isdecimal() method, but in fact I am trying to allow for a user to input some number as a decimal, i...
JWilliams12117
0

votes
2

answer
23

Views

In Python, how do I read an input file to then translate it to morse code?

I have to create a program that asks the user for an input file, and then creates an output file containing the message encoded in Morse code. When I run my program, there's a type error in the 'translated += alphabet[words]' line, it says it's an unhashable type: 'list'. How can I translate the tex...
user11407982
-1

votes
0

answer
23

Views

The input function gives me a SyntaxError

I'm coding a chat server and to send message the client has to use the 'input()' function, but when i'm running my script on my console (i'm using ubuntu) it gives me a SyntaxError or a NameError (depending on what i'm typing', if i'm typing hey it says there is a SYntaxError, I've already read a po...
LightninWolf
0

votes
0

answer
25

Views

How can I edit the value of the timepicker from the keyboard?

I have a material-ui-time-picker and I want to control this input, it works well, but I want to edit the time input from the keyboard and not when I click the input on the clock. My code is : import React, { Component } from 'react'; import { TimePicker } from 'material-ui-time-picker'; import { In...
CodeLover
3

votes
4

answer
99

Views

How to create a “type along” style interface?

I'm talking about something like this: The image is just an example, I simply need the user to type a certain text letter by letter. I tried it with an overlaying TextViewon an EditText, but it looks really ugly: My next attempt would be to use Spannables to turn the overlaying text the same colo...
Big_Chair
1

votes
1

answer
28

Views

Validation input field Fullname(Firstname,Lastname) - JavaScript

Need validation for full name(first name/last name - 1 input field). I`m new in this sphere and can't formulate the right syntaxis..maybe will work with a regular expression too... function validateForm() { var name= document.getElementById('name').value; var x = name.indexOf(' '); var fname = name....
Todor Markov
1

votes
3

answer
808

Views

How to take multiple multiline input variables in Python?

Is it possible to take multiple newline inputs into multiple variables & declare them as int all at once? To explain further what I am trying to accomplish, I know this is how we take space separated input using map: >>> a, b = map(int, input().split()) 3 5 >>> a 3 >>> b 5 Is there an equivalent for...
deppfx
1

votes
4

answer
78

Views

Java programming: How do I make this for loop program that accepts user input subtract the input properly?

I am making a program that accepts user input to subtract all the numbers desired by the user I first made the program ask how many numbers the user wants to subtract, and initialized the value in int inputNum, which is then passed on to the for loop for (int Count=1; Count
Cookie_Dev
1

votes
2

answer
27

Views

Hey! How can i solve my code which apparently isnt properly taking .key property from KeyboardEvent from browser?

KeyboardEvent has its 'predefined' value = .key depending of what key you press on keyboard but even when mine console says that i clicked certain key i cannot 'define' key value.... i tried googling solutions & defining key value on its own but nothing worked im a bit clueless at this point let can...
Michal Platko
1

votes
1

answer
33

Views

Process never ends when using 'process.stdin.once'

In my node script, I am waiting for the user to press enter at some point: console.log('Press enter to continue...'); await new Promise(function(resolve, reject) { process.stdin.once('data', function(data) { resolve(); }); }); The script runs fine, and continues only after the user has pressed enter...
goodvibration
1

votes
4

answer
48

Views

Python - If Statement With input() Not Functioning Inside def() Function

Everything in the code runs properly except def a() and def b() have and if statements that examine and input function though when I run the code it will lead to 'good for you' being printed no matter the input. For instance if I type False or Whatever into the code which should lead to different re...
Mr. Tenderoni
1

votes
1

answer
134

Views

CreateProcess , WaitForSingleObject , Disable Input on Calling Application

I'm calling another Program which only displays a webpage like this : Problem : if I Create a Process with the Button , and while the Created Process is open , I click on a Checkbox on the calling form , I close the created process the Checkbox is checked . I tried to use the DisableTaskWindows(0)...
user1937012
1

votes
2

answer
69

Views

C++: Not receiving expected output

I'm trying to examine a C++ code from my tutorial book. I've written this using CodeBlocks IDE: #include #include #include #include #include /*...*/ using namespace std; /*...*/ int main (void){ cout > _sInput >> _intInput; cout
Vynylyn
0

votes
0

answer
4

Views

Problem opening file from user input in MIPS assembly

I'm implementing a assembly routine that gets a absolute path (/home/user/file) from a user input and uses that path to open a file and read its content. I've tried the following 3 routines: .data buffer: .space 128 openfileErrorWarning: .asciiz 'Error' .text read_filepath: li $v0, 8...
D Venzi
1

votes
2

answer
28

Views

How to fetch default value from an input into a servlet?

I have an input type which has a default value. I want to fetch its value inside of a servlet. So, which method will work in this case? I tried using request.getParameter('FLC1'), but that didn't work as well. Following is the input code:- Thank you
1

votes
4

answer
1.8k

Views

Why doesn't scanf() take inputs from the user while dealing with strings?

My code is as follows typedef struct { char name[15]; char country[10]; }place_t; int main() { int d; char c; place_t place; printf('\nEnter the place name : '); scanf('%s',place.name); printf('\nEnter the coutry name : '); scanf('%s',place.country); printf('\nEnter the type of the place : Metropo...
Dinesh
1

votes
1

answer
1.8k

Views

How to init text input for Arabic / Persian keyboard?

I'm trying to make a text input that change keyboard type from English to Persian / Arabic , totally is any solution for type on to the text input without hit ctrl + shift to change keyboard type with javascript or css ?
bizzr3
1

votes
4

answer
303

Views

BufferedReader input gives unexpected result

When I run the following code and type 50 when prompted for input: private static int nPeople; public static void main(String[] args) { nPeople = 0; System.out.println('Please enter the amount of people that will go onto the platform : '); BufferedReader keyboard = new BufferedReader(new InputStream...
DSF
0

votes
0

answer
13

Views

How to use keyboard and mouse input to navigate a figure

I'm working on a project involving viewing a 3D from different viewpoints using mouse and keyboard input. When I submitted my first draft, I received the following feedback: 'Your object did not react to any of the buttons I pressed to change the camera view! The object of this project is to have th...
Tracy Harrison
1

votes
0

answer
20

Views

I need specific placeholders to address specific types of jobs

This is the code I currently have. I need to change it so that a specific placeholder corresponds to the specific job type such as ride or service. Ex) on the job type rides only a placeholder that corresponded to a ride would be displayed. The problem with the current code is that all placeholders...
Alex Lazarev
1

votes
0

answer
43

Views

Neural Network Classification with several input of different type

I've started to study neural networks and now I'm learning to use them to classify objects. But I have 1 doubts: How should I represent the input array if the inputs have different type (e.g. number and string)? For example if i have to classify an apartment (array with the same type (all int)),...
Jacob
1

votes
1

answer
297

Views

tab completion not working

I'm trying to create a prompt with tab completion. I have two files. main.py and prompt.py. main.py imports prompt.py and runs prompt.py's main() function. The main() function sets up a tab completer using readline and repeatedly waits for user input. It prints whatever is inputted and should have t...
eclipse
1

votes
2

answer
36

Views

User inputs multiple values and “skips Validation”

I am just recreationally coding with a little program of mine and I discovered that I could effectively skip my validation by entering multiple values and placing a space in between them. For example, a snippet of my code is as follows: while(counter == 0) { try{ int choice = input.nextInt(); System...
Paul
1

votes
1

answer
108

Views

SOAP - WCF: OperationContract not receiving input parameters

I am building a new SOAP API in WCF to replace old service in an already established communication with client server. The catches here are: I am not allowed to edit the client side Current API (the one I am replacing) is very old and generates everything in wsdl file, not singleWsdl and wsdl I mana...
lukas10m
1

votes
1

answer
46

Views

Use user input and configfile to write to a new file

I am pretty new to coding, and I am attempting to have a user input words (zones). I want these to be put into a list that can be used to pull from based on the counter. The rest of the input is being pulled from a file and then then broken up using shlex.split. I'm then naming these linetokens and...
Dustin Burmeister
1

votes
1

answer
187

Views

Bootstrap input custom width in form-inline

How do I properly make custom width input in the input-group? So that the various devices worked well. My code works in PC, but in mobile not. .someClass {width:550px;} @media (min-width: 768px){ .form-inline .form-control { width: 100%; } } Send
Mateusz Bacławski
1

votes
0

answer
67

Views

Focus on input / textareas in bootstrap modal stolen when AJAX request made in background

I have a very specific problem when displaying a bootstrap modal that contains text inputs or textareas. This only occurs in Google Chrome. Firefox and Edge are fine. When one of these inputs or textareas has focus, and a jQuery AJAX request is made in the background, the focus on the input or the t...
Daniel Procter
1

votes
0

answer
319

Views

Re-defining the Python 3 print function in Jupyter Notebook

I am trying to re-define the built-in print function in Python3 to have the flush keyword argument set to True by default. Something like the following (this does not actually work): def print(message): print(message, flush=True) Alternatively, is there another way to set the flush keyword to True b...
Jo Simon
1

votes
2

answer
366

Views

accept spaces with user input in .Bat File?

set /p input= Please type the favorite color here: if /i '%input%'=='green and yellowz' goto :GREEN if %input%==red goto RED if %input%==yellow goto YELLOW if %input%==black goto BLACK Rem Check to see if input is green, red, yellow, or black, if it is one of these then it will jump to the related...
Iroamalone Atnight
1

votes
2

answer
41

Views

its really necessary to include the type=“text” attribute on html inputs?

Does it make any difference if i don´t include this attribute? For example, on this :
HenriqueHBR
1

votes
2

answer
151

Views

Todo List Sanitizing Input jQuery

I am working on a simple to do app. Everything works, except, if the user inputs an html element into the input, then it gets rendered as html. So, for instance if the input is h1 heading /h1 , I get the word 'heading' with default h1 styling. I have been googling for 2 hours now, and would really j...
InnaLei
1

votes
0

answer
45

Views

CSS - input:invalid not

I'm having a validation problem ... If I put select field like this: It already appears invalid, even without If I put the select field like this: It stays right without even touching I want it to only begin to validate after selecting Follows his CSS .form-validate input:invalid, textarea:invalid,...
Luccas Gaulia
1

votes
1

answer
21

Views

Python: Adding Input To A Time Elapsed Calculator

I wrote a program that calculates the number of days between two dates. I'm having trouble writing the program so that it asks for user input. How can I do this without raising any errors? import datetime class User: def __init__(self, date_one, date_two): self.date_one = date_one self.date_...
Aiden Kolodziej

View additional questions