user-input

How to display a MessageBox when wrong input is given and reverting the old value of TextBox using MVVM in WPF

I have been using WPF and its built in validation controls for quiet sometime. I was going through an excellent article in codeproject whose link is given below http://www.codeproject.com/KB/WPF/wpfvalidation.aspx I am having a requirement from one of our clients which I have not been able to chieve using MVVM in WPF. The problem is as ...

How to implement a iPhone-passcode-like input screen in Android?

Hi, I'm developing a Android app for users to input a ID (4 digits), is it possible to use the create a "iphone-passcode-screen-like" input view? Thanks! ...

how to avoid repetition of data for a repeated dropdownlist input?

I have a webpage that should be relatively lightweight, the problem is that i've got a table with editable user data on each line and the data includes a dropdownlist with hundreds of options. i've argued against the use of so much values but i guess i wasn't able to come up with a satisfying solution; so the ginormous dropdownlist stu...

How can I process several inputs at once using cin or getline(), while only pressing "Enter" once?

nodeType* buildSet() { nodeType *first, *newNode, *last; first = NULL; int num = 0; string input = ""; getline(cin,input); stringstream myStream(input); while(myStream >> num) // while(num != -999) { newNode = new nodeType; newNode->info = num; newNode->link = NULL; if(first ...

Java Scanner - why do I get this error?

I'm not new to java, but I cannot figure out why I get this Scanner error. The code compiles fine, but I get the following runtime error Enter item number: Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:840) at java.util.Scanner.next(Scanner.java:1461) at java.util.Scan...

Keyboard Input In A Seperate Class?

Just started learning Java a week or so ago. I have made a little Java program that calculates the amount of reviews, and the average review rating that something has. For instance, on the app store, you would enter in 1 star, 2 star, 3 star, 4 star, and 5 star reviews and the program would calculate the average review score. Anyway, ...

Playing with OpenGL and input from separate threads

Hi, I'm using GLFW for creating OpenGL context and capturing user's input and I wanted to capture whole input actions from other thread than OpenGL context was initially created. Am I able to achieve this by using GLFW, SDL or similar library or need I, for example, use different libraray for each task? And if so, which library would yo...

Output or Input filtering?

Output or Input filtering? I constantly see people writing "filter you inputs", "sanitize your inputs", don't trust user data, but I only agree with the last one, where I consider trusting any external data a bad idea even if it is internal relative to the system. Input filtering: The most common that I see. Take the form post data or ...

Regex to verify filename and relative path with no upward navigation (..\) in Windows

I'm trying to verify that a filename and path input by the user is structurally correct in a C# GUI. I do not need to make sure the file exists, just that the name is a valid windows file name and the path is a valid relative path from the present working directory. Absolute paths must be explicitly denied. Regex was never my thing. A...

How to determine when input is alphabetic?

I been trying to solve this one for a while and can't seem to make it work right.. here is my current work while True: guess = int(raw_input('What is your number?')) if 100 < guess or guess < 1: print '\ninvalid' else: .....continue on Right now I have made it so when a user input a number higher than 1...

Jquery custom select/combobox

Hi, I am using jQuery; I have a select box the options of which are populated from a json object. But because the database is potentially incomplete, I would like to offer the user the ablity to enter a custom value. Most combobox solutions, I have been looking at are malfunctioning one way or the other. What are alternative solutions in...

Affordable options for multi touch desktop device (To test apps on Windows phone 7 emulator)?

I am looking to get into Windows phone 7 development. I am running Windows 7 and i know it supports multi touch which i can then use in the emulator if enabled. Is there any way for me to try this out without me paying a premium for a tablet, phone or touch monitor? Many thanks, Kohan. ...

Input after cin.getline() fails?

I am new to programming. In my textbook, the problem presented it to write a program that asks a user for the rainfall for three months and calculates the average. I used the cin.getline() function to read the user input into an array. The text states that there is no worry of the array being overflowed using the cin.getline() functio...

At least two errors: (syntax) CS0103 and (crashing program) for Loop

I am having two major problems with the source code below (and probably other problems I haven't yet discovered...). Problem Number 1: I have to apply the declared integer fields (day, month, year) under the class Friend to a string array in my Main() method. The way that I wrote the source code below doesn't allow for a definition for...