Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
62 views

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 ...
Aditya Paluskar's user avatar
0 votes
1 answer
80 views

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 ...
define_duck's user avatar
0 votes
2 answers
76 views

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 ...
jasper's user avatar
  • 1
1287 votes
17 answers
708k views

Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS attacks, while still allowing certain types of HTML tags?
Brent's user avatar
  • 23.7k
435 votes
8 answers
467k views

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 that ...
Nacht's user avatar
  • 11.5k
0 votes
1 answer
48 views

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 ...
Evgeny's user avatar
  • 121
0 votes
3 answers
116 views

#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, ...
Treio1024's user avatar
0 votes
1 answer
93 views

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 ...
coriuser's user avatar
2 votes
2 answers
68 views

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 ...
user30902982's user avatar
246 votes
18 answers
200k views

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 !=...
Mohammad Nadeem's user avatar
254 votes
21 answers
170k views

There is no "Done" button on the .numberPad Keyboard Type. When a user finishes entering numeric information in a text field, how can I make the number pad disappear? I could get a "...
Chilly Zhong's user avatar
  • 16.8k
-1 votes
1 answer
86 views

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 ...
Alexandr X's user avatar
232 votes
19 answers
157k views

Many of us need to deal with user input, search queries, and situations where the input text can potentially contain profanity or undesirable language. Oftentimes this needs to be filtered out. Where ...
Ben Throop's user avatar
  • 4,873
222 votes
8 answers
804k views

#include <string> std::string input; std::cin >> input; The user wants to enter "Hello World". But cin fails at the space between the two words. How can I make cin take in the whole of ...
dukevin's user avatar
  • 23.3k
0 votes
1 answer
256 views

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</...
Gweam's user avatar
  • 21
2 votes
1 answer
55 views

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 ...
Trystan Williams's user avatar
1 vote
1 answer
115 views

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 ...
RocketSearcher's user avatar
1 vote
1 answer
67 views

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 ...
damagedChair5916's user avatar
187 votes
17 answers
262k views

Is there a way to detect if a mouse button is currently down in JavaScript? I know about the "mousedown" event, but that's not what I need. Some time AFTER the mouse button is pressed, I want to be ...
TM.'s user avatar
  • 112k
71 votes
11 answers
141k views

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(), ...
Noah Mendoza's user avatar
164 votes
7 answers
209k views

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 that: ...
devdar's user avatar
  • 5,664
1 vote
2 answers
181 views

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 ...
Mehalon's user avatar
  • 23
0 votes
1 answer
83 views

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 ...
Aleks3000's user avatar
0 votes
0 answers
36 views

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 ...
Serge tkint's user avatar
2 votes
1 answer
98 views

class CustomUserViewSet(UserViewSet): serializer_class = UserSerializer pagination_class = PageNumberPagination permission_classes = [permissions.IsAuthenticated] def ...
st.splash's user avatar
1 vote
2 answers
11k views

I looked into various possible solutions: OpenAI and Javascript error : Getting 'TypeError: Cannot read properties of undefined (reading 'create') at Object.<anonymous>" https:/...
Dimitri Williams's user avatar
1 vote
1 answer
67 views

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 ...
Keegan Welch's user avatar
144 votes
5 answers
417k views

I am running this: import csv import sys reader = csv.reader(open(sys.argv[0], "rb")) for row in reader: print row And I get this in response: ['import csv'] ['import sys'] ['reader = csv.reader(...
Alex Gordon's user avatar
  • 61.5k
1 vote
0 answers
31 views

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 ...
saqlain jamil's user avatar
0 votes
1 answer
60 views

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: (...
Joy's user avatar
  • 103
0 votes
0 answers
51 views

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['...
Ben's user avatar
  • 821
0 votes
1 answer
662 views

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 ...
Sapri s's user avatar
  • 69
3 votes
3 answers
170 views

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 ...
Ren's user avatar
  • 53
1 vote
1 answer
126 views

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: ...
Nico Robin's user avatar
93 votes
7 answers
189k views

Here I have to set the default value if the user will enter the value from the keyboard. Here is the code that user can enter value: input = int(raw_input("Enter the inputs : ")) Here the value will ...
lkkkk's user avatar
  • 2,129
91 votes
17 answers
81k views

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 in ...
felix001's user avatar
  • 16.9k
1 vote
1 answer
78 views

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 ...
IlikeAssemblyButIsuck-sorry's user avatar
0 votes
1 answer
253 views

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 ...
Jithu Jacob's user avatar
0 votes
0 answers
98 views

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 ...
Bastian's user avatar
0 votes
2 answers
165 views

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 ...
ThN's user avatar
  • 3,284
0 votes
0 answers
73 views

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 ...
itsThatCoderboy's user avatar
0 votes
0 answers
64 views

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 ...
Cool_cricri's user avatar
3 votes
2 answers
221 views

I am making a typing game but I don't know how to handle special characters like the underscore, where you have to press shift to access it. if event is InputEventKey and not event.is_pressed(): ...
user23033721's user avatar
0 votes
1 answer
60 views

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 - ...
Sunny's user avatar
  • 147
2 votes
1 answer
94 views

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 ...
user27803601's user avatar
0 votes
0 answers
34 views

I have a date field in an Angular project that looks like this: <input [disabled]="this.viewMode" type="date" name="txtDateReceived" class="form-control" [...
TheIronCheek's user avatar
  • 1,231
3 votes
3 answers
206 views

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 ...
PhrozenByte's user avatar
0 votes
0 answers
29 views

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 ...
recharge amount's user avatar
0 votes
0 answers
133 views

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 =...
leakie's user avatar
  • 1
2 votes
1 answer
781 views

I just want to take user input and then print it back but it will just print numbers. I don't know how to convert a byte array to a string or an ascii character. I just started trying Odin. There is a ...
Coding with Tom's user avatar

1
2 3 4 5
113