FAQ Database Discussion Community


Read graphs from file as fast as possible

c,input,graph,text-files
I have a txt file that contains 2 graphs and the number of vertices in the following format: 6 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0...

BufferedReader space separated input

java,input,bufferedreader
first I'd like to mention that I am not realy experienced in java, and I searched StackOverFlow for a solution to my problem and either I didn't find it or didn't understand the answer, so I am asking now: i wanted to start working with BufferedReader and didn't find any...

User Input Java

java,input,io
I am building an application in Java (using NetBeans) that accepts user input through the console and prints out a statement using their name (given in user input). The following is the code: package amazingpets; import java.io.Console; public class AmazingPets { /** * @param args the command line arguments */...

Javascript switch statements for form input

javascript,forms,input,switch-statement
Trying to learn some basic JS principles to create a delivery cost calculator based on user input forms and JS switch statements to return a price. (I know this would be easier and more practical with a server database but I would prefer to stick to JS for now) This...

Java Append Key Input to String

java,string,input,keyboard,key
For my current project I need to create a custom text box that gets each key pressed and adds it to a string. I'm constantly updating the method that retrieves the key a user is pressing and then I add it like so: public void addCharacter(String c) { String before...

How do I get rid of form input value cache in JavaScript?

javascript,jquery,html,forms,input
This is my code in JavaScript: function myfunction() { var increment = $("#increment").val(); $("#increment").val(parseInt($("#increment").val()) + 1); } and HTML: <input id="increment" value="0" type="hidden"> The idea is when I click on my button the myfunction is called and increment my input type hidden with one. It works. If press the F5...

adding text after prompt for input

java,input,cmd,prompt
I'm new to Java & I don't even know if what I'm trying to do is actually doable in cmd but I want to know if there's a way to ask the user for an input while displaying something at the right of the input, something like: enter weight: _...

Remove leading zeros from input type=number

javascript,html5,validation,input,numbers
I noticed that if i use the leading zeros are not removed. I also saw a lot of discussion on how keeping leading zeros. For example "000023" and "23" are the same number and i think that it doesn't make sense keeping those zeros....

C++ using ofstream to write to file

c++,file,input,ofstream
I am trying to use ofstream() to write to a file (I am writing an assembler that converts .asm file into .hack file and converts assembly commands into binary for the NANDTOTETRIS course) I am having trouble with the ofstream function, here is my code: #include <stdio.h> #include <iostream> #include...

How to make Javascript show me the current time when i ask for it in an input?

javascript,input
I want to see the current time when i enter some specific text in a input but it's not working HTML <form> <input type="text" id="inputcommand"></input> <input type="button" value="Submit" onclick="showTime()"></input> </form> <p id="output">Output here</p> Javascript var command = document.getElementById("inputcommand"); var output = document.getElementById("output"); var showTime = function(){ var askForTime = ["What...

Input Tags and Submit form outside the

javascript,jquery,html,forms,input
I know how to submit a form from outside the form, for example: <form action="Get?id_sec=120" method="post" id="form15" name="form15" style="display:none"></form> <input type="submit" class="finish-button primary-button button" border="0" value="Limpar pedido" form="form15" onclick="javascript:document.form15.submit();" /> But I want to put a tag with a reference to the form with javascript too, because command form="example" doesn't...

Make the input wait for mouse or keyboard - Assembly Language

assembly,input,keyboard,mouse,simultaneous
I fixed my program, but now the loop seems to be stuck. Whenever I press u or d, it is stuck, but the mouse part works :) ; You may customize this and other start-up templates; ; The location of this template is c:\emu8086\inc\0_com_template.txt org 100h CLEAR MACRO MOV AX,0600H...

How to perferm different action depending on user input

java,input,user
I'm trying to make a really simple game (even without an interface). You are supposed to type what action would you like to do attack, heavy and light or block). But "enemy" responds only to "light" action. What is the problem? import java.util.Scanner; public class Game { public static void...

Save user input from tkinter to a variable and check its content

python,input,tkinter,python-3.4
I have written a script simulating a card game in Python where the user decides how many cards and how many piles of cards they want to play with. This input is controlled by following code where boundary_1 and boundary_2 give upper and lower limit in an integer interval and...

jQuery and operation in real time

javascript,jquery,html,input
I have two input text and i want use jquery to do an operation with them. The input text are this: <p> <label>Title 1</label> <span class="field"> <input type="text" name="field1" id="field2" class="width100" value="<?php echo $field1t; ?>" /> </span> </p> <p> <label>Title 2</label> <span class="field"> <input type="text" name="field2" id="field2" class="width100" value="<?php echo...

How to get all input having the same class, id name in Controller - Laravel 5?

input,laravel-5
I have function which appends new answer inputs when 'Add answer' button is clicked. In Controller, i want to get the value of all answer inputs with id or class. Here is the code I am currently using: <script> var txt1 = '{!! Form::text('answer1',null,['class' => 'answer']) !!}'; $(document).on('click','#btn1',function(){ $(this).before(txt1); });...

is possible to make html input type number only show numbers which are multiple of 5

html,input
Is it possible to make html input type number shows only numbers which are multiple of 5 (5,10,15....)? <input type="number" name="pax"> ...

Scanner input through break-line

java,input
Is it possible to catch a break-line as an "input-confirmation"? The idea is that you skip an input, if it should not be used. Or is there an already existing java method for that problem? Edit code: import java.util.Scanner; public class probe { public static void main(String[] args) { Scanner...

Input Autofocus on type

javascript,jquery,html5,input,autofocus
Good Evening and thanks all in advance! i have this input: <div class="ref-control"> <h3>Por Favor passe o passe o cartão pelo leitor</h3> <form> <label for="leitura-nim"> Leitura de Nim <input tabindex="99" autofocus type="text" name="leitura-nim" id="leitura_nim" /> </label> </form> </div> and this input get's autofocus when the page is loaded, so far...

font-awesome to be inserted in value=“”>

spring,button,input,font-awesome
im trying to insert some font-awesome inside here <form action="/someweb.html"> <input type="submit" class="btn btn-success" value="<spring:message text="View List"/>"> </form> but it seems that this code <i class="fa fa-list-ul fa-lg"></i> wont fit inside, and i tried to insert it inside in different position, i always get failed result. all i wanted is...

Need to find duplicates from an array in c++, and then put them in another array

c++,arrays,input,duplicates,output
this is my first post here and I would be very happy if you could help me. The task is - Create an array from 6 input numbers, then put the duplicated numbers in another array and then output the array with the repeated numbers. Do you have any ideas?...

Simplifying some jQuery code of keyup inputs

javascript,jquery,css,input,keyup
Thing that I'm making I am making a webpage, which is to generate forum code automatically when I enter content into inputs. Each character will be in different colors and the sentence will look like a gradient. This is the jsfiddle sample. When I enter a-p-p-l-e in to those inputs,...

Css styling of initial default value of a text field

html,css,input,fonts
I have a html input textfield as follows: <input type="text" name="fName" class="inpField" size="20" value="First Name *" /> Now I want to do selective styling of some text as follows: I have the default value set as "First Name *". Using css- I want to apply a global style to that...

How can I set the value of an input (textbox) using jQuery?

jquery,html,input
I've got this input element: <input type="text" id="txtbxYear"> ...and this jQuery to retrieve the current year: var now = new Date(); var year = now.getFullYear(); ...and have tried all of the following to set the value of the "textbox" to the current year: $( "#txtbxYear" ).html(year); $( "#txtbxYear" ).val(year); $(...

Detect when input text change

javascript,jquery,html,input
I am trying to style an input and an ul-li like select-option (as style below). And I am successfully change the value of input text if I click on a li. For example, the #main value will be 1 if I click on the first li or 2 on the...

C++ Reading tab-delimited input and skipping blank fields

c++,variables,input,format,tab-delimited
I am making a program that will take a long string of tab-delimited metadata pasted into the console by the user and split them into their correct variables. I have completed the code to split the line up by tab, but there are empty fields that should be skipped in...

Using intent between activities, in reverse - Android

java,android,android-intent,input,android-studio
I am quite new to android programming (aswell as java in general) and have run into an issue that has me stumped. I am building a basic app (for practice) that accesses an already built website www.shodan.io . As far as i know there is no android app for this...

How to read from std.in if the length of the input is not define

java,input,java.util.scanner
I'm having problems with reading input from standard input in java using Scanner. I need to read the user input and put it in a dynamic array. Here's an example of the input: 4 6 2 3 4 8 9 5 And my code: Scanner scan = new Scanner(System.in); List<int[]>...

Div positioning broken by input

html,css,input,positioning
I'm having a problem achieving the layout for a website I'm designing. There are three blue divs across the top of the page under which I have placed four red divs. Each of the red divs will take up just less than a quarter of the width of the page....

How do you preview your c++ code in visual studio

c++,visual-studio-2013,input
I am new to Visual Studdio (and C++ and the C family in general). How to you preview the output for a cpp file? for example, If I script this #include <iostream> int main() // does 'int main' mean start the body (Like HTML's <body> ? { std::cout << "Hello...

:checked selector not working

html,css,input,radio,checked
I am trying to get the follow code to work: html <div class = "col-md-4 video text-center wrapper-q1"> <p class = "no-padding"> <input class="question1" id = "vraag1" type="radio" name="q1" value="Moon"> <br /> <label class = "pointer" for = "vraag1">Text</label> </p> </div> css input[type="radio"] { display:none; } label:before { content: "";...

How to send a radio button value via AJAX?

javascript,jquery,ajax,input,radio-button
I've created a "global" ajax-modal-function that sends ajax-requests with values stored in data-array at the parent #modal-content. That's how a HTML field looks like (as an example): <input data-array='data[]' name='gender' type='radio' value='1' /> <input data-array="data[]" type="password" name="password" /> That's how I store the data before I use tha $.ajax JQuery...

How to display placeholder text on focus?

javascript,html5,input,focus,placeholder
I have the following placeholder: <div class="input-text-container search" style="display:none;"> <input type="text" id="textSearch" class="input-text-big search-message" placeholder="Search in your list"/> <i class="common-sprite cross search"></i> </div> The input is displayed when the user clicks on an icon with the class "search.icon-search" I use the following JS code: $('.search.icon-search').on( 'click', function(e) { e.preventDefault(); $('#textSearch').focus()...

How do I do user inputs on the same line in Lua?

input,io,lua
Here is my code: while true do opr = io.read() txt = io.read() if opr == "print" then print(txt) else print("wat") end end What I'm trying to do is make it where you type print and then whatever you want like this: print text And it'll print text but I...

Check if an input field has focus in vanilla JavaScript

javascript,html,input,focus
Using jQuery, I can test if an input field has focus like so: if ($("...").is(":focus")) { ... } How do I do that without using jQuery?...

Set focus for paper-input via radio button

input,radio-button,focus,polymer,paper-elements
In Polymer (1.0), how can I set the focus of the iron-input when (as example) radiobutton 'radio1' is selected. <div> <div>Title:</div> <paper-radio-group> <paper-radio-button name="radio1">Radio1Label</paper-radio-button> <paper-radio-button name="radio2">Radio2Label</paper-radio-button> </paper-radio-group> <paper-input-container> <input is="iron-input"> </paper-input-container> </div> ...

javax.el.PropertyNotWritableException when using EL conditional operator in value of UIInput

jsf,input,el,placeholder,conditional-operator
I get this error message: javax.el.PropertyNotWritableException: /u/editProfile.xhtml @64,140 value="#{empty userProfile.cfg.gpu or userProfile.cfg.gpu == '' ? usernavmsg.EditMe: userProfile.cfg.gpu}": null The problem is that when the value of a bean property is null the value of an inputText field switches from my ManagedBean property, to a resource string. So I cannot persist...

How can i tell my Program to “re-do” diffrent Actions (chosen by User-Input) after it is done, till the do-while Requirement is set?

c#,input,console,readline
Im just a Beginner in C# and im working on a Console Application, I want the Program to be able to read the Input of the User and execute the Orders until he has 0 HP. Its basicly gonna be "Fighting-Game". My Problem now, I can only ask for the...

Prevent backspace on polymer paper-input

javascript,html,input,polymer
I have a polymer input field like this: <paper-input type="text" class="user-value" data-id="user-value" value="{{typingAns}}" focus maxlength="10" /> is it possible to block the backspace functionality on this input? Basically, if the user press backspace is it possible to keep typingAns the same? I tried to use onkeydown but it doesn't seem...

Hide class when input value equals given value

jquery,input,hide
I need to hide a div class when a text input with an id of "acct_tier" has a value of 'standard' (without submitting the input). What I've tried isn't working so far: HTML <input id='acct_tier' type='text'> <div class="red"></div> <div class="blue"></div> jQuery: $(document).ready(function () { if ($('#acct_tier').val('standard')) { $('.red').hide(); }); Any...

How to make my output show only whats needed with my cheque generator program for c

c,input,output
I have made a program that can output whatever numeral is inputted in to it but it will convert it to words instead of just numerals for example if you input "1234.56" it will convert it to "One Thousand Two Hundred Thirty Four Dollars and ... 56 Cents". The cents...

If Input is focused trigger X else trigger Y

javascript,jquery,search,input
I'm trying to trigger an opacity animation on a menu when the search input is focused, and when it is not focused for that menu to return to opacity:1. My botched code below. if($('input#edit-keys-2').is(":focus")){ $('#zone-header ul#nice-menu-1').animate({opacity:0}, 300); }else{ $('#zone-header ul#nice-menu-1').animate({opacity:1}, 300); } ...

Input boxes not lining up

html,css,text,input,form-submit
I'm new to HTML and last time I've been editing my code I found that my input boxes don't align perfectly. I want them to be just in line on right. Here is the code: input { margin: auto; padding: 25px; font: normal 15px Verdana, Tahoma, sans-serif; width: 100%; border-left:...

Check if the number entered is in array, otherwise add to the array

java,arrays,validation,input,user
The user will enter the size of the array and its values. If the entered value exists, the user must enter a different number. I can't seem to construct the proper code to check if the inserted value exists. public static void main(String[] args) { String holder="", s; int size;...

Moving data (based on a class) from .py to a dictonary in another .py file

python,input,data
I'm trying to store user input data in a dictonary in another python file. This is my first real python project and so if you have any suggestions about ways to simplify what i'm doing, please suggest. Thanks! My Assignment class: class Assignment(object): def __init__(self, assignment_name, due_date): self.assignment_name = assignment_name...

Synchronise Textboxes (Input in Form)

javascript,html,css,forms,input
I have a form with a textbox and then another form with three textboxes. The text I enter in the first textbox (id="logoName") should be visible in the other three (ids v1 - v3) when i click the button. I tried the following, but when I click the button, the...

Laravel 5 getting input values that are arrays

php,laravel,input,laravel-5,laravel-form
I have a text field like {!! Form::textarea('representive[address_1]' ,null ,['class' =>'textboxlong form-control','style'=>'height:60px;']) !!} In my form. And when i try to get its value in my controller but it comes null. What i try is $adress = Request::get('representive.0.address_1'); I also tried some other ways but could not end up with...

Take input without changing the line

python,input
print("Please Enter:") x = input() print(x) In the console after "Please Enter:" is printed the line changes. I want that I should be able to provide input in the same line of "Please Enter:". Is there any method to prevent the change of line? ...

Inputting integers in to an array Error?

java,arrays,input,value
The purpose of my code is to display the student number and their respective grade as follows: Student Grade 1 53 2 45 So on... I used a 5x2 array, in which the user can input the values for the grade... However I run in to a problem, when inputting...

Find next input field of specific class

jquery,input,next
I have several divs with two input fields each, like this: <div id="wrapper"> <div class="content"> <div class="subcontent"> <input type="text" class="first" id="first_1" /> <input type="text" class="second" id="second_1" /> </div> </div> <div class="content"> <div class="subcontent"> <input type="text" class="first" id="first_2" /> <input type="text" class="second" id="second_2" /> </div> </div> </div> So let's say I...

how to style html5 date input, first element focus/active

css,html5,date,input,css-selectors
I have a date input that I've styled but I can't remove a blue highlight. Here is a pen: http://codepen.io/pjrundle/pen/PqjKBZ <input id="selectedDate" type="date" class="date-filter pseudo-input live-update" placeholder="Event Date"> ::-webkit-inner-spin-button { display: none; } ::-webkit-clear-button { display: none; -webkit-appearance: none; } ::-webkit-calendar-picker-indicator { opacity: 0; height: 14px; width: 80px; border: 1px...

How to read data separated by a ',' in a text file in C [duplicate]

c,file,csv,text,input
This question already has an answer here: Reading CSV from text file in C 4 answers I was wondering how to read data from a text file that has its data separated by a comma; for example line 1 of the text file says: (Name,Integer,Integer). So I tried using...

What does Scanner input = new Scanner(System.in) actually mean?

java,input,java.util.scanner
Scanner input = new Scanner(System.in); Could you give me a detailed explanation on what the code above is doing step by step? I don't really understand how it works and how it links to me later being able to do this statement: int i = input.nextInt() ...

input errors : split part of one entery

c++,input,io
i am doing some practice on standard I/O i have a complex class . my class has overloaded insertion and extraction operators ,the input should of the form : x + yi(e.g 10 + 9i) i have to determine if input is valid or not . there is the problem...

Calling Input Types in Code Behind

c#,html,input
OK, I never use this : <input type="text" name="username" id="username" tabindex="1" class="form-control" placeholder="Username" value="" /> I usually use this : <asp:TextBox type="text" name="username" id="username" tabindex="1" class="form-control" placeholder="Username" runat="server"></asp:TextBox> With the last one I am able to call the textbox like so in my code behind : username.Text = "blah blah"...

Java: How to print the next line of found string

java,input
This code works and it prints the line but I would like it to print the next line. import java.io.*; public class SearchTextFile { // public static void main(String args[]) throws Exception { int tokencount; FileReader fr = new FileReader("c:\\searchtxt.txt"); BufferedReader br = new BufferedReader(fr); String s; int linecount =...

Configuring inputs for a Multiple Input Fuzzy Controller in Labview?

input,controller,logic,labview,fuzzy
I'm building a fuzzy controller in Labview using the MIMO (Multiple Input, Multiple Output) FL Fuzzy Controller.vi. I designed the fuzzy system using the Fuzzy System Designer, and the .fs file is connected as the "fuzzy system in" of the MIMO Fuzzy Controller VI. The input values are where I'm...

Limit input to 0-100 value with HTML

html,input
I wonder if there is anyway to put a limit on an input element's value with HTML5? <input type=number value=99> /valid <input type=number value=101> /invalid I'm not after JS fixes here....

Flask submit data outside of form input fields

python,forms,input,flask,args
I'm working with Flask, and I am trying to submit some data that is not in input fields, to be added to the database. jinja code with the form(s) looks like this: {% for item in items %} <tr> <form id="adauga_{{ item.stoc_id }}" action="{{ url_for('adauga') }}" method="POST"> <td>{{ item.stoc_id }}</td>...

Extract value of a input hidden DOMXpath php

php,xpath,input,hidden,nodevalue
I need take the attribute value using xpath, I tried several times but always get null. Here is my html code: <input type="hidden" id="Lat" name="myMap" value="22.445575, -18.722164"> Code in php: $val= $xpath->query('//input[@type="hidden" and @name="myMap"]/@value' ); $list=array(); foreach($val as $v){ $list[]=$v->nodeValue; } var_dump($list); $sValue= (string)$val[0]; Notes: I've tried with other xpath...

Html5 input type number formatting

android,iphone,html5,windows-phone-8,input
I have this page where i use the input type number. so that it will show the numeric keyboard on wp, android and ios device . But my problem is that if the user use a culture info on the device for. lets say Denmark. the numeric keyboard shown use...

How to read propositional logic symbols as input using Java Scanner?

java,input,java.util.scanner
Scanner in = new Scanner(System.in,"UTF-8"); System.out.println(in.next()); If I paste ∧, I receive ? as output to the console. Can someone explain what I can do to properly read logic symbols like this? I'm using NetBeans 8.0.1. Thanks....

storing array from user and accessing it

arrays,assembly,input,user,mips
I have to create an int array based on user input, sum the integers, and output the sum and the array itself. My code calculates the sum correctly, but I cannot output the list. It only prints out the last number and zeros and then gets stuck in an infinite...

Scala: load different files by input

file,scala,input
My program has a lot of different functions and one of these is the command "load". As soon as the user types as input "load" he can load in a txt file... The problem is, that my command is not only the "load" word itself, its for example "load numbers.txt"...

Windows Forms C++: Replace dot with comma in textbox input

c++,winforms,input,textbox,c++-cli
I try to tackle very trivial part of problem with autocorrecting users' input to the textbox. I managed to detect whether or not user typed number (as necessary) and control its range. Now I need to autoreplace dots with commas any time user types it into textbox. I expected the...

Limit number of characters in input

javascript,html,input,limit,onkeypress
How do I limit the number of characters in my input? In the following code I want max 14 characters. <script language='JavaScript'> function SomenteNumero(e){ var tecla=(window.event)?event.keyCode:e.which; if((tecla>47 && tecla<58)) return true; else{ if (tecla==8 || tecla==0) return true; else return false; } } </script> <input type='text' size='10' value='' onkeypress='return SomenteNumero(event)'>...

Python - input filters [duplicate]

python,string,input,keyword
This question already has an answer here: Asking the user for input until they give a valid response 1 answer This is a follow up of my other thread on 10 Green Bottles. I now want to know how i can make my input only accept some words/numbers. If...

Count amount of inputfields with the same name in PHP?

php,input,count
I want to count the amount of inputfields with the name "termin"+number+"_von". So if there is one Inputfield with the name "termin1_von", a secound with the name "termin2_von" and third with the name "termin3_von" the code should print "123". cause there are 3 Inputs. What I want is that I...

Keydown function to prevent letters - How to load function before key is entered

javascript,jquery,input,internet-explorer-8
I've taken a code snippet from a different closed post, which mainly works well, apart from one aspect. I have an input field which I need to be numeric only I need to allow for the use of a full stop The code below works fantastically in allowing the above...

HTML Input - already filled in text

html,input,placeholder
I was wondering, is there a way to put text into an input field? What i've got now is a placeholder, but that's actually an empty inputfield. So that's not what i'm looking for. I'm looking for an (kind of) placeholder that's actually filled in into the input field, so...

jQuery: Clear input field if it is not filled in certain time? [closed]

javascript,jquery,input,time
Using jquery or js, how can I clear an input field if it doesn't reach x amount of characters in a certain time? Basically, if an input field doesn't reach 10 characters in 1 second, I want to clear any input that was typed. How can I calculate the time...

How to deal with value of text input created dynamically?

javascript,jquery,dynamic,input
Here's a link <form onsubmit="return false"></form> <label for="quantity">qantity</label> <select name="quantity"> <script> for (var i = 1; i < 81; i++) { document.write("<option value='"+i+"'>"+i+"</option>"); }; </script> </select> <button id="next">next</button> <form id="itemform" onsubmit="return false"></form> <script> $('#next').click(function(){ var quantity = ($('select[name=quantity]').val()); $('#itemform').html(""); for (var i = 0; i...

onclick change value of next or previus div

jquery,input
i am coding a buttons to change the value of the input between them. my html is: <td class="uneven"> <div class="buttonbundle up">+</div> <input onkeyup="bundle.changeOptionQty(this, event)" onblur="bundle.changeOptionQty(this, event)" class="input-text qty" id="bundle-option-1-1-qty-input" type="text" name="bundle_option_qty[1][1]" value="1" /> <div class="buttonbundle down">-</div> </td> And if use onclick on buttonbundle up it must get the value...

Adding Thumbstick Input to a Queue in XNA

c#,input,xna
I'm trying to store the user's most recent controller inputs in a queue, using XNA's GamePadStates. The way I'm attempting to do this is by getting the GamePadState in the current frame, comparing it to the state in the previous frame, converting all button presses and thumbstick inputs to characters,...

Use angular-ui timepicker as input form

angularjs,input,angular-ui-bootstrap,timepicker
I'm using angular-ui timepicker according to the example here. This is my HTML: <timepicker data-ng-model="hour" data-ng-change="changed()" data-hour-step="1" data-minute-step="5" data-show-meridian="ismeridian"></timepicker> In the js file, I'm trying to get the value with var start_hour = { hour:new Date($scope.hour).getHours(), min:new Date($scope.hour).getMinutes() }; But it's only works if I set a new date in...

Why are numbers and special characters inserted into spaces?

c++,input,getline
I've been trying to use getline to recognize the spaces in my string input. Instead of spaces, numbers are special characters are being inserted between words. When I use cin normally the function works, but it doesn't see spaces. How can I change the following so that there are actual...

File not found when using multiple scanners

java,file,input,java.util.scanner,scan
I'm writing a simple program in Eclipse to input and compare two text files. However, I can't seem to import the two text files at the same time. If I delete one of the new scanner objects, it clears my other file; otherwise, it gives me an error that the...

Retrieve value from input next to a button using THIS selector

javascript,jquery,button,input,this
I ran into this problem, I have two siblings, an input and a button which calls a function to retrieve the value in the input, but it keeps telling me that Value is Undefined... Here's the "form": <li> <input id="mem3" value="TestU4" disabled=""> <button id="del3" class="delmem" onclick="deleteBandMember();">remove</button> </li> Here's jQuery Code:...

How to push text from html input into AngularJS array?

javascript,arrays,angularjs,forms,input
I'm new to AngularJS - trying to build a pretty vanilla todo-list app. I can't figure out how to push the text value from the input box into the 'todos' array. Here's my code. HTML: <body ng-controller="MainCtrl"> <div class="container"> <div class="main"> <p>Todo App</p> <input ng-model="todoList" type="text" name="input" placeholder="Enter tasks here">...

How can I submit disable input element in a form?

javascript,html,input
This input tag is disabled but I want to submit this form value. <input type="text" name="quantity" value="400" class="field left" disabled /> Please help me about this tag. Thanks in advance. ...

Is it possible to write a MATLAB script that can give command line input to a function?

matlab,testing,input
I am writing MATLAB code that will fit together with other MATLAB functions that I cannot modify. Some of these existing functions take input from the command line. Is there a way I can write a test script in MATLAB that can call these functions, and then provide the input...

full text search with multiple text input

sql,laravel,input,full-text-search,laravel-5
I'm trying to do a full text search with two text input fields. public function searchmatch() { $hex = Input::get('HEX'); $rgb = Input::get('RGB') $products = DB::table('products')->whereRaw( "MATCH(HEX,RGB) AGAINST(? IN BOOLEAN MODE)", array($hex,$rgb) )->get(); return view('search')->with('products', $products); } However it does not work. I tried storing both inputs into an array...

How to Click All Inputs with the Same Class on Page Load

javascript,jquery,table,input,click
I have a table with multiple rows (hundreds) on my web page. Each table row has an input with the class name of act_inv. I am trying to get JavaScript/JQuery to click each input with the class name of act_inv. Is this possible? And if so, how may I do...

Input value is not respecting padding and breaking container

html,css,input
I'm doing a contact form with a <input type="submit"> to submit the form. I set a padding to my input and I have a large text value. My design is responsive. In mobile my input is set to the 100% of the container, but the text value in the input...

Dynamically Adjust HTML Text Input Width to Content

javascript,jquery,html,forms,input
I can't quite find a clear answer on this, and excuse me if there is one I've missed. I want my text input widths to automatically adjust to the size of the content within them. First with placeholder text than the actual text someone inputs. I've created the below as...

JavaScript: Add table values to input field on button click

javascript,input,data,datatable
I have a DataTable that stores names only. I want to have a button that will add all the names in the DataTable to an text input field. <div id="myTabDiv"> <table name="mytab" id="mytab1"> <thead> <tr> <th>name</th> </tr> </thead> <tbody> <tr> <td>chris</td> </tr> <tr> <td>mike</td> </tr> </tbody> </table> <button id="add" >ADD</button>...

Trying to return one dataset from a function that prints from two functions

python,list,csv,input,data
In this program I am trying get the dataPrinter() function to return just one set of data. Right now the program works well but I would like for it to return just one dataset that includes data from both gen1 and gen2. As shown below, I have already tried creating...

Powershell Data input [closed]

powershell,input,data
I'm looking to make a super simple request for input script that uses said input to be executed in the script below. I can edit the script before I run it each time, but it would be way cooler and more practical if you could just enter the PCname and...

jQuery Code not updating after validation

javascript,jquery,validation,input
I am making a url shortening website and I have some jQuery code that checks the url input and validates it every time the user makes any changes. If it is valid, the field turns green, if not, it stays red until it turns green. It works fine there, but...

Defining a function inside the input of another function in C

c++,c,function,input,function-pointers
I have a function which has a function pointer input. I can easily give function names to it as input. But I wonder if it's possible to define a function as input. For example I have a function like this; void exampleFunction ( void (*functionPointer)( void ) ) { codes...

How to make an input type text look like select dropdown?

jquery,html,css,input
Is there any way by which I can make an input type=text element look like a dropdown? Currently I have a text box which when clicked I am displaying options using jquery and div. I want the text box to have a drop down icon to make it exactly look...

angularjs -date input with ng-model in miliseconds

angularjs,date,input,angularjs-ng-model
I have a number which represents the time in miliseconds since 1970 eg. 1388664300000 with: {{ day.date | date: "dd.MM.yyyy" }} it will render 07.05.2015 ! So far so good. Now I like to insert the same data into my input field: <input type="date" ng-model="day.DUTY"> to let the user adjust...

I can't input the obelus(division symbol) in edittext android

android,input,android-edittext
The title says it all. I am trying to make a calculator and of course, a calculator has a division symbol. The text of the button in the XML file can be changed to an obelus but pressing the button can't input the symbol in the Edittext. Instead, a diamond...

Ignoring characters in the input

c++,input
Input: 3 23 + 47 = machula 3247 + 5machula2 = 3749 machula13 + 75425 = 77038 I was solving a question in spoj where the input was in the form "string + string = string". I had to store the first, second and the third numbers in strings skipping...

How would I go about searching for a string of words across multiple lines

java,parsing,input,io,bufferedreader
This is a homework assignment I am working on which required me to read data from a file and the parse through it finding the line number and starting index of certain key phrases or names. The file is being hosted online so I've decided to use the URL class...

Ensure Dynamic inputs fill 50% of browser width

html,css,input,form-submit
This time I've got a problem with input boxes. If I add only 3 of them, they're taking about 50% of the browser window in width. But when I add more, they are stretching on sides. I want for them to just fit in 50% of browser window no matter...

how to get user to pick inputs Java

java,if-statement,input
Could someone explain how to do the if statement if the user picks the option for 2? import java.util.Scanner; public class PostalTest { public static void main(String args []){ Scanner type = new Scanner(System.in); String object; Double weighte, weightl; System.out.println("\nWhat type of package do you have?\n"); System.out.println("\nMin Weight = 1oz....

I want to check the content of textarea must contains previous inputs' words using javascript

javascript,jquery,html,input,textarea
Is it possible to check the content of textarea must contain previous inputs' all words using javascript or jquery? and if not contains all words than the value of textarea is invalid or will not submit. Please reply me soon. Thanks....

make java multithread wait until input given

java,multithreading,input,wait
Im trying to make a simple code to simulate concurrent connection on a DB2 database using java. my current code looks a bit like this: class TheThread implements Runnable{ @override public void run(){ //make the database connection //need to pause here until any button pressed //execute query to the database...

JQuery And JavaScript Search AutoComplete

javascript,jquery,search,input,autocomplete
I have an HTML code with this line: <input id="search" type="text" placeholder="Search"> And a JS file with those: var arr = ["A", "B", "C", "D"]; $('#search').autocomplete({ source: arr }); I am trying to make a autocomplete for a search engine, But i cant display my results in my HTML Web...