Search Results

Search found 18702 results on 749 pages for 'digital input'.

Page 7/749 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How would I handle input with a Game Component?

    - by Aufziehvogel
    I am currently having problems from finding my way into the component-oriented XNA design. I read an overview over the general design pattern and googled a lot of XNA examples. However, they seem to be right on the opposite site. In the general design pattern, an object (my current player) is passed to InputComponent::update(Player). This means the class will know what to do and how this will affect the game (e.g. move person vs. scroll text in a menu). Yet, in XNA GameComponent::update(GameTime) is called automatically without a reference to the current player. The only XNA examples I found built some sort of higher-level Keyboard engine into the game component like this: class InputComponent: GameComponent { public void keyReleased(Keys); public void keyPressed(Keys); public bool keyDown(Keys); public void override update(GameTime gameTime) { // compare previous state with current state and // determine if released, pressed, down or nothing } } Some others went a bit further making it possible to use a Service Locator by a design like this: interface IInputComponent { public void downwardsMovement(Keys); public void upwardsMovement(Keys); public bool pausedGame(Keys); // determine which keys pressed and what that means // can be done for different inputs in different implementations public void override update(GameTime); } Yet, then I am wondering if it is possible to design an input class to resolve all possible situations. Like in a menu a mouse click can mean "click that button", but in game play it can mean "shoot that weapon". So if I am using such a modular design with game components for input, how much logic is to be put into the InputComponent / KeyboardComponent / GamepadComponent and where is the rest handled? What I had in mind, when I heard about Game Components and Service Locator in XNA was something like this: use Game Components to run the InputHandler automatically in the loop use Service Locator to be able to switch input at runtime (i.e. let player choose if he wants to use a gamepad or a keyboard; or which shall be player 1 and which player 2). However, now I cannot see how this can be done. First code example does not seem flexible enough, as on a game pad you could require some combination of buttons for something that is possible on keyboard with only one button or with the mouse) The second code example seems really hard to implement, because the InputComponent has to know in which context we are currently. Moreover, you could imagine your application to be multi-layered and let the key-stroke go through all layers to the bottom-layer which requires a different behaviour than the InputComponent would have guessed from the top-layer. The general design pattern with passing the Player to update() does not have a representation in XNA and I also cannot see how and where to decide which class should be passed to update(). At most time of course the player, but sometimes there could be menu items you have to or can click I see that the question in general is already dealt with here, but probably from a more elobate point-of-view. At least, I am not smart enough in game development to understand it. I am searching for a rather code-based example directly for XNA. And the answer there leaves (a noob like) me still alone in how the object that should receive the detected event is chosen. Like if I have a key-up event, should it go to the text box or to the player?

    Read the article

  • javascript to reference input IDs in php loop and pass values back to same input ID

    - by Smudger
    I have a form which is essentially an autocomplete input box. I can get this to work perfectly for a single text box. What I need to do is create unique input boxes by using a php for loop. This will use the counter $i to give each input box a unique name and id. The problem is that the unique value of the input box needs to be passed to the javascript. this will then pass the inputted data to the external php page and return the mysql results. As mentioned I have this working for a single input box but need assistance with passing the correct values to the javascript and returning it to correct input box. existing code for working solution (first row works only, all other rows update first row input box) <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else { $.post("autocompleteperson.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString').val(thisValue); setTimeout("$('#suggestions').hide();", 200); } </script> </head> <body> <form name="form1" id="form1" action="addepartment.php" method="post"> <table> <? for ( $i = 1; $i <=10; $i++ ) { ?> <tr> <td> <? echo $i; ?></td> <td> <div> <input type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" /> </div> <div class="suggestionsBox" id="suggestions" style="display: none;"> <img src="upArrow.png" style="position: relative; top: -12px; left: 20px;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList"> &nbsp; </div> </div> </td> </tr> <? } ?> </table> </body> </html> code for autocompleteperson.php is: $query = $db->query("SELECT fullname FROM Persons WHERE fullname LIKE '$queryString%' LIMIT 10"); if($query) { while ($result = $query ->fetch_object()) { echo '<li onClick="fill(\''.$result->fullname.'\');">'.$result->fullname.'</li>'; } } in order to get it to work for all rows, I include the counter $i in each of the file names as below: <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function lookup(inputString<? echo $i; ?>) { if(inputString<? echo $i; ?>.length == 0) { // Hide the suggestion box. $('#suggestions<? echo $i; ?>').hide(); } else { $.post("autocompleteperson.php", {queryString: ""+inputString<? echo $i; ?>+""}, function(data){ if(data.length >0) { $('#suggestions<? echo $i; ?>').show(); $('#autoSuggestionsList<? echo $i; ?>').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString<? echo $i; ?>').val(thisValue); setTimeout("$('#suggestions<? echo $i; ?>').hide();", 200); } </script> </head> <body> <form name="form1" id="form1" action="addepartment.php" method="post"> <table> <? for ( $i = 1; $i <=10; $i++ ) { ?> <tr> <td> <? echo $i; ?></td> <td> <div> <input type="text" size="30" value="" id="inputString<? echo $i; ?>" onkeyup="lookup(this.value);" onblur="fill();" /> </div> <div class="suggestionsBox" id="suggestions<? echo $i; ?>" style="display: none;"> <img src="upArrow.png" style="position: relative; top: -12px; left: 20px;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList<? echo $i; ?>"> &nbsp; </div> </div> </td> </tr> <? } ?> </table> </body> </html> The autocomplete suggestion works (although always shown on first row) but when selecting the data always returns to row 1, even if input was on row 5. I have a feeling this has to do with the fill() but not sure? is it due the the autocomplete page code? or does the fill referencing ThisValue have something to do with it. example of this page (as above) can be found here Thanks for the assistance, much appreciated. UPDATE - LOLO <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function lookup(i, inputString) { if(inputValue.length == 0) { // Hide the suggestion box. $('#suggestions' + i).hide(); } else { $.post("autocompleteperson.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions' + i).show(); $('#autoSuggestionsList' + i).html(data); } }); } } // lookup function fill(i, thisValue) { $('#inputString' + i).val(thisValue); setTimeout("$('#suggestions' + i).hide();", 200); } </script> </head> <body> <form name="form1" id="form1" action="addepartment.php" method="post"> <table> <? for ( $i = 1; $i <=10; $i++ ) { ?> <tr> <td> <? echo $i; ?></td> <td> <div> <input type="text" size="30" value="" id="inputString<?php echo $i; ?>" onkeyup="lookup(this.value);" onblur="fill();" /> </div> <div class="suggestionsBox" id="suggestions<? echo $i; ?>" style="display: none;"> <img src="upArrow.png" style="position: relative; top: -12px; left: 20px;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList<? echo $i; ?>"> &nbsp; </div> </div> </td> </tr> <? } ?> </table> </body> </html> google chrome catched the following errors: first line on input, second line on loosing focus

    Read the article

  • adding Form Validation Javacript of jquery???

    - by user634599
    How can I add inline Validation to make sure a choice of radio input must be selected <script type="text/javascript"> function choosePage() { if(document.getElementById('weightloss').form1_option1.checked) { window.location.replace( "http://google.com/" ); } if(document.getElementById('weightloss').form1_option2.checked) { window.location.replace( "http://yahoo.com/" ); } } </script> <form id="weightloss"> <input type="radio" id="form1_option1" name="weight-loss" value="5_day" class="plan"> <label for="form1_option1"> 5 Day - All Inclusive Price</label><br> <input type="radio" id="form1_option2" name="weight-loss" value="7_day"> <label for="form1_option2"> 7 Day - All Inclusive Price</label><br> <input type="button" value="Place Order" alt="Submit button" class="orange_btn" onclick="choosePage()"> </form>

    Read the article

  • iiR Hospital Digital 2011: Tras la historia digital ¿qué?

    - by Eloy M. Rodríguez
    Como el acceso a la documentación está restringido, sólo voy a comentar por encima algunos temas o planteamientos que me han llamado la atención del VI Foro Hospital Digital 2011, organizado por iiR. Y comienzo destacando la buena moderación de Maribel Grau del Hospital Clínic de Barcelona que estuvo sobria, eficaz y motivadora del debate. Me impresionó el proyecto Hospital Líquido del Hospital San Joan de Deu de Barcelona por el compromiso corporativo con una medicina colaborativa involucrando a los pacientes y a los profesionales, con unas iniciativas de eSalud y Salud2.0 avanzadas y apoyadas en un buen soporte legal, tecnológico, de los profesionales y con procesos bien definidos. Es un tema corporativo y no una prueba, como bien explicó Jorge Juan Fernández y detalló después Júlia Cutillas, cuyo rol, por cierto, es de Community Manager. En el debate salió el tema del retorno de la inversión y ese es un tema inmaduro, ya que es difícil de encontrar métricas adecuadas, pero no dudan de su continuidad ya que forma parte de una estrategia corporativa, en la que siempre hay elementos que forman parte de los costes generales y que se consideran necesarios para prestar el nivel de servicio que se desea ofrecer. Cecilia Pérez desde su posición como Jefe de Implantación de HCE en el Hospital de Móstoles hizo énfasis en la importancia de la gestión efectiva del cambio cuando se implanta un sistema de historia clínica electrónica que pasa por una inicial negación de los usarios al cambio, que luego presentan una resistencia al prinicipio para luego empezar a explorar posibilidades y llegar a un compromiso con el cambio. Santiago Borrás, Jefe de Sistemas del Hospital del Henares, partió de un hospital digital, pero eso no es más que el comienzo. Tras tres años la frustración de los profesionales es no perderse entre demasiada información. La etapa necesaria tras la digitalición es la generación y compartición del cononocimiento. Cristina Ibarrola, Directora de Atención Primaria del SNS-O comentó la experiencia de las interconsultas primaria-especializada que reducen la carga asistencial en primaria al aumentar la resolución. Hay una reserva de tiempos específicos en las agendas de los profesionales de ambos lados para garantizar una respuesta en un máximo de 48 horas. Eso ha llevado a una flexibiliazación de la agenda de los médicos de primaria que tienen un 25% más de tiempo para las consultas presenciales. Parece que aquí la opción tomada es dar más tiempo por paciente en vez de más pacientes, supongo que en parte porque la presión asistencial en Navarra tengo entendido que no es tan fuerte como en otras zonas. Alejandra Cubero comentó la experiencia de identificación de pacientes y de inteoperabilidad en Hospitales de Madrid. Ana Rosa Pulido presentó los logros del SES y su proyecto actual de Imagen Médica No Radiológica. Richard Bernat explicó la experiencia de HCE de Salud de la Mujer Dexeus, indicando que si bien no hay métricas del retorno de la inversión, sí hay una percepción del valor por las diferentes direcciones. Arturo Quesada glosó la experiencia de Jimena en el Hospital de Ávila, Joan Chafer desgranó el arduo proceso de introducción de sucesivas soluciones digitales en el Hospital Clínico San Carlos de Madrid comenzando por “Hogar Digital”, todo ello con financiación externa o recursos propios y cerró el turno de intervenciones no comerciales Pedro A. Bonal que presentó el valor de los eDocs dentro del Complejo (aplicado en sus dos acepciones de conjunto y complicado) Hospitalario de Toledo como tránsito a la HCE plenamente digital. Tweet

    Read the article

  • Software to clean up photos of whiteboards and documents?

    - by Norman Ramsey
    I take a lot of photos of whiteboards, blackboards, and so on for teaching purposes (examples online through May 2010). I'm interested in cleaning them up for archival purposes, preferably using Linux. Commercial products ClearBoard and PhotoNote are priced a little aggressively for my purposes, plus my students would like to have this capability too. Does anyone know of any good, open source software for Converting photographs to images with just a few colors? Eliminating perspective distortion? Removing unwanted junk from around the edges of an image? or anything like that? I'm imagining that I start out with a picture of my whiteboard using red and black markers, and I end up with a three-color image using just white, red, and black. Or I photograph a laser-printed document and end up with a clean black-and-white image. I have tried standard tools that reduce the number of colors in an image, and they do a terrible job—probably because they are trying to reproduce the uneven illumination of the original image. Command-line Linux tools would be ideal.

    Read the article

  • user input of one php script pass to another php without modification in first php script

    - by ish12
    hi all.. Consider two php scripts(o.php & t.php) o.php contains both html and php. html here gets user input for eg:user name and password this information is passed to php using php-self. I want the user input of o.php passed to t.php without any modification in o.php. I ve used include and require in the t.php but the problem is it displays the output of o.php but i need only the user input values from o.php without displaying the output of o.php. Using functions or session in o.php we can pass user input but am in the situation tat i should not add or modify o.php. thanks in advance!!

    Read the article

  • Collapse span when input button is hidden

    - by Evan
    I have a style that wraps around an input button, so the button can be styled very creatively. When the button is hidden in .Net, i would like the style to collapse so it renders like its hidden as well. What the style does, as a result of no value in the button or its hidden, is it keeps a small shape. Click to see a demo: http://media.apus.edu/it/evan-testing/button.htm <style> .button { cursor:pointer; text-decoration:none; background:url(button_bg.gif) no-repeat right top; padding-right:10px; display:inline-block; line-height:29px; height:29px; font-size:12px; color:#FFFFFF; font-weight:bold; } span.button { vertical-align: middle; } .button span { background:url(button_bg.gif) no-repeat left top; padding-left:10px; line-height:20px; height:29px; display:inline-block; } .button span span { background:transparent; padding:0; font-size:12px; } .button span input { cursor:pointer; font-weight:bold; background:transparent; border:0; padding-top:.4em; font-size:12px; font-family:verdana; color:#FFFFFF; } .button:hover { background-position:right -39px; } .button:hover span { background-position:left -39px; } .button:active { background-position:right -78px; } .button:active span { background-position:left -78px; } </style> Input button wrapped in a span with no value: <span class="button"><span><input type="button" value=""></span></span> <P> Input button wrapped in a span with a value: <span class="button"><span><input type="button" value="test"></span></span> <P> Span with no data value: <span class="button"><span></span>

    Read the article

  • Validating User Input? C#

    - by Alex
    Hi, in an assignment, I have designed a input validation loop in C#, and I would like it to be able to check for the correct input format. I'm not for sure, but I think my designed loop is not checking the type of input, just what char is entered. I know I could use a try-catch block, but shouldn't you only use exceptions for exceptional situations? This is not an exceptional situation, because I expect that the user would enter an incorrect value. Input validation is not part of my assignment, so the loop is in a homework assignment, but is not part of the homework assignment. Question: Is there a way I could redesign this loop so that it checks for valid input type as well? Code: do { Console.Write("Do you wish to enter another complex number?: (Y or N)"); response = char.Parse(Console.ReadLine()); response = char.ToUpper(response); if (response != 'Y' && response != 'N') Console.WriteLine("You must respond Y or N!"); } while (response != 'Y' && response != 'N'); Thanks!!

    Read the article

  • horizontal scroll bar of IE and input text box

    - by sharpboy2008
    I have a situation, where I have a text input box in IE(input type='text') But the horizontal scroll bar of IE will be shown when it has lots of texts , and the box is not fixed-size. What I would like to have is: 1. The input box should accommodate the whole text(not fixed -size). the horizontal scroll bar of IE will not be shown.

    Read the article

  • Output to console while preserving user input in ruby

    - by CaptnCraig
    I have a ruby script that is simultaneously and asynchronously receiving and displaying messages from a server, and allowing user input on the console. When a message is received, it is currently being written in the middle of what the user is typing. The input itself isn't garbled, but it looks horrible. Ideally, it would save the users current input, output the message, and then restore the input on the next line. I've done this in c by intercepting every key stroke, but all I remember is that it was a major hassle. I'm fairly new to ruby, so I'm not sure if there is a good way to do this, or how to do it. Example: User is typing >abcde, and message hello comes in, and user types fgh after. The console would now show: >abcdehellofgh and user can continue typing at the end. I would like it to show: hello >abcdefgh

    Read the article

  • Keyboard input with timeout in Python

    - by J. Pablo Fernández
    How would you prompt the user for some input but timing out after N seconds? Google is pointing to a mail thread about it at http://mail.python.org/pipermail/python-list/2006-January/533215.html but it seems not to work. The statement in which the timeout happens, no matter whether it is a sys.input.readline or timer.sleep(), I always get: <type 'exceptions.TypeError'>: [raw_]input expected at most 1 arguments, got 2 which somehow the except fails to catch.

    Read the article

  • $_POST goes empty after adding a new input type "file"

    - by heldrida
    Hi, I'm not finding a way to understand and fix this and I've done a lot. I've got a script, wish is a simple form, that sends a file trough POST. The second file, process the info. By default, I give to the user a few fields, one of them being a input field of type "file" and there's also, a few "hidden" one's, that gives me values to work with on POST. I found that, when adding a new input of type "file", the $_POST returns array 0, even $_FILES returns nothing. I have no idea how to fix this, and it works just fine when keeping the default input box of type "file". This is the form http://pastie.org/872488 This only happens when: Exists! var_dump( $_POST ), or $_FILES, print_r(), etc Returns nothing. I've tryed to create a array on the input of type "files", like img_p_child[], but nothing. How to solve this ? Thanks for taking your time!

    Read the article

  • How to change this C++ code to make input work better

    - by Phenom
    cout << "Input street number: "; cin >> streetnum; cout << "Input street name: "; cin >> streetname; cout << "Input resource name: "; cin >> rName; cout << "Input architectural style: "; cin >> aStyle; cout << "Input year built: "; cin >> year; The problem with the above code happens if you enter in spaces between words. For example if I enter "Ampitheater Parkway" for streetname, then it puts "Ampitheater" in streetname, skips the prompt for resource name and enters "Parkway" into the next field. How can I fix this?

    Read the article

  • Cloning input type file and set the value

    - by jribeiro
    I know that it isn't possible to set the value of an input type="file" for security reasons... My problem is: I needed to style an input type="file" so what I did was have a button and hide the file input. like: <a href="#" onclick="$('input[name=&quot;photo1&quot;]').click(); return false;" id="photo1-link"></a> <input type="file" name="photo1" class="fileInput jqtranformdone validate[required]" id="photo1" /> These works great in all browsers except IE which gives me an access denied error on submitting through ajax. I'm using the ajaxSubmit jquery plugin (malsup.com/jquery/form/) So after reading for a while I tried to do: var photo1Val = $('#photo1').val(); var clone1 = $('#photo1').clone().val(photo1Val); $('#photo1').remove(); clone1.appendTo('form'); console.log(photo1Val) //prints the right value C:/fakepath/blablabla.jpg $('form').ajaxSubmit(options); The problem is that after this the value of $('#photo1') is empty... Any ideas how to work around this? Thanks

    Read the article

  • Feasible to use a laptop as a Digital Media Receiver/Extender?

    - by philosaur
    Since the price of many dedicated hardware Digital Media Extenders is only slightly lower than that of a cheap laptop, is there any reason you couldn't use a laptop as a Digital Media Extender? I'm looking for specific reasons that might make this unworkable. For instance, would the small screen/low-power video card of the laptop prevent the movie from playing well on the TV?

    Read the article

  • Running a Java program with input from a file

    - by Katy
    I am writing a program that reads the input from a file and then prints it to the screen. When I run it without taking the input from the file, it works perfectly fine. However, every time I try to run it from the file it gives me an "Exception in thread "main" java.util.NoSuchElementException: No line found at" error that occurs every place the input is suppose to be read. I have no idea what is going on.

    Read the article

  • Accessing the value of an input element with XPath in an XSLT

    - by asymmetric
    Hi! I'm developing a web app that has a button that triggers an XSLT transformation of the document DOM, with a stylesheet fetched via AJAX. Here's a portion of the HTML: <html> <head> <title>Static Javascript-based XMR Form Creator</title> </head> <body> <h1 id="title">Static Javascript-based XMR Form Creator</h1> <div class="opt_block" id="main_opts"> Form name <input type="text" id="form_name" /> Form cols <input type="text" id="form_cols" size="3" maxlength="3" /> </div> <button id="generate">Generate source</button> <textarea rows="20" cols="50" id="xmr_source" ></textarea> </body> Inside the stylesheet, I want to access the value attribute of the first input field, the one with id form_name. The XSLT looks like this: <xsl:template match="/html/body/div[@id = 'main_opts']" > <form> <xsl:attribute name="fname"> <xsl:value-of select="input[@id = 'form_name']/@value" /> </xsl:attribute> </form> </xsl:template> The problem is that the XPath that should do the work: <xsl:value-of select="input[@id = 'form_name']/@value" /> returns nothing. Can anyone help?

    Read the article

  • I need a small parser (jquery) that knows if an input is URL:PORT format

    - by Johua
    You have a user input string from a textbox for example var strInput = $("#txtBox").val(); strInput has some string now. I need to now if it is of this format: IP:PORT Basically a user can input something like this: http://192.168.300.22:20000 1) Frist part (protocol): http:// always needs to be replaced by: https:// 2) Second part (everything until the ":" sign): 192.168.200.22 (or www.google.com) 3) Third part (port): everyhing after ":" (example: 9999, 100000) I step): TAKE THE INPUT var strInput = $("#txtBox").val(); II) step): PARSE THE INPUT III) results): var strProtocol = "https//"; var strIP = parsedIP; var strPORT = parsedPORT; So i need 2 know how to get the values (parsedIP and parsedPORT).

    Read the article

  • input field placeholder in jQuery

    - by Hristo
    I'm trying to create a Login page, not worrying about actually logging in yet, but I'm trying to achieve the effect where there is some faded text inside the input field and when you click on it, the text disappears or if you click away the text reappears. I have this working for my "Username" input field, but the "Password" field is giving me problems because I can't just do $("#password").attr("type","password"). Here's my code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <!-- Links --> <link rel="stylesheet" type="text/css" href="style.css" /> <!-- Scripts --> <script type="text/javascript" src="jQuery.js"></script> <script> // document script $(document).ready(function(){ // login box event handler $('#login').click(function(){ $('.loginBox').animate({ height: '150px' }, '1000' ); $('#username').show(); // add pw placeholder field $('#password').after('<input type="text" id="placeHolder" value="Password" class="placeHolder" />'); $('#password').hide(); }); // username field focus and blur event handlers $('#username').focus(function() { if($(this).hasClass('placeHolder')){ $(this).val(''); $(this).removeClass('placeHolder'); } }); $('#username').blur(function() { if($(this).val() == '') { $(this).val('Username'); $(this).addClass('placeHolder'); } }); // password field focus and blur event handlers $('#placeHolder').focus(function() { $('#placeHolder').hide(); $('#password').show(); $('#password').focus(); }); $('#password').blur(function() { if($('#password').val() == '') { $('#placeHolder').show(); $('#password').hide(); } }); }); </script> </head> <body> <div id="loginBox" class="loginBox"> <a id="login">Proceed to Login</a><br /> <div id="loginForm"> <form> <input type="text" id="username" class="placeHolder" value="Username" /> <input type="password" id="password" class="placeHolder" value="" /> </form> </div> </div> </body> </html> Right now, I can click on the password input box and type in it, but the text is not disappearing and the "type" doesn't get set to "password"... the new input field I create isn't being hidden, it just stays visible, and I'm not sure where the problem is. Any ideas? Thanks, Hristo

    Read the article

  • unobtrusive "default" text in input WITHOUT jQuery

    - by Adam Kiss
    Hello, i'm trying to write unobtrusive default/placeholder text in input (actually, relatively placed label over input, which hides on onFocus, and stays hidden if input isn't empty on onBlur), but I don't want to use jQuery, because this is the only javascript used on page - therefore using jQuery seems a bit over the top. Please, how can I do this without jQuery? Thank you.

    Read the article

  • Question about char input

    - by DomX23
    This is what I'm trying to do... char input[4]; cin >> input; cout << "Input[0]: " << input[0] << "Input[1]: " << input[1] << "Input[2]: " << input[2] << "Input[3] " << input[3]<< "Input[4] " << input[4] <<endl; However, when I enter "P F" I get an out of this: Input[0]:P Input[1]: Input[2]: Input[3] Input[4] Why do I get that weird character instead of F?

    Read the article

  • Unobtrusive Maximum Input Lengths with JQuery and FluentValidation

    - by Steve Wilkes
    If you use FluentValidation and set a maximum length for a string or a maximum  value for a numeric property, JQuery validation is used to show an error message when the user inputs too many characters or a numeric value which is too big. On a recent project we wanted to use input’s maxlength attribute to prevent a user from entering too many characters rather than cure the problem with an error message, and I added this JQuery to add maxlength attributes based on JQuery validation’s data- attributes. $(function () { $("input[data-val-range-max],input[data-val-length-max]").each(function (i, e) { var input = $(e); var maxlength = input.is("[data-val-range-max]") ? input.data("valRangeMax").toString().length : input.data("valLengthMax"); input.attr("maxlength", maxlength); }); }); Presto!

    Read the article

  • Horizontal histogram won't accept input after the first input

    - by vincentbelkin
    So I'm making a program which is supposed to print a horizontal histogram of the lengths of words in its input. I don't know if most of it is OK since the main problem is it won't accept any input after the first one. Oh I also put comments on the parts I'm having some trouble with, like how to print "-" multiple times in order to represent histogram. I've tried making other versions of the code but I couldn't check if I'm close to getting it because again it won't accept another input after the first input. /*Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal*/ #include <stdio.h> #define MAX 30 #define IN 1 #define OUT 0 int main() { int a,c,i,k,state,word[MAX]; a=0; k=0; state=OUT; for(i=0;i<MAX;i++) word[i]=0; while((c=getchar())!=EOF) { if(c==' '||c=='\t'||c=='\n') state=OUT; else state=IN; while(state==IN) a++; if(state==OUT) { word[i]=a; i++; } /*This part is hard for me, I don't know how to print X multiple times!*/ if((c==getchar())&&c==EOF) { for(i=0;i<MAX;i++) { for(i=0;i<=word[i];i++) putchar('-'); putchar('\n'); } } } }

    Read the article

  • What do the 4 keyboard input method systems in 10.04 mean?

    - by Android Eve
    I am trying to install another language support (in addition to the default US). Checking that language checkbox in "Install / Remove Languages..." wasn't too difficult. :) But now I want to add keyboard support, too, for that language. Again, I am prompted with a nice listbox with the following 4 options: none ibus lo-gtk th-gtk But I have no idea what these mean. I googled "ubuntu 10.04 keyboard input method system none ibus lo-gtk th-gtk" but all I could find was descriptions of problems, not an actual definition. Could you please point me to a webpage where I can learn about the meanings of these 4 different methods and +'s and -'s of each?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >