35,052 questions
-2
votes
0
answers
42
views
Mobile Chrome crash when taking a photo with HTML5 input inside a Vue.js dialog
I am developing a Vue.js web application that involves a photo upload feature. It works perfectly on desktop browsers, but I am encountering a critical issue on Mobile Chrome (Android).
The Symptom: ...
Advice
0
votes
4
replies
106
views
How do I get my aim cursor to stay near the border of the circle?
With this code I was able to get my character to move and aim a reticle around with an Xbox controller using Unity's new input system. It will also reorient the reticle to face outward from the center ...
-1
votes
1
answer
106
views
How can I show a wait cursor from a javascript input change callback
At the end of an input element change callback, I'm calling a long-duration computation and want to show a wait cursor. What I've tried is setting document.body.className = 'waiting'; and having in ...
0
votes
0
answers
80
views
Piping into interactive shell
I need to issue a lot of, say, wget commands manually. I figured the following would make it convenient:
$ sed 's/.*/wget &/g' | bash -i
Indeed, stdin is now listening to my input as I copy-paste ...
Advice
0
votes
7
replies
191
views
User input in Rust
I tried doing user input in Rust, but it's very hard to understand. I would be grateful if any of you gave me some best practices, examples, and maybe an explanation that is not just "You do that ...
2
votes
1
answer
72
views
Have a timer/events continue in background while user is typing an input?
I have a timer that counts up to 360 seconds or 6 minutes and switches between PM and AM between 12PM and 1AM-6AM
Because I wanted the timer to run in the background I used sys.stdout.write(timer) for ...
0
votes
1
answer
91
views
ASP.NET MVC pasting document path into a textbox to read recipe XML file by button click
I'm new to ASP.NET MVC and want to create a web-based recipe app. In this app, I want to read XML files from my computer or mobile. For that reason, I want to copy the file location into a text file ...
0
votes
0
answers
93
views
Is it possible to detect when a `uinput` device is ready?
I am attempting to simulate keyboard input on Wayland with Gnome.
Consider the following Python script:
from evdev import UInput, ecodes as e
ui = UInput()
ui.write(e.EV_KEY, e.KEY_A, 1)
ui.write(e....
3
votes
2
answers
110
views
Handling text input width and making it responsive
I'm working on my unit conversion solo project from the Scrimba Front-End developer course, and I'm struggling hard to make my text input squarish yet responsive.
I managed to make it somewhat like ...
0
votes
0
answers
36
views
Provide automatic key arrow inputs in interactive cli program
I want to automate the installation of a program (cuda toolkit to be precise) which uses an interactive cli by providing predefined arguments.
I can pass arguments based on strings like accept etc as ...
Tooling
3
votes
2
replies
71
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
126
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
112
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
180
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
211
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) == ...