input

Detect key press (non-blocking) w/o getc/gets in Ruby

I have a simple task that needs to wait for something to change on the filesystem (it's essentially a compiler for prototypes). So I've a simple infinite loop with a 5 second sleep after the check for changed files. loop do # if files changed # process files # and puts result sleep 5 end Instead of the Ctrl+C salute, I'd ...

jquery datepicker multiple instances

Hello veryone! I have made a RequestForQuote form, in which I give the possebility to add new positions to get RFQ'ed. In basics this is quite easy done via PHP in my case. Work realy fine. You may want to have a look. It is to be found at: my website Now I got infected with the jquery-virus and simply wanted to add the datepicker ui ...

A question about input in Python

This is somewhat of a simple question and I hate to ask it here, but I can't seem the find the answer anywhere else: is it possible to get multiple values from the user in one line of Python? For instance, in C I can do something like this: scanf("%d %d", &var1, &var2). However, I can't figure out what the Python equivalent of that is....

Should my framework allow access to $_GET and $_POST at the same time?

Hi, I know you can use both $_GET and $_POST at the same time, but is this a required "feature"? I am writing a framework, where you can access input through: $value = $this->input->get('name',''); $value = $this->input->post('name',''); $value = $this->input->cookies('name',''); I'm just thinking here, is there a need for having GET...

Why Use java.io.Console?

Just a quick one here. What are the benefits of using java.io.Console as opposed to using a BufferedReader wrapping an InputStreamReader for System.in? Why would I use it? Thanks for any advice! ...

How can I use Jquery's Coolinput to show the hint "Enter your password" in a password field, but then use stars to hide the input when user types?

pretty self explanatory... ...

Is there a way to simulate Windows input with C++?

I'm wondering if its possible to make a program in C++ that can "press" keys, or make the computer think certain keys have been pressed, and do things like make a program that "plays" games, or automatically enter some long and obscure button sequence that no one could remember. (I can't think of any right now, but savegame passwords mi...

Safari input file styling with css?

How does one style a form input field of type 'file' for Safari/Chrome and other Webkit based browsers? Right now, all i get is the 'Choose File' button displayed on top of the usual text type box. I've looked around a bit on Google, but havent really seen anything helpful any help? ...

How to get the form parent of an input?

Hi, i need to get a reference to the FORM parent of an INPUT when I only have a reference to that INPUT. Is this possible with javascript (or else jQuery) ? function doSomething(element) { //element is input object //how to get reference to form? } This doesn't work: var form = $(element).parents('form:first'); alert($(form...

Entering data into a grid

A UI question: is there some consensus on the best (defined as "the one which end-users like best") or least-bad way to implement data entry into a grid? I have a grid, with many rows. The grid's columns contain various types of properties, which the user can enter/edit. The "types" of properties include: Free text Numbers (numeric di...

Is there a PHP function to call all variables from a form?

Hey, I'm programming a feedback form on a website for a client, however, there are over 100 inputs (all uniquely named). I was wondering if there was a loop I could run to get all of the variables, do you have to call them like this: $variable = $_REQUEST['variable']; EDIT: I'm going with $_POST as recommended by everyone here - than...

Is the "id" in an input tag necessary?

<p> <input type="text" id="search" name="keywords" /> <input type="submit" value="Search" name="Submit" /> </p> For the above code I was getting validation errors, but once I removed the id="search" the validation was good and error-free. I thought you needed an id, but I'm wondering if it is supposed to be there? ...

Keyboard input using ActionScript 3

I am learning how to use Flash using CS4, and focusing mainly on ActionScript3 (since I come from a coding background and not a designer background). I want to respond to the user pressing keys on the keyboard. I have used the official example source at the Flash reference site and followed the CS4 instructions for classes. However,...

Asp.net Time Input Control Suggestions

Can anyone recommend a Time Input control for an asp.net web application? It should be able to handle the following items Am/Pm 24 Hour client side validation client side completion (if you start the hour with a 3 then jump to minute) one textbox (not separate textboxes for hours and minutes, or drop downs) ability to actually type ...

How to set option: selected in multiple selects

After some struggle, I got upto the following code for my problem. However it still does not add selected to a chosen option. You can find my original question below. Improved code, but it still does not work. var $index = $('.drop').index(this) // find drop index... var $indexofmonth = $index + 1; //alert($indexofmonth); // this works ...

How to test a Python script with an input file filled with testcases?

I'm participating in online judge contests and I want to test my code with a .in file full of testcases to time my algorithm. How can I get my script to take input from this .in file? ...

Change Input Type

Hi Everyone: I am working on a fairly dynamic site, and I want the user to be able to choose what they want to input. The input choices are the various types of input (text, password, etc.) Is there some style/way to create this? I was thinking that they choose from a drop down menu and then Javascript takes care of the rest. But I ...

How do I extract a value from inside of a formatted string?

Hello, I got a string array and values are as follows sNames[0] = "Root | [<root>] | [ID = 1]"; sNames[1] = "Planning | [Root] | [ID = 2]"; From this I would like to just extract ID value .. 1,2.. for now am do this as : foreach (var s in sNames) { int id = Convert.ToInt32(s.Split('|')[2].Split('=')[1].Substring(1,1)); ... } ...

Should We Mask Passwords?

From Jacob Nielson's "Stop Password Masking": Usability suffers when users type in passwords and the only feedback they get is a row of bullets. Typically, masking passwords doesn't even increase security, but it does cost you business due to login failures. What do you guys think? ...

Why was the background color of the two input different ?

As can be seen,I didn't specify background color of input,but one is gray,ther other is white,why? <style> .baken { border:1px solid #888888; font-family:Trebuchet MS,Helvetica,sans-serif; font-size:130%; font-weight:bold; margin:3px; padding:2px; } </style> <input type="button" class="baken" value="answer you...