Questions tagged [input]

11083 questions
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
1

votes
2

answer
422

Views

Calling component in input placeholder

I'm currently trying to call a React component in the position of a text placeholder, but It returns [Object object]. Below is the input render(){ const myText = this.movingText(); } then this is the function I'm calling with the component typist tag. movingText() { return ( Hello this is the text...
LoseYou21
1

votes
0

answer
673

Views

Laravel $request doesn't contain some input-array form fields

I have a form in laravel 5.4 allowing people to create questionnaires - adding question fields dynamically (this is handled elsewhere in js). {{ csrf_field() }} Featured Image Title Description Skill Level Kids Beginner Intermediate Advanced Add contributor Contributor 1 Remove Contributor Category...
rushtoni88
1

votes
1

answer
85

Views

Check if a file input has a file attached

Need to check if a file input has a file attached. This code doesn't work: if ($('input[type=file]').length > 0) { if($(this).val() == '') { alert('Vide'); } else { alert('Pas Vide'); } } Any help please ?
1

votes
1

answer
168

Views

Filter real input devices

I'm trying to get list of connected gamepads following way: InputDevice.getDeviceIds() .map { InputDevice.getDevice(it) } .filter { it.sources and InputDeviceCompat.SOURCE_GAMEPAD == InputDeviceCompat.SOURCE_GAMEPAD } .forEach { Log.i('gamepads', '$it') } In general, it should return only gamepads,...
OleGG
1

votes
1

answer
63

Views

Jquery hide all elements that are not in array

Is it possible to hide all elements that are NOT in an array using Jquery? I have over 40 inputs/selects on a form and I want to hide some of them when I use a select on the form. $('#type').on('change', function() { if ($('#type').val() === 'Blue') { var elements = [$('#id-element'), $('.class-el...
Bogdan C
1

votes
1

answer
348

Views

Input type number field with decimal values displays a comma instead of a period

I'm using Woocommerce for a project and I want people to be able to order products with a decimal value. Now I fixed this problem pretty easily with this code: add_filter('woocommerce_quantity_input_min', 'min_decimal'); function min_decimal($val) { return 0.5; } add_filter('woocommerce_quantity_in...
cocko
1

votes
1

answer
151

Views

Sanitise text input for display on HTML page

Have built a chat program for our website. A part of tHe program does allow a web page comment area for chatting about the page. So there is a text input so text is entered and redisplayed on the page. Obviously that is potentially risky. So in order to make a text string input safe for redispla...
wingyip
1

votes
1

answer
63

Views

JavaScript Function Constructor Parse Security

When using the Function constructor in JavaScript, a function object is dynamically created from the given code: const input = 'return 2 + 3;'; // (1) const fun = new Function(input); // (2) const ret = fun(); // (3) Assuming the input string (1) is arbitrary user input, is it insecu...
Steven
1

votes
0

answer
72

Views

Request user input in pre or post build event - Visual Studio

I want the user to approve an action in the pre or post build event by requesting an user input - like 'y' or 'n'. Thereby the user can cancel the task if he forgot to switch the Configuration by mistake for example. if $(ConfigurationName) == Release ( //ask user to type in some text ) Can someone...
LM358
1

votes
1

answer
51

Views

Use proper inputs to download stock data

I have a code below that tries to ask a user to enter 5 countries so that in return she gets the data for stock index price of that country (Say if she enters USA in return she gets info for S&P 500). I use error-handling properties so that if there is no country with the index it asks the user to r...
Alberto Alvarez
1

votes
0

answer
35

Views

Manipulate html <input>'s value retaining undo capabilities

If I have a simple and never mess with its value property, I can undo (and redo) my actions at will [I mean, keyboard typing and clipboard cut and paste]. But once some event sets its value the undo stack is gone. I understand that for an arbitrary event it would be very hard (and unnatural, from u...
rslemos
1

votes
1

answer
29

Views

how to take steps and limits to input time in html5?

I need to customize the data entry from 7 to 23 hours and take 10 minute steps in the input time like the following example: input time >>> 07:10 07:20 07:30 ... ... 22:40 22:50 23:00 please, help me...
1

votes
0

answer
318

Views

Python cv2 read raw video like bayer bggr8?

I try to read raw video pixel format as bayer bggr8 in Python cv2. And grab frame by frame. What are the possible approaches? Thanks in advance:) I’m scratching my head for hours now.
li square
1

votes
0

answer
51

Views

intl tel input - var allCountries - java to html to javascript - how to pass a String in a var and use it in js

I don't know how to solve this. I created a java method which create a String with all the information in the language of the local : public String getAllCountries(){ StringBuilder sb = new StringBuilder(); sb.append('[ '); ResourceBundle bundlePays = ResourceBundle.getBundle(BUNDLE_PAYS, localeBean...
roxane
1

votes
1

answer
33

Views

JavaScript console input/output output trouble

Code output should be: 515 30 However, when I add variables a, b, c my output is 51530. I've added a + b just to test it, and the output was 515. I just can't figure out how to return the c so that it won't combine with the 515. function Init_sta() { //Start by initializing an input function var a =...
Hannah
1

votes
0

answer
231

Views

Voice Recognition to Shiny App

Background - I am trying feed voice based inputs to change selections in Shiny app. I am using the Annyang speech recognition library. There are applications demonstrating the input using 'renderPlot' function in Shiny - https://yihui.shinyapps.io/voice/. Is there a way to feed it to other inputs li...
Kannan Subramanian
1

votes
1

answer
499

Views

intl-tel-input jquery plugin utilsScript loading error

I'm using intlTelInput jquery plugin, which I tried to include the utilscript option $('#phone).intlTelInput({ utilsScript: 'utils.js' }); when loading utilscript i'm getting an error(Uncaught ReferenceError: goog is not defined)
Rthi
1

votes
0

answer
36

Views

prevent submitting if invalid read-only

is there a way to prevent form that have invalid but read-only input from submitting without using custom JS code ?
Robert
1

votes
0

answer
118

Views

Remove show/hide password icon in Safari

Is there any way to disable or remove show/hide icon in Safari which appears when you start typing symbols into the input with 'password' type? I could easely do it in IE/EDGE by adding to my CSS following rule: input[type=password]::-ms-reveal, input[type=password]::-ms-clear { display: none; } But...
Igor Kurylenko
1

votes
2

answer
661

Views

When using Holotoolkit keyboard.prefab input in unity system keyboard also shown for Windows Mixed Reality app

I'm using the keyboard prefab with KeyboardInputField UI elements from the MixedRealityToolkit and when I select one of the KeyboardInputFields in a build I'm getting both the keyboard prefab and a system keyboard poping up. An earlier build I made using both of these was not displaying the system v...
Lucas Tabachnick
1

votes
1

answer
71

Views

Input a text file into a program

I'm working on a PDF generator project. The goal is to have a program that takes document files and generate a PDF file. I'm having trouble in finding a way to input a file into the program to be converted. I started out by using the input function, where I input the file in the terminal. As a test,...
Arsene Bwasisi
1

votes
0

answer
42

Views

Angular 2 Input type File, ngOnChanges is not performed

I created a custom component and applied it on [ERR] is created to show error, but hook event of that component ngOnChanges is not performing on selection of file. If any way to trigger it, Please share. @Component ({ selector:'[ERR]', template:` {{error}} ` }) export class ERR implements OnInit {...
mukund patel
1

votes
0

answer
48

Views

How to validate an input url to allow only url ending in .gif and urls that contains “youtube”

I have 2 input type=url, one for submit a gif and the other to submit a Youtube video. I want to filter this inputs with pattern atributte. My idea is filter like this: - Gif url -> only allows urls ending in .gif - Youtube url -> only allows urls that contains 'youtube' word. Now, i have this This...
MarkLenders
1

votes
1

answer
181

Views

RAWINPUT RAWHID Structure in C# Byte Array

I am trying to read data from HID devices using: uint dwsize = 0; //RAWINPUT input = new RAWINPUT(); uint result = GetRawInputData(lParam, RID_INPUT, IntPtr.Zero, ref dwsize, Marshal.SizeOf(typeof(RAWINPUTHEADER))); //_rawBuffer = new RAWINPUT(new RAWINPUTHEADER(), new RAWDATA(new RAWKEYBOARD(), ne...
Ian.V
1

votes
0

answer
52

Views

How to display message with ngTagsInput?

Alert Emails The above field in the form takes as input multiple email-ID's. I want to add the validation here that whenever the field is touched, but there is no email-ID, an error message should be displayed besides the box in the form which says 'please enter an email ID'. I have changed min-ta...
Qirohchan
1

votes
1

answer
243

Views

MailChimp: I can't type into sign up form input field from Mailchimp. Why?

I am trying to use an embedded form from Mailchimp in my code, specifically the 'horizontal' style. I've had to edit the code a little in order to make it compatible with ES6, as I'm using GatsbyJS. The problem is that the form show up fine on my browser, but I can't type into the input field... why...
user74843

View additional questions