35,101 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Tooling
1
vote
1
replies
51
views
How do i include a Search Bar on a Course hub Website
Pov: you have a website full of courses.
How do you make it easily accessible to customers using a search bar. Including a navbar and a possible way of rearranging the page in such a way that it ...
0
votes
2
answers
46
views
Angular Material: set the border color of an input field embedded within mat-form-field
I'm using Angular Material 21. The component's template has two <mat-form-field> elements, each one contains an <input> element. I would like to set a red border to the first input element ...
Advice
0
votes
6
replies
93
views
Python append list
I am a beginner learning GCSE level python, but stuck on this book problem
Here, the num1.txt file data is appended to the temp1list
num1.txt file data:
10,20,30,40
20,30,40,50
30,40,50,60
40,50,60,70
...
0
votes
3
answers
165
views
Why is my C program not printing the correct output when using scanf? [closed]
I’m a B.Tech CSE 1st-year student and I’m learning C. I wrote a simple program to take two integers as input and print their sum. But when I run it, the program either skips the input or gives the ...
Best practices
0
votes
7
replies
173
views
What is the Pythonic way to handle invalid user input in a while loop?
import random
number_to_guess = random.randint(1, 10)
while True:
guess = input("Guess a number between 1 and 10: ")
# This crashes if 'guess' is not a number
if int(guess) == ...
1
vote
2
answers
89
views
Angular: Numbers only directive
I have this piece of code
<input matInput type="number" [(ngModel)]="value"
(ngModelChange)="onChange(true)" />
But I want to be able to enter only numbers, ...
1
vote
1
answer
101
views
Standard way to normalize mouse wheel input across devices and platforms?
If I want consistent scrolling behavior across platforms and different wheel resolutions, I need a way to make wheel input independent of the device’s physical precision.
Different mice seem to have ...
0
votes
1
answer
55
views
Why am I getting TypeError: unsupported operand type(s) when adding two numbers from input in Python? [duplicate]
I’m learning Python and trying to take two numbers as input from the user, then print their sum.
My code:
a = input("Enter first number: ")
b = input("Enter second number: ")
print(...
Advice
1
vote
0
replies
108
views
What modules exist for simultaneous input and output?
The prompt_toolkit module allows displaying output while simultaneously waiting for input without breaking the input line. Here's an example from the developer:
import asyncio
from prompt_toolkit....
0
votes
1
answer
82
views
I'm trying to have the user's cursor in an input statement at a specific point (after the ": |") so it types at that point
Here is my code:
print("Make a 20-digit code with numbers 0-9: |___|", end="\r", flush=True)
addDigits = input("Make a 20-digit code with numbers 0-9: |")
More ...
1
vote
1
answer
115
views
How can I get global keystrokes without eating all the keys?
I have a basic input grabber which looks like this:
Display *display = NULL;
int main(const int argc, const char *argv[]) {
display = XOpenDisplay(NULL);
if (!display) {
return 1;
...
0
votes
2
answers
131
views
How to copy the new value of a data attribute?
What I'm doing is having the value of my <input> reflected in the value of the data attribute every time I click a button, to then copy the value with another button.
Example: If I type "...
0
votes
0
answers
52
views
React Aria FileTrigger onSelect not firing on first file selection in Chrome iOS, subsequent selections trigger cancel event
I'm encountering an inconsistent event behavior with the FileTrigger component from @react-aria/components in a React application. The issue is observed specifically in Chrome on iOS (version 140) ...
0
votes
0
answers
82
views
Android keyboard stutters/freezes when opening/closing with react-native-keyboard-controller (KeyboardAwareScrollView)
I’m seeing noticeable UI hitches only on Android when the keyboard opens/closes while using react-native-keyboard-controller. On iOS everything is smooth — inputs scroll correctly, no dropped frames.
...
3
votes
1
answer
61
views
How to read multi-line input from clipboard at once?
How do you read multi-line input from clipboard at once?
I tried using input but line change appears treated as Enter pressing.
>> x=input(char.empty,'s');
2020
2037
2054
2131
ans =
...