input

jQuery selector for inputs with square brackets in the name attribute

I want to do this: $('input[inputName=someValue]') Except that the name of the input is not 'inputName', it is 'inputName[]'. And this doesn't work: $('input[inputName[]=someValue]') and neither does this: $('input[inputName[]=someValue]') or this $('input["inputName[]"=someValue]') Thanks for any help. EDIT: As som...

How would one handle bits from a file?

ifstream inStream; inStream.open(filename.c_str(), fstream::binary); if(inStream.fail()){ cout<<" Error in opening file: "<<filename; exit(1); } Let's say we just want to deal with individual bits from the file. I know we can read the file char by char, but can we read it bit by bit just as easily? ...

Input in C. Scanf before gets. Problem.

Hi! I'm pretty new to C, and I have a problem with inputing data to the program. My code: #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int a; char b[20]; printf("Input your ID: "); scanf("%d", &a); printf("Input your name: "); gets(b); printf("---------"); printf("Name: ...

How do I prevent crashing due to invalid input in C#?

The program I've written is set to only accept positive integers as input. If the user inputs a letter instead, then it crashes. Negative integers don't cause any problems, though it's not 'valid' in regards to how my program functions. What I want to do is: Prevent the program from crashing from invalid input. Display an error messag...

HTML input textbox with a width of 100% overflows table cells

Does anyone know why the input elements with a width of 100% go over the table's cells border. In the simple example below input box go over the table's cells border, the result is horrible. This was testet and it happens in the same way on: FF, IE7 and Safari. Does it make sense for you? Am I missing something, do you know about a possi...

Output to console while preserving user input in ruby

I have a ruby script that is simultaneously and asynchronously receiving and displaying messages from a server, and allowing user input on the console. When a message is received, it is currently being written in the middle of what the user is typing. The input itself isn't garbled, but it looks horrible. Ideally, it would save the users...

How do I use buttons and text boxes in a winform application in C#?

I'm trying to make my console application into a winforms application. The console version would ask for multiple inputs, then return output. For the winforms version, I want to have multiple text boxes for the user to enter the data, with a button to reset them all, and another to actually perform the calculation. Then there'd be a di...

How to get selected text in a HTML Input Text Box

Hi All, I would like to get selected text from HTML Input Text Box including character positions. Please help me. ant. ...

First while loop's first iteration always fails to take input. 2+ loops work fine.

The bug starts at cin.getline ( string, 25, '\n' ); or the line below it (strtod). If I use cin, it works, except I cannot quit out. If I type anything that's not a double, an infinite loop runs. Need help. Basically, the first iteration runs, does not ask for input, so the user gets the math questions wrong. The second iteration works f...

How to detect mouse and keyboard inactivity in linux

I am developing an app on python which will check for user inactivity. Is there a way to check for key press and mouse move events in linux? ...

ff safari space below input value

How do I get rid of the seemingly default padding below text in an input on Firefox relative to Safari (where there is no space -what I want) http://branklin.com/queue/soq.php ...

Get value of inputs with Jquery

I have 100 inputs with name - table[]. How to get their value with jQuery,like $_POST['table'] ,as I do in PHP. I tryed Code: $("input[name='table[]']").each(function() { document.write($(this).val()); }); but I want to get them as an array. ...

Is there a datetime control for the Zend framework?

Here I have a password field: /*********************PASSWORD**********************/ $password = new Zend_Form_Element_Password('password'); $alnumValidator = new Zend_Validate_Alnum(); $password ->setRequired(true) ->setLabel('Password:') ->addFilter('StringToLower') ...

jQuery accordion - set input focus for active accordion?

*Nevermind. I figured it out. * I did it like this: $("#accordion").accordion({ header:'h3', active: '#section1', autoheight: false, clearstyle: true, }).bind("change.ui-accordion", function(event,ui) { $("#text1").focus(); }); I've got an accordion all set up, and each div has a form within it. ...

(MySQL) Ignore lines with a starting symbol when importing a file

I have an input file I want to load into a MySQL database, but spread throughout the file are comment lines, which start with !. For example, !dataset_value_type = count The other lines that I want to read into the table are normal, without the leading !. What is the import command to ignore lines that start with !? I just see comma...

How to give a input date format in iphone

Hi, i am new to iphone development. In my input date format is "2010-03-05T18:20:40Z", and i donno to how to give a input format of my code.So i have mentioned in my code (?). input date format = "2010-03-05T18:20:40Z" Here my code is: NSString *indate = @"2010-03-05T18:20:40Z"; NSDateFormatter *inputFormatter = [[NSDateFormatter allo...

How to take input for a character pointer without using fgets?

consider the code #include<stdio.h> int main(void) { char* a; scanf("%s",a);//&a and &a[0] give same results-crashes printf("%s",a); return 0; } why does this code results in crashing?whereas this code using character array works fine? #include<stdio.h> int main(void) { char a[100]; scanf("%s",&a[0]);//works fine ...

How to manually check a YUI radio "button".

<script type="text/javascript"> (function () { var ButtonGroup = YAHOO.widget.ButtonGroup; var onCheckedButtonChange = function (p_oEvent) { }; YAHOO.util.Event.onContentReady("mediaFilterButtonsFieldset", function () { var oButtonGroup = new ButtonGroup("mediaFilterButtons"); oButt...

C++ input chaining in C#

I am trying to learn C# coming from C++. I am writing just some basic console stuff to get a feel for it and was wondering if it is possible to do simple chaining of inputs in C#. For example in C++: cout<<"Enter two numbers: "; cin >> int1 >> int2; You could then just input 3 5 and hit enter and the values will be fine. In C# however...

is there a function to add forward slashes before " inverted commas in a string

I am using PHP, i want to display a string which comes as title of a post, in a textbox as value. if this title has inverted commas then the string value tag of input field terminates on that quote. now as there is an add slash function to add back slashes, is there a similar function to add forward slashes ? but just before quotes, and ...