Search Results

Search found 17195 results on 688 pages for 'input'.

Page 10/688 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • C# / Filter input of a textbox and display notification balloon

    - by asmo
    I'm wondering how to filter the input of a .NET textbox. I already know that I could listen for the KeyDown event and intercept the key, but that won't filter pasted strings by a right-click menu or a CTRL+V. I also don't wan't to completely disable the possibility of pasting of characters in the textbox. The paste action should be cancelled whenever it contains one or more invalid characters. Finally, I'd like to display a notification balloon whenever invalid characters are either entered or pasted. µTorrent already has this exact behavior: How can I achieve this functionality in C# ?

    Read the article

  • iPhone Input with Stacked Views

    - by Forrest
    Hi, I've got a situation in an iphone application where buttons are not receiving input as I expect. Here's the setup: ViewMain - The main view full of various images and labels ViewOverlay - A HUD like overlay view with two UIButton objects. To create my scene I do the following: viewController.view = ViewMain [ViewMain addsubview:ViewOverlay] This view renders as expected, with ViewOverlay correctly rendered ontop of ViewMain. However the two buttons found inside ViewOverlay do not receive touch events and can not be pressed. Tapping them does nothing at all. I very well may be going about this in the entirely wrong direction. Any ideas?

    Read the article

  • Is it safe to display user input as input values without sanitation?

    - by Svish
    Say we have a form where the user types in various info. We validate the info, and find that something is wrong. A field is missing, invalid email, et cetera. When displaying the form to the user again I of course don't want him to have to type in everything again so I want to populate the input fields. Is it safe to do this without sanitation? If not, what is the minimum sanitation that should be done first? And to clearify: It would of course be sanitized before being for example added to a database or displayed elsewhere on the site.

    Read the article

  • c++ strings and file input

    - by Dalton Conley
    Ok, its been a while since I've done any file input or string manipulation but what I'm attempting to do is as follows while(infile >> word) { for(int i = 0; i < word.length(); i++) { if(word[i] == '\n') { cout << "Found a new line" << endl; lineNumber++; } if(!isalpha(word[i])) { word.erase(i); } if(islower(word[i])) word[i] = toupper(word[i]); } } Now I assume this is not working because skips the new line character?? If so, whats a better way to do this.

    Read the article

  • How to detect if a form input element of type file is empty

    - by Ankur
    I have some code which reads a file through a form field of type file <input type="file" ... /> I want to give the user another option of providing a url to a file rather than having to upload it as many are already online. How can I detect when this field is empty on the server side. I am using Apache Commons FileUpload FileItemStream item = iter.next(); name = item.getFieldName(); stream = item.openStream(); if(!item.isFormField()){ if(item.toString()!=""){ .... I need to detect when item is empty. The above code doesn't work, nor does using: if(item.equals(null)){ ....

    Read the article

  • CSS bug in text input field - MSIE7

    - by Uri Bruck
    I have an input text in a form that has a problem in MSIE7. When the text field is filled and I continue typing, the background starts scrolling left along with the text. This is the form when the text field is filled http://img155.imageshack.us/i/screen2rl.jpg/ The background image, a white rectangle with rounded corners, scrolls left with the text, leaving the black background. This is the CSS for this text field: border: none; background: url('/wp-content/themes/pokerbuddy/images/field.png') top left no-repeat; width: 100px; height: 20px; padding: 0px; font-size: 80%; color: #399; display:inline; Is there any way to solve this in MSIE7?

    Read the article

  • Flex Application for PlayBook Text Input Variable

    - by user568128
    I know this is probably a very simple question, but can someone please walk me through how to take what a user inputs into a s:TextInput and use that as a variable in a JSON data request? Basically, I want to have a user enter a search term, like "math" and then have that placed into a variable so I can use it in a JSON request. Something like public var q:String, except that my search box (and hence user input) is on another "view" of the application. I've just started with Flex Mobile applications and I might be way out of my league. Does anyone know how to do this?

    Read the article

  • How to disable the all Fieldset Input, textarea, select except input checkbox

    - by kumar
    Hello friends, I have this code in my view this code will execute each users based on selection if I select 3 users this code will execute three times and displays three seperates in same page with differnt users.. Here is my code... I used this code.. this is disabling only frist user Fieldset not for all other fieldsets? and in this Fieldset Except Input check box I need to disabled all other Inpu,select,textarea.. need to disabled.. Please can any one help me I need to hide all the Fieldsets.. thanks

    Read the article

  • Best way to set a default button (or trigger its event in javascript) for an input field, not part of a form

    - by Sheldon Pinkman
    I've got a stand-alone input field, not part of any form. I also got a button, that has some onclick event. When I type something in the input field, and press the Enter key, I want it do effectively press the button, or trigger its onclick event. So that the button is "the input field's default button" so to speak. <input id='myText' type='text' /> <button id='myButton' onclick='DoSomething()'>Do it!</button> I guess I can mess around with the input field's onkeypress or onkeydown events and check for the Enter key, etc. But is there a more 'clean' way, I mean something that associated the button with that input field, so that the button is the 'default action' or something for that field? Note that I'm not inside a form, I am not sending, posting, or submitting something. The DoSomething() function just changes some of the HTML content locally, depending on the text input.

    Read the article

  • JQuery plugin: catch events for clicking/tabbing into and out of an input box

    - by poswald
    I'm creating a Javascript JQuery Timepicker control plugin (which I hope to open source soon) and I would like some advice on how to best register the events in the cleanest way. The control will attach to an <input> box and provide a graphical way to enter times of day ( 14:25, 2:45 AM, etc...). It does this by adding a <div> after the input box. What I want is to bind an openControl() function that fires when the input is clicked or tabbed to, and a closeControl() function that fires when the input box is tabbed away from or deselected but not if the control itself is clicked. That is, I don't want to close the control if you're clicking inside of the control's <input> or the <div>. Here's what I have been doing to try to get there: /* Close the control attached to the passed inputNode */ function closeContainer(inputNode, options) { $input = $(inputNode); if ( $input.next().is(':visible')) { $input.next().hide(options.hideAnim, options.hideOptions, options.hideDuration, options.onHide ); } } /* Open the control */ function openContainer(node, options) { $input = $(node); $input.next().show(options.showAnim, options.showOptions, options.showDuration, options.onShow ); // bind a click handler for closing the contol $("body").bind('click', function (e) { $('.time-control').each( function () { $input = $(this).prev(); // only close if click is outside of the control or the input box if (jQuery.contains(this, e.target) || ($input.get(0) === e.target) ) { closeContainer($input, options); setTime($input, $input.next(), options); } else { closeContainer($input, options); } }); }); } I want to add support for tabbing in/out but I feel like this approach is wrong. Focus/Blur wasn't working well because the blur event fires if you click on the control. Should I be using those events but filtering out if they are inside the control's div? Anyone have a better way of doing this? Thanks!

    Read the article

  • Cannot delete .Trash-503 directory, returns a $RECYCLE.BIN.trashinfo: Input/output error

    - by Parto
    I cannot delete .Trash-503 folder via GUI or terminal, it returns a $RECYCLE.BIN.trashinfo: Input/output error Not even sudo rm -r or even a simple ls works in that trash directory. Check terminal output below: subroot@subroot:~$ cd /media/xxxxx/ subroot@subroot:/media/xxxxx$ rm .Trash-503/ rm: cannot remove `.Trash-503/': Is a directory subroot@subroot:/media/xxxxx$ rm -r .Trash-503/ rm: cannot remove `.Trash-503/info/$RECYCLE.BIN.trashinfo': Input/output error rm: cannot remove `.Trash-503/info/found.000.trashinfo': Input/output error rm: cannot remove `.Trash-503/info': Directory not empty subroot@subroot:/media/xxxxx$ sudo rm -r .Trash-503/ [sudo] password for subroot: rm: cannot remove `.Trash-503/info/$RECYCLE.BIN.trashinfo': Input/output error rm: cannot remove `.Trash-503/info/found.000.trashinfo': Input/output error subroot@subroot:/media/xxxxx$ cd .Trash-503/ subroot@subroot:/media/xxxxx/.Trash-503$ ls info subroot@subroot:/media/xxxxx/.Trash-503$ cd info/ subroot@subroot:/media/xxxxx/.Trash-503/info$ ls ls: cannot access $RECYCLE.BIN.trashinfo: Input/output error ls: cannot access found.000.trashinfo: Input/output error found.000.trashinfo $RECYCLE.BIN.trashinfo subroot@subroot:/media/xxxxx/.Trash-503/info$ What's going on here and how can I delete this folder? EDIT I tried checking and repairing the partition using gparted only to get this error message: ERROR: Filesystem check failed! ERROR: 264 clusters are referenced multiple times. NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE! The usage of the /f parameter is very IMPORTANT! No modification was and will be made to NTFS by this software until it gets repaired. I don't have windows installed, how can I run chkdsk /f from ubuntu?

    Read the article

  • Design of input files reading when it comes to defaults/transformations

    - by Stefano Borini
    Suppose you have an application that reads an input file, on a language that does not support the concept of None. The input is read, parsed, and the contents are stored on a structure for later use. Now, in general you want to keep into account transformation of the data from the input, such as adding default values when not specified, or adding full path information to relative path specified in the input. There are two different strategies to achieve this. The first strategy is to perform these transformations at input file reading time. In practice, you put all the intelligence into the input parser, and your application has no logic to deal with unexpected circumstances, such as an unspecified value. You lose the information of what was specified and what wasn't, but you gain in black-boxing the details. Your "running code" needs that information in any case and in a proper form, and is not concerned if it's the default or a user-specified information. The second strategy is to have the file reader a real one-to-one mapper from the file to a memory-stored object, with no intelligent behavior. unspecified values are not filled (which may however be a problem in languages not supporting None) and data is stored verbatim from the file. The intelligence for recovery must now go into the "running code", which must check what was specified in the file, eventually fall back to a default, or modify the input properly before using it. I would like to know your opinion on these two approaches, and in particular which one you found the most frequently implemented.

    Read the article

  • Do input template languages exist?

    - by marczellm
    When I have to create some textual representation of data, I can use a template language, so that my code does not have to worry about the structure of the output file - I can sometimes even write code that's independent of whether the output is XML, LaTeX or any other plain text. A simple example: Template (in separate file): <someXmlTag> $variableName </someXmlTag> Code: Template(temstring).substitute(variableName="value") Result (written to output file): <someXmlTag> value </someXmlTag> I want to do the same, but in the opposite direction. I have XML or plain text or whatever files to input. I want to describe the input structure in a separate file that looks like the input but has these variable declarations in it, and I want to handle it with code that's independent of the structure. Is there a library for this concept? (We usually handle XML input by using an XML parser library to describe the input structure in program code, handle plaintext input by writing regexes in code, and don't handle LaTeX input because LaTeX can't really be parsed.)

    Read the article

  • php form-input validation

    - by fusion
    i have a html page in which i enter data which then submits and inserts in a database on a php page. how would i validate in php that the data received is not a duplicate of the data in the database? any help appreciated.

    Read the article

  • Limit user input to allowable comma delimited words with regular expression using javascript

    - by Marc
    I want to force the user to enter any combination of the following words. the words need to be comma delimited and no comma at the beginning or end of the string the user should only be able to enter one of each word. Examples admin basic,ectech admin,ectech,advanced basic,advanced,admin,ectech my attempt ^((basic|advanced)|admin|ectech)((,basic|,advanced)|,admin|,ectech){0,2}$ Thanks Marc

    Read the article

  • Joystick input in Java

    - by typoknig
    Hi all, I am making a 2D game in Java and I want to use a joystick to control the movement of some crosshairs. Right now I have it so the mouse can control those crosshairs. My only criteria for this is that the control for the crosshair must stay in the game window unless a user clicks off into another window. Basically I want my game to capture whatever device is controlling the crosshairs much like a virtual machine captures a mouse. The joystick I am using (Thrustmaster Hotas Cougar) comes with some pretty advanced features, so that may make this easier (or harder). I have tried the solution listed on this page, but I am using a 64bit computer and for some reason it does not like that. I have also tried to use the key emulation feature of my joystick, but with little success. Here is what I have so far, any pointer would be appreciated. Main Class: import java.awt.Color; import java.awt.Cursor; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; import java.awt.Graphics; import java.awt.Image; import java.awt.image.BufferStrategy; import java.awt.image.MemoryImageSource; import java.awt.Point; import java.awt.Toolkit; import javax.swing.JFrame; public class Game extends JFrame implements MouseMotionListener{ private int windowWidth = 1280; private int windowHeight = 1024; private Crosshair crosshair; public static void main(String[] args) { new Game(); } public Game() { this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setSize(windowWidth, windowHeight); this.setResizable(false); this.setLocation(0,0); this.setVisible(true); this.createBufferStrategy(2); addMouseMotionListener(this); initGame(); while(true) { long start = System.currentTimeMillis(); gameLoop(); while(System.currentTimeMillis()-start < 5) { //empty while loop } } } private void initGame() { hideCursor(); crosshair = new Crosshair (windowWidth/2, windowHeight/2); } private void gameLoop() { //game logic drawFrame(); } private void drawFrame() { BufferStrategy bf = this.getBufferStrategy(); Graphics g = (Graphics)bf.getDrawGraphics(); try { g = bf.getDrawGraphics(); Color darkBlue = new Color(0x010040); g.setColor(darkBlue); g.fillRect(0, 0, windowWidth, windowHeight); drawCrossHair(g); } finally { g.dispose(); } bf.show(); Toolkit.getDefaultToolkit().sync(); } private void drawCrossHair(Graphics g){ Color yellow = new Color (0xEDFF62); g.setColor(yellow); g.drawOval(crosshair.x, crosshair.y, 40, 40); g.fillArc(crosshair.x + 10, crosshair.y + 21 , 20, 20, -45, -90); g.fillArc(crosshair.x - 1, crosshair.y + 10, 20, 20, -135, -90); g.fillArc(crosshair.x + 10, crosshair.y - 1, 20, 20, -225, -90); g.fillArc(crosshair.x + 21, crosshair.y + 10, 20, 20, -315, -90); } @Override public void mouseDragged(MouseEvent e) { //empty method } @Override public void mouseMoved(MouseEvent e) { crosshair.x = e.getX(); crosshair.y = e.getY(); } private void hideCursor() { int[] pixels = new int[16 * 16]; Image image = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(16, 16, pixels, 0, 16)); Cursor transparentCursor = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(0, 0), "invisiblecursor"); getContentPane().setCursor(transparentCursor); } } Another Class: public class Crosshair{ public int x; public int y; public Crosshair(int x, int y) { this.x = x; this.y = y; } }

    Read the article

  • MacOS Virtual Input Devices

    - by computergeek6
    How can I create a virtual HID device in code? I'm trying to avoid writing a kernel extension to accomplish this, but it seems to be the only way. I need to be able to create virtual HID devices of all types, and have an app running in the background feed them events. Is there a way to do this in user-space, or must I venture into kernel land?

    Read the article

  • Drupal filter_form form input

    - by ernie
    This drupal form snippet will give me a textarea with user able to change filter to full html/wysiwyg mode. My Questions: How can I default to to full html mode? function MY_MODULE_admin() { $form = array(); $form['format'] = filter_form($form->format); // MY_MODULE - ** Image 1 ** $form['MY_MODULE_image_1'] = array( '#type' => 'textarea', '#title' => t('Image 1'), '#default_value' => variable_get('setup_image_1', 'image_1.jpg'), '#description' => "Current value =" .variable_get('setup_image_1', 'image_1.jpg'), '#required' => TRUE, );

    Read the article

  • Safari Textbox input with xcode

    - by Tim
    Hi, I am new to Xcode and would like to make a simple plug-in so that the plug-in can set the value to safari text box and get the id of the text box. Could someone please point me to the right direction? Thanks in advance.

    Read the article

  • Removing input background colour for Chrome autocomplete?

    - by DisgruntledGoat
    On a form I'm working on, Chrome is auto-filling the email and password fields. This is fine, however, Chrome changes the background colour to a pale yellow colour. The design I'm working on is using light text on a dark background, so this really messes up the look of the form - I have stark yellow boxes and near-invisible white text. Once the field is focused, the fields return to normal. Is it possible to stop Chrome changing the colour of these fields?

    Read the article

  • Formatted input in c++

    - by julz666
    hey, i'm a noob to c++ (and coding in general) i'm looking for an easy way to take two doubles (at once) from the keyboard and store them in a struct i've created called "Point" and then ultimately store the Point into a vector of Points that's a member of a class (called "Polygon"). i know i could do it with a scanf but need to know how to do it with cin. hope that makes sense. thanks in advance julz

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >