5,636 questions
1
vote
1
answer
62
views
SSH-bound Go CLI Daemon – SSH Connects Successfully, but No Input Accepted
I'm building a custom CLI daemon in Go for Ubuntu.
When I run the CLI locally (without SSH), everything works correctly — for example:
admin@admin> whoami
responds as expected.
However, after ...
0
votes
1
answer
80
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 ...
0
votes
2
answers
76
views
How to auto-adjust the width of an input field based on character length of the decimal displayed within?
I'm working on a very simple program that takes a user-specified number (can be an integer or a float of any length) and performs one specific multiplication operation on that number. The program then ...
0
votes
1
answer
48
views
Read user input in app generated by jpackage
I am using jpackage to convert a Java application into an executable .app file.
When running on macOS, as shown below, the application cannot read user input.
open -n /Applications/MyApp.app
The ...
0
votes
1
answer
93
views
Deleting files based on input to avoid accessing parent folders
I am doing a REST API in Java (although this question may apply to other languages) where I create several local files and directories, and they can be deleted based on input. I manage my files in a ...
0
votes
3
answers
116
views
Is this way of getting a formated input from stdin better than default scanf?
#include <stdio.h>
#include <stdlib.h>
#define BUF_SIZE 1024
int main() {
char *buf = (char*)malloc(BUF_SIZE*sizeof(char));
fgets(buf, BUF_SIZE, stdin);
int a = 0;
sscanf(buf, ...
2
votes
2
answers
68
views
How to be able to retry an input for a specific key in dictionary in Python without skipping it
I'm trying to make a script that will ask for 5 score input from the user. Each score corresponds to a specific dilution. The input are strings and only six "characters" are allowed to be ...
0
votes
0
answers
34
views
date input resets in Chrome while trying to type
I have a date field in an Angular project that looks like this:
<input [disabled]="this.viewMode" type="date" name="txtDateReceived" class="form-control" [...
-1
votes
1
answer
86
views
Automatic insertion of a value in the program [closed]
I need to periodically record a value in the program using a dialog box.
The program is written in Borland Delphi 7, Windows API. The recorded value is stored in RAM.
I also have a Java program in ...
1
vote
0
answers
31
views
How can read all text before the cursor in custom keyboard?
I'm developing a custom iOS keyboard using SwiftUI. I want to access a large portion of text before the cursor. I'm currently using:
textDocumentProxy.documentContextBeforeInput
However, this only ...
0
votes
0
answers
36
views
Can input elements being positioned in Drupal 10 into a table
I have in Drupal 10 made a simple table that is being build with a PHP as part of a module.
When I use a buildForm-function, I can not position the input fields. I want these to be as if they were ...
1
vote
1
answer
67
views
How to hold an input open for a specific length of time
A project I am working on needs to automatically accept an input after 5 seconds. the idea is that they have 5 seconds to enter as many particular characters as possible.
I've found plenty of examples ...
2
votes
1
answer
55
views
I have input validation and now im trying to continue the code // Powershell
I am following a tutorial I found on youtube for a file integrity monitor. The code is messy but im trying to add my own twist and clean it up. I just added input validation and now the code won't run ...
0
votes
0
answers
98
views
Simulate mouse input on touchscreen without handicapping user input
I am currently developing a C# .NET console application on my computer which allows me to move a virtual joystick by moving my mouse to the joystick and pressing down(currently not implemented) and ...
0
votes
0
answers
29
views
Need difference of column filters based on slicer range selection by user
I have tables -> calender , bi_alloceffort_data & bi_alloceffort_data_main. I Have linked calendar date column to REVDATE column of bi_alloceffort_data & "PROJECTNO" of both the ...
0
votes
1
answer
83
views
How to re-render table to reflect input data
I have two files/components:
Createrisk.jsx for creating individual risks
Tablepage.jsx displays the risks in an MUI Data Grid
The problem is Tablepage renders only the attributes from Createrisk ...
0
votes
0
answers
35
views
Adding a NumericUpDown to a menu?
Windows Forms has a control NumericUpDown that allows the user to choose a number by clicking tiny up and down arrows, or entering a number via keys.
Is there a way to add this functionality, but ...
0
votes
0
answers
51
views
For safety, is it enough to check whether user input conforms to an expected value? Or do I need to escape it before output anyway? [duplicate]
Is it enought to check whether user input conforms to an expected value, before I embed it into executed code? E.g.:
$fruits = array(
"Orange",
"Banana"
);
if(isset($_GET['...
2
votes
1
answer
98
views
@action got an unexpected keyword argument 'id'
class CustomUserViewSet(UserViewSet):
serializer_class = UserSerializer
pagination_class = PageNumberPagination
permission_classes = [permissions.IsAuthenticated]
def ...
1
vote
1
answer
67
views
How can I receive user input in Java in a single line in the console [closed]
I am attempting to make a simple text-based calculator application in Java. I am wondering if it would be possible to take input inline with a print statement. for instance, instead of getting an ...
0
votes
1
answer
60
views
How to Display Input and Output Like Online Compilers in VS Code?
When running my programs in VS Code terminal, the input and output are printed in the same terminal window.
But I want the input and output to be clearly separated, like in online compilers.
Eg:
(...
1
vote
1
answer
78
views
Comparing characters with user input
I am having a problem with comparing declared constants in the .data section with user variables in the .bss section, where I will store user input from syscall read.
They both are doublewords. Could ...
0
votes
1
answer
253
views
How to Pre-fill Email Field on AWS Cognito Managed Login Page in Multi-Tenant SaaS?
In my multi-tenant SaaS application, I use AWS Cognito for authentication with a managed login page. Each tenant has a separate Cognito user pool. The authentication flow is as follows:
The user ...
1
vote
1
answer
126
views
Unable to input negative sign in input field
I am new to React and I am trying to have a input field which can take values between -40 and 30. I am using Form.Control from react-bootstrap and below is my code
interface Range{
min: number,
max: ...
0
votes
0
answers
73
views
How to skip checking for keys if no key is pressed
I am making a text-based game with frames, and my problem right now is that I have the code to check for keypresses
key = getkey.getkey()
But it seems like that command waits for you to press a key ...
0
votes
0
answers
64
views
How do I ignore special characters, in this case <, />, and "", in a string that I need to extract info from?
I am trying to make a program that can take a string from a file, and convert it to 4 predefined integers.
For now, I am attempting the stage after extracting the line from the document, to split it ...
0
votes
1
answer
662
views
MudAutocomplete does not trigger ValueChanged function on Leaving Input field in Mudblazor
I am working with MudAutocomplete in Mudblazor(6.12.0).I want the autocomplete to hold the list of values as well as allow the user to enter the text manually which is not in the list .It works fine ...
1
vote
2
answers
181
views
Why does my Kotlin program fail to compile?
I'm currently learning Kotlin and using https://play.kotlinlang.org/ to compile my code.
I tried to create a very simple program, collecting user input and giving output.
Howevery, it doesn't run.
fun ...
1
vote
0
answers
136
views
How can I get global input in bevy?
I am trying to make a music player with Bevy and Rust. I want to use global input to check if the play/pause button has been pressed even when the window is not in focus.
I've tried using a number of ...
0
votes
1
answer
60
views
Fetching characters from a Buffer while reading Ints
I am building a language interpreter and needs to have two functions, one to input an integer and another to input a character (from System.in). For instance, inputting integer - character - integer - ...
0
votes
0
answers
133
views
Shape of inputs causing issues with CNN with numerical and text inputs
I am having an issue of where I am obtaining an error to do with the input shapes for the CNN model.
The code for the model
text_input = Input(shape = (max_len,), name = 'text_input')
numerical_input =...
0
votes
2
answers
165
views
How to retrieve data from edit text fields in Kotlin?
Android studio Bumblebee 2021.1.1
All I am simply trying to do is get or retrieve text input from edittext field and it simply doesn't work no matter how I do it. I have searched everywhere including ...
1
vote
1
answer
115
views
C++ MFC - Open edit window at specific position [closed]
I have an application where, on a specific event, I want to open a edit control at a specific position x,y with a specific size width,height. In the opened window, I want the user to enter a string ...
2
votes
1
answer
81
views
How to get an operating system's internal/keyboard charset, related to alt-key character input
Preface
I'm currently working on a small app that
literally types the input
from the system Clipboard (using Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);),
by simulating the ...
-4
votes
1
answer
63
views
Why can't I use input() to get an object? [closed]
I created a list of Animals. Then I ask the user, What are you? When he answers, I can't get the program to recognize it in the list.
class Animal:
def make_sound(self):
pass # This is an ...
2
votes
1
answer
94
views
Storing user input into an array and terminating at stopping value without storing that value in C
I know how to write a while loop that reads user input, stores into an array then terminates at the stopping value. However, that stopping value is also stored and I'm not sure how to have it not do ...
3
votes
3
answers
170
views
How to validate mutliple inputs of different variable types within a do/while loop?
When validating user input to check if the user has inputted correct values (i.e. letters for the strings, numbers for the integer), the below code can only detect when the strings have been ...
0
votes
2
answers
72
views
Deleting an input line after it has been printed on the Terminal
I want to write a program using Python in which looks something like this-
text = input("Enter an integer:")
But as soon as the user enters an integer and clicks Enter, the entire line gets ...
0
votes
1
answer
82
views
C - write() repeats after reading user input with spaces
I'm creating a shell program with C and am working on getting user input after displaying the current working directory. I'm using read() and write() as I will need to use signals within my shell ...
-5
votes
2
answers
81
views
Why does my user-input repeat all the questions? [closed]
while True
game2=input("Welcome to Treasure island! Your mission is to find the treasure. You find two different paths. Left or Right?")
if str(game2)==str("right"):
...
-1
votes
1
answer
158
views
Exiting back to main menu
I am currently writing a basic program with multiple menus. I have a function called menu1(), which is called in main and handles the first set of menu options. My issue I am having is being able to ...
-3
votes
1
answer
67
views
How to ignore empty rows when submitting to database [closed]
I have a problem when I submit the form which had empty rows so that in the database the empty rows are still inputted even though they are empty which causes the next input to skip the empty row.
2
votes
1
answer
125
views
Parsing with a space (sscanf or strtok)
For some context, my game runs in the terminal and is like a command line type game. At the moment to process commands is does a strcmp() for every single command which isn't really pretty nor ...
-3
votes
1
answer
116
views
How do I read user input line by line as if it were a file?
I am new to C#. I want to be able to scan a user input line by line in C# (like you can in Java with a scanner or in Go with bufio).
My code needs to handle user input like this:
3
Hans
Grethe
Otto
...
1
vote
1
answer
579
views
How do I use both multi-touch gestures and cancellable actions in Jetpack Compose?
I was following this tutorial (https://developer.android.com/codelabs/large-screens/advanced-stylus-support#4) which uses pointerInteropFilter to handle the MotionEvents directly and detect ...
-2
votes
1
answer
124
views
ValueError: invalid literal for int() with base 10: 'done'. what can i do?
I wrote this code and tested it, but in the end I encountered a problem and an error, because the number should be entered inside the input, but inside the if, when the user enters the word done, the ...
0
votes
1
answer
256
views
Why does my Blazor form not get any value from input field?
I have been using Blazor and I encountered an issue could not find any solution. I have been trying to add text into input fields but it's not updating.
@page "/"
<PageTitle>Form</...
0
votes
1
answer
90
views
Unable to take user Inputs in C language in Sublime Text
I want to take user inputs in c language but I am unable to as the Sublime Text does not allow that. I want to create a build system for C that will take user inputs and display output in the default ...
0
votes
0
answers
61
views
Is there any way to prompt the user using powershell script such that the user is not able to ignore it
I am able to give a prompt to the user using powershell script but the issue is that the user is able to ignore it. What I mean is the user is able to open other programs and file even when the prompt ...
3
votes
3
answers
206
views
Random, yet predictable cronjob schedule based upon arbitrary user data in Bash
I'm trying to construct a random, yet predictable cronjob schedule for a monthly and daily cronjob based upon arbitrary user-provided data. The daily and monthly cronjobs should run with a sufficient ...