input

How to take the input from user in console or file with ease in c#?

I am a C++ user and now trying to use c#. In c++ taking input from the user was fun (just >>) and supported all the types. So was for the files. But in c# it is too complex, as I can take only strings. Then I have to manipulate it for later use. And if I want to take multiple inputs in same line separated by whitespaces, it become more...

Ho do I go about getting and setting the input language of another application?

Here's the problem: I have a user with disabilities and using a specialized virtual keyboard. He doesn't have any trouble switching languages in his virtual keyboard, but it doesn't always change the input language (input keyboard?) of the currently-active application - which is exactly what he needs. So is there any API calls I can do ...

Take input text, print to page and open new window onclick

What I need help with: My page shall take user input text, then show what was entered on the page (no alert) and open a new window on click if a match is found that would be stored in an array or var. Here is the line I am having trouble with below: onclick="insert(this.form.name.value),show();"/> Here is the code thus far: ...

input hidden and updatePanel (a story of ASP.NET AJAX)

Hi! How can update a input hidden inside an UpdatePanel on an AsyncPostBack? The user click a button outside the panel. The method associated with click event update the value of the input (it has runat="server" property). I can't update the value of this input. I need to store a value to use in the following postback. Maybe I can us...

Asynchronous input in Lua

In a related question I asked how to get input via IUP. This works fine, except that it goes through the system, and is subject to the repreat rate which is not optimal for a game. What I would really like is the ability to obtain the current state of any key at a given time. Is there a way to do this (through IUP or otherwise)? ...

Is the CPU wasted waiting for keyboard input? (generic)

I was wandering if there's a way in witch the OS doesn't need to cycle ad infinitum waiting for the input from keyboard (or other input device) and if there are any OS using that. I can't believe that we do need to waste cycling just to wait for input, why can't the input do something once is pressed instead of having the machine to wait...

Automatically capitalize all input in WPF

Is there a way to automatically capitalize all input thoughtout a WPF app? ...

How to change input method in WPF ?

I want to change the input method for text box in my WPF application. Can anyone please help ...

How do I copy PART of an input field to another field?

I know how to copy an input field to something else. No prob. How do I copy part (ie. the month of a date field) to another field. I want to take a field that is a date range (ie. 7-13-09 to 7-15-09) and copy it to two input fields (ie. the start date and end date) ...

How to make Java console input dissapear after pressing enter

I'm using the Scanner class to take some input from the user through the console. Whenever the user inputs something in the screen and presses enter the input stays on screen for example: This is the prompt // User writes command and presses enter command output of command goes here //Use writes command3 command output of command ...

edit a body of text from the command line in C

I am writing some small program in C--some log in, log out, create account, send message to another account deal--that I can build on and change and innovate and polish up to refine my skills in C. What I am trying to figure out how to implement is part of the "compose message" option. After you are prompted for the recipient, subject, ...

peek at input buffer, and flush extra characters in C

If I want to receive a one character input in C, how would I check to see if extra characters were sent, and if so, how would I clear that? Is there a function which acts like getc(stdin), but which doesn't prompt the user to enter a character, so I can just put while(getc(stdin)!=EOF);? Or a function to peek at the next character in th...

Reading line X until line Y from file in C++

I have a relatively simple question. Say I have a file but I only want to access line X of the file until line Y, whats the easiest way of doing that? I know I can read in the lines one by one keeping count, until I reach the lines that I actually need, but is there a better more elegant solution? Thanks. ...

Multiple mice on OS X

I am developing an OS X application that is supposed to take input from two mice. I want to read the motion of each mouse independently. What would be the best way to do this? If that is not possible, is there a way to disable/enable either of the mice programmatically? ...

how to change the input source (language) in java (instead of using Shift+alt)?

I am writing an application to remap some of the keyboard keys. I want to add a button so that if the user clicks on it, the input source will change to the next input in the OS. I am using it to input source arabic and english. What should I use, and is it possible to do that in java? ...

Lightweight OBJ mesh file loader for C/C++?

I'm looking for a simple lightweight Wavefront OBJ mesh file reader for C or C++. (ie. given a mesh in OBJ format, read it in from a file, and make it accessible, preferably as a list of vertices and triangles.) Recommendations? It doesn't need to support material properties or any other fancy data that might be present - just the geom...

Trouble reading a line using fscanf()

I'm trying to read a line using the following code: while(fscanf(f, "%[^\n\r]s", cLine) != EOF ) { /* do something with cLine */ } But somehow I get only the first line every time. Is this a bad way to read a line? What should I fix to make it work as expected? ...

Taking input in Java without program hanging?

I was just wondering how i would let my java program continue running, but always be ready to take input. Right now i am using a bufferreader and reading in a line, but that makes my program halt and wait for input. I want the program to continue running but be ready to take input whenever needed, is there a way to do this? ...

How to convert date in Text box to MySQL DATETIME format

Hi, I'm quite new to php and have been reading Larry Ullman book to develop a basic db site. I have used the YUI Calendar pop up date picker to add a date to a text field called"date". The date format it enters is eg Thursday, 7 May 2009 I have tried many different ways to try and enter the date in to mysql db but it remains at 00 00 00...

Datatable with rows of inputs

I have a datatable that generates rows of text inputs and selection lists and when I submit the values are null. I realize this is because jsf is generating separate random ID's for each input. I really need the data by rows and then parse out what I need. Any suggestions?: <h:dataTable id="returnableItems" value="#{returnableItemsBean....