input

AS3 - Allow Forward Slash In Input Text?

i'm trying to allow forward slash to be entered in my input text field myInputField.restrict = "A-Za-z.\\-\\/"; the above text field should allow upper case letters, lower case letters, periods, hyphens and forward slashes. however, i can't seem to permit the forward slash. ...

Java: display number of times a letter appears in a string

This is from Sun's tutorial's exercise area so I suppose it is homework. I know how to use a for loop to iterate the string, but I wish to learn arrays while I am at it and store them in so. This is what I got so far: BufferedReader in = new BufferedReader(new FileReader("xanadu.txt")); int c; char letters[] = new char[27]; //26 + newl...

ASP .NET Event Wire-Up for <input type="button"> tag (not asp:button or server link)

Here is what I want to do. Use this HTML line and have the ASP .NET server-side deal with the onclick event. I don't want to use nor do I want to use an anchor tag which would both allow me to capture the server-side successfully. I want to use this: <input type="button" id="submit" name="submit" value="See Your Results" onclick=""...

Understanding scanf() in C (Seg Fault)

I don't understand getting input in C. I have the following code which is producing a segmentation fault: int main(int argc, char *argv[]){ while (fgets(buffer, MAX_LEN + 1, input) != NULL) { get_command(t, buffer); } return 0; } and static void get_command(Table *t, char *command) { COMMAND command_name = 0; char *valid_...

iPhone: Pan to move image using touchesBegan, touchesMoved, and touchesEnded.

I have an image in a view which contains a 9x9 grid. I want to move the object along the grid, which is made up of a column array(9) inside another array(9), using a pan movement. The image should move square to square in the grid. The code below is what I have so far. The problem is the image jumps 3 - 4 squares at a time. It is much to...

How to load data on a text field?

I have two text fields and whenever I write a number in the first one, it should give me its name on the second field. Let's say I write 11 on the "first" field, then it should automatically put the word 'eleven' (NOT number itself) on the "second" field. And the same thing with any number. I know this can be done with jQuery but I jus...

SFML Input system problem

So I was porting my game engine from SDL to SFML, and now I have a problem with my input system. Input.h #ifndef BULLWHIP_INPUT_H #define BULLWHIP_INPUT_H #include class bc_Input { public: bool bm_KeyHit(sf::Key::Code key); bool bm_KeyDown(sf::Key::Code key); int bm_MouseX(); int bm_MouseY(); ...

android softkeyboard onTouch()

What is best way to implement custom SoftKeyboard, so it recognize where user push, and where user release, and then use both coordinates to determine character? E.g. if i push Q, then move finger to E, then release. Application should get 2 coordinates. Basically simple line. One way is to make it trough buttons and using onTouch(View...

Intercept mouse input

I was wondering if there is a way to intercept and modify mouse input before it gets to windows? What I'm wanting to do is intercept mouse motion events, apply some custom scaling and acceleration to the values, and then continue passing them along. I'd need something that can do this before the inputs get to the raw input API or Direct...

Input values in table with spring

I have a component in Spring 3 form, that should store multiple int values in its input path. For that purpose I have created a table private int [] table and getters and setters. input path ="table"; It works kinda, but when I try to get table values and size, I get null pointer exception. I have former example which works, and it...

escaping input in php

hi! I wrote a code.. but now I don't know which version is a better one.. Is there any possibility couse of 1st version my code is vulnerable? Version 1: $destination = $_POST['var']; $destination = strip_tags(trim($destination)); Version 2: $destination = strip_tags(trim($_POST['var'])); ...

Form Input from Link

Hello, So I have: <input type="text" id="keyword" placeholder="placeholder" value="" /> What is the best way to go about defining the value based on the link? ie. http://mysite.com/valueplacer?=thisisthevalue Does this: <input type="text" id="keyword" placeholder="placeholder" value="thisisthevalue" /> Thanks! ...

Difference between value and defaultValue for a text input in Javascript?

What is the difference between value and defaultValue for text inputs in Javascript? And what are the implications of using one instead of the other? Are they free interchangeable? i.e., does changing one change the other? ...

How can I get data from input fields that are on master page?

Hi, I'm using ASP.NET MVC 2 technology for developing my web site. I have two input fields in my master page (username and password) and one submit button. How can I get data from those input fields? Please help. ...

Java: Using the Scanner class to read input from a file without pipeing.

I currently have an implementation of a program where I read in the input using the Scanner class. Integer by integer. I do this by piping the input file via the command line. java program < input.txt I need to avoid piping the input by using an argument on the command line to open the file in my program. java program --file=in...

Capturing console stream input

Hi! I would like to make a console application (c# 3.5) which reads stream input. Like this: dir > MyApplication.exe The app reads each line and outputs something to the console. Which way to go? Thanks ...

Google Chrome > Textboxes > Yellow border when active..?

Hey, Ive been modifying a form today, and testing it in Chrome. I noticed that on selecting a textbox, with border: 0 or none, it still puts a yellow border around it. Does anyone know of a way to get rid of this border? I usually wouldnt be that bothered but it looks really horrible with the colour scheme I am using. Thanks in advance...

linux and perl script input

Alright, some of you might have noticed I've been working on this problem off and on for about 3 weeks. I cannot figure out for the life of me whats going on.. Below is the perl script that saves input from USB card reader which acts like a keyboard. The machine is an embedded system running off of a compact flash drive, using voyage lin...

Break line after input without html markup

Hi, I am trying to display a number of inputs and their corresponding labels. They are both inline elements, and I have a working solution with adding a br tag at the end like so <label for="hello"></label> <input id="hello" type="text" /> <br> <label for="stackoverflow"></label> <input id="stackoverflow" /> Id like to solve this with...

Character by Character Input from a file, in C++

Is there any way to get input from a file one number at a time? For example I want to store the following integer in an vector of integers since it is so long and can't be held by even a long long int. 12345678901234567900 So how can I read this number from a file so that I can: vector<int> numbers; number.push_back(/*>>number goes h...