Search Results

Search found 21980 results on 880 pages for 'input languages'.

Page 4/880 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • DonXml does WCF in NYC

    - by gsusx
    Tomorrow is WCF day in New York city!!!!! My good friend and Tellago's CTO Don Demsak will be doing a session WCF Data and RIA Services at the WCF fire-starter event to be hosted at the Microsoft offices in New York city. Don has a encyclopedic knowledge of both technologies and will be sharing lots of best practices learned from applying these technologies in large service oriented environments. In addition to Don, my crazy Cuban friend Miguel Castro will also be presenting three sessions at the...(read more)

    Read the article

  • Tellago && Tellago Studios 2010

    - by gsusx
    With 2011 around the corner we, at Tellago and Tellago Studios , we have been spending a lot of times evaluating our successes and failures (yes those too ;)) of 2010 and delineating some of our goals and strategies for 2011. When I look at 2010 here are some of the things that quickly jump off the page: Growing Tellago by 300% Launching a brand new company: Tellago Studios Expanding our customer base Establishing our business intelligence practice http://tellago.com/what-we-say/events/business-intelligence...(read more)

    Read the article

  • Is there a procedural graphical programming environment?

    - by Marc
    I am searching for a graphical programming environment for procedural programming in which you can integrate some or all of the common sources of calculation procedures, such as Excel sheets, MATLAB scripts or even .NET assemblies. I think of something like a flowchart configurator in which you define the procedures via drag& drop using flow-statements (if-else, loops, etc.). Do you know of any systems heading in this direction?

    Read the article

  • Is sticking to one language a good practice?

    - by Ans
    I'm developing a pipeline for processing text that will go into production. The question I keep asking myself is: should I stick to one language when looking for a tool to do a particular task (e.g. NLTK, PDFMiner, CLD, CRFsuite, etc.)? Or is it OK to mix and match looking for the best tool regardless of what language it's written in (e.g. OpenNLP, ParsCit, poppler, CFR++, etc.) and warp my code around them?

    Read the article

  • Efficiently checking input and firing events

    - by Jim
    I'm writing an InputHandler class in XNA, and there are several different keys considered valid input (all of type Microsoft.XNA.Framework.Input.Keys). For each key, I have three events: internal event InputEvent XYZPressed; internal event InputEvent XYZHeld; internal event InputEvent XYZReleased; where XYZ is the name of the Keys object representing that key. To fire these events, I have the following for each key: if (Keyboard.GetState().IsKeyDown(XYZ)) { if (PreviousKeyState.IsKeyDown(XYZ)) { if (XYZHeld != null) XYZHeld(); } else { if (XYZPressed != null) XYZPressed(); } } else if (PreviousKeyState.IsKeyDown(XYZ)) { if (XYZReleased != null) XYZReleased(); } However, this is a lot of repeated code (the above needs to be repeated for each input key). Aside from being a hassle to write, if any keys are added to/removed from the keys (if functionality is added/removed), a new section needs to be added (or an existing one removed). Is there a cleaner way to do this? Perhaps something along the lines of foreach key check which state it's in fire this key's event for that state where the code does the foreach (automatically checking exactly those keys that "exist") rather than the coder?

    Read the article

  • XNA Guide text input - maximum length

    - by simonalexander2005
    so I am using Guide.BeginShowKeyboardInput to get the user to enter their username. I would like this to be limited to 20 characters, and it seems to break expected behaviour to let them input whatever they like and trim it later - so how would I go about limiting what they can input in the text box itself? I have the following code: public string GetKeyboardInput(string title, string description, string defaultText, int maxLength) { if (input.CheckCancel()) { useKeyboardResult = false; KeyboardResult = null; } if (KeyboardResult == null && !Guide.IsVisible) { KeyboardResult = Guide.BeginShowKeyboardInput(PlayerIndex.One, title, description, defaultText, null, null); useKeyboardResult = true; } else if (KeyboardResult != null && KeyboardResult.IsCompleted) { string result = Guide.EndShowKeyboardInput(KeyboardResult); KeyboardResult = null; if (result == null) { useKeyboardResult = false; return null; } if (useKeyboardResult) { KeyboardResult = null; return result; } } else //the user is still entering inputs { } return null; } I assume the code I need would go in that final, empty else{} block, but I can't see any way to do this. Does anyone know how?

    Read the article

  • Making an interface for input in C - How?

    - by tloszk
    I have a big question. I started to develop a simple 3D engine (or should I call it framework?). I use OpenGL for rendering and it is developed for Windows. It is all written in C. But I don't know, how to write an "interface" for the keyboard/mouse input. I would like to keep it as simple as possible and nice - what the Win32 "native" input system is not. If anyone has suggestions about the topic, please, tell me. Thanks for everyone, who answers to my question!

    Read the article

  • Fighting Game and input buffering

    - by Pilispring
    In fighting game, there is an important thing called input buffering. When your character is doing an action, you can input the next action that will activate as soon as possible (the buffer is 5-10 frames). Is anyone had already done it or knows the most efficient way to do this? I thought of things like that: Enum list moves (a list of all my moves) if (moves = fireball) { if (Mycharacterisidle) { Do the fireball } else if (MycharacterisMoving) { if (lastspriteisnotfinished) { InputBuffer++; } else if(spriteisfinished && InputBuffer < 5) { Do the fireball } } } Any better ideas? Thx.

    Read the article

  • What are the preferred documentation tools for the major programming languages?

    - by Dave Peck
    I'm interested in compiling a list of major programming languages and their preferred documentation toolsets. To scope this a bit: The exact structure of the answer may vary from language to language, but there appear to be two aspects common to all languages: (1) in-code syntax for documentation, and (2) documentation generators that make use of said syntax. There are also cases where generators are used independent of code. For example, tutorial-style documentation is common in the Python world and is often disconnected from underlying code. Many languages have multiple commonly-used documentation strategies and tool chains, and I'd love to capture this. Finally, there are cross-language tools like Doxygen that also have some traction and would be worth noting here. Here are some obvious target languages to start with: Python, Ruby, Java, C#, PHP, Objective-C, C/C++, Haskell, Erlang, Scala, Clojure If this question catches on, I'll try and keep this section updated with the most recent list. Thanks!

    Read the article

  • Are there studies on what programming languages does to the brain? [closed]

    - by Eduard Florinescu
    Are there studies on what effects have programming languages on the brain or for that matter any other artificial languages in general, like mathematics ? Speaking from my personal experience I feel very different every time I speak Italian, I feel like a virtuoso on a quest but at the other end when I coded in machine code in debug.exe I felt like the main charcter inp(Movie). Why do I bring this up because I am suspecting that languages affect your mind and popular legends back this up too often: are full of mathematicians that crossed the Rubicon.

    Read the article

  • Is slower performance, of programming languages, really, a bad thing?

    - by Emanuil
    Here's how I see it. There's machine code and it's all that computers needs in order to run something. Computers don't care about programming languages. It doesn't matter to them whether the machine code comes from Perl, Python or PHP. Programming languages don't serve computers. They serve programmers. Some programming languages run slower than others but that's not necessarily because there is something wrong with them. In many cases, it's because they do more things that programmers would otherwise have to do (i.e. memory management) and by doing these things, they are better in what they are supposed to do - serve programmers. So, is slower performance, of programming languages, really, a bad thing?

    Read the article

  • Why are slower programming languages considered worse than faster ones?

    - by Emanuil
    Here's how I see it. There's machine code and it's all that the computers needs in order to run something. The computers don't care about programming languages. It doesn't matter to them if the machine code comes from Perl, Python or PHP. Programming languages exist to serve programmers. Some programming languages run slower then others but that's not because there is something wrong with them. It's often because they do more things that otherwise programmers would do and by doing these things, they do better what they are supposed to do - serve programmers. So why are slower programming languages considered worse than faster ones?

    Read the article

  • Why do most programming languages only support returning a single value from a function?

    - by M4N
    Is there a reason or an explanation why functions in most(?) programming languages are designed to support any number of input parameters but only one return value? In most languages, it is possible to "work around" that limitation, e.g. by using out-parameters, returning pointers or by defining/returning structs/classes. But it seems strange, that programming languages were not designed to support multiple return values in a more "natural" way.

    Read the article

  • Calling/selecting variables (float valued) with user input in Python

    - by Jonathan Straus
    I've been working on a computational physics project (plotting related rates of chemical reactants with respect to eachother to show oscillatory behavior) with a fair amount of success. However, one of my simulations involves more than two active oscillating agents (five, in fact) which would obviously be unsuitable for any single visual plot... My scheme was hence to have the user select which two reactants they wanted plotted on the x-axis and y-axis respectively. I tried (foolishly) to convert string input values into the respective variable names, but I guess I need a radically different approach if any exist? If it helps clarify any, here is part of my code: def coupledBrusselator(A, B, t_trial,display_x,display_y): t = 0 t_step = .01 X = 0 Y = 0 E = 0 U = 0 V = 0 dX = (A) - (B+1)*(X) + (X**2)*(Y) dY = (B)*(X) - (X**2)*(Y) dE = -(E)*(U) - (X) dU = (U**2)*(V) -(E+1)*(U) - (B)*(X) dV = (E)*(U) - (U**2)*(V) array_t = [0] array_X = [0] array_Y = [0] array_U = [0] array_V = [0] while t <= t_trial: X_1 = X + (dX)*(t_step/2) Y_1 = Y + (dY)*(t_step/2) E_1 = E + (dE)*(t_step/2) U_1 = U + (dU)*(t_step/2) V_1 = V + (dV)*(t_step/2) dX_1 = (A) - (B+1)*(X_1) + (X_1**2)*(Y_1) dY_1 = (B)*(X_1) - (X_1**2)*(Y_1) dE_1 = -(E_1)*(U_1) - (X_1) dU_1 = (U_1**2)*(V_1) -(E_1+1)*(U_1) - (B)*(X_1) dV_1 = (E_1)*(U_1) - (U_1**2)*(V_1) X_2 = X + (dX_1)*(t_step/2) Y_2 = Y + (dY_1)*(t_step/2) E_2 = E + (dE_1)*(t_step/2) U_2 = U + (dU_1)*(t_step/2) V_2 = V + (dV_1)*(t_step/2) dX_2 = (A) - (B+1)*(X_2) + (X_2**2)*(Y_2) dY_2 = (B)*(X_2) - (X_2**2)*(Y_2) dE_2 = -(E_2)*(U_2) - (X_2) dU_2 = (U_2**2)*(V_2) -(E_2+1)*(U_2) - (B)*(X_2) dV_2 = (E_2)*(U_2) - (U_2**2)*(V_2) X_3 = X + (dX_2)*(t_step) Y_3 = Y + (dY_2)*(t_step) E_3 = E + (dE_2)*(t_step) U_3 = U + (dU_2)*(t_step) V_3 = V + (dV_2)*(t_step) dX_3 = (A) - (B+1)*(X_3) + (X_3**2)*(Y_3) dY_3 = (B)*(X_3) - (X_3**2)*(Y_3) dE_3 = -(E_3)*(U_3) - (X_3) dU_3 = (U_3**2)*(V_3) -(E_3+1)*(U_3) - (B)*(X_3) dV_3 = (E_3)*(U_3) - (U_3**2)*(V_3) X = X + ((dX + 2*dX_1 + 2*dX_2 + dX_3)/6) * t_step Y = Y + ((dX + 2*dY_1 + 2*dY_2 + dY_3)/6) * t_step E = E + ((dE + 2*dE_1 + 2*dE_2 + dE_3)/6) * t_step U = U + ((dU + 2*dU_1 + 2*dY_2 + dE_3)/6) * t_step V = V + ((dV + 2*dV_1 + 2*dV_2 + dE_3)/6) * t_step dX = (A) - (B+1)*(X) + (X**2)*(Y) dY = (B)*(X) - (X**2)*(Y) t_step = .01 / (1 + dX**2 + dY**2) ** .5 t = t + t_step array_X.append(X) array_Y.append(Y) array_E.append(E) array_U.append(U) array_V.append(V) array_t.append(t) where previously display_x = raw_input("Choose catalyst you wish to analyze in the phase/field diagrams (X, Y, E, U, or V) ") display_y = raw_input("Choose one other catalyst from list you wish to include in phase/field diagrams ") coupledBrusselator(A, B, t_trial, display_x, display_y) Thanks!

    Read the article

  • Configuring keyboard input to eliminate unused diacritics

    - by David Cesarino
    I'd like to change the way diacritics work under Xubuntu. My problem My native language is pt-BR and my notebook has an american keyboard. Thus, I use ' and " followed by keys like u and c to achieve things like ú, ç and ü. It all works well. However, in the case of apostrophes and quotes, that creates a problem when I use ' followed by: letters that won't accept the acute accent ( ´ , ACUTE ACCENT -- 0x00B4) at all, like t; and letters that won't accept the acute in pt-BR, like r. In 1, ' with t does absolutely nothing. In 2, ' with r creates r (LATIN SMALL LETTER R WITH ACUTE -- 0x0155), which is used, afaik, for some eastern european languages like slovak. It isn't used in portuguese, just like ?, s, z, ?, ?, ?, n and all consonants (portuguese do not take diacritics in consonants). Question That said, is there a way to better support the portuguese-brazilian language using an american keyboard? It is very common here --- I actually prefer the american keyboard to our own, known as “ABNT”. Desired solution I'd like to deactivate unused diacritics, so case 2 would behave just like case 1. Additionally, if possible, I'd like case 1 to behave like it does under Windows. As an example, typing ' followed by t should write 't (acute followed by T) instead of doing nothing. About 2, in my humble opinion, doing nothing is counterproductive. I realize the behavior is reasonable according to logic ("there isn't t-acute, so please tell the computer to typeset apostrophe --- ', SPACE --- instead of acute). But from a human, practical point of view, I think it makes more sense (to me, at least). Additional comments I believe this also applies to spanish, french, italian and other western european latin languages. On the console (Ctrl+Alt+F?), case 1 is not a problem. I don't need to press space as apostrophes are automatically added. However, there, I'm unable to access cedilla (ç). Two completely different behaviors. If it's just a matter of customizing text config files (possibly creating a custom layout or whatever), I'd be glad to share my efforts. I just need guide on the "howto" part. Somehow Google only points me to the "enough" people (those who cope with the situation and think that it works "well enough"). And since I have definitely migrated to Linux/Xubuntu after years, I'd like to leave just as I like it (and I'm sure others as well). For example, if there is some kind of scripting or definition to tell the computer to do what I described, so be it.

    Read the article

  • C++ CIN cin skips randomly

    - by user69514
    I have this program, but cin in randomly skips.. I mean sometimes it does, and sometimes it doesn't. Any ideas how to fix this? int main(){ /** get course name, number of students, and assignment name **/ string course_name; int numb_students; string assignment_name; Assignment* assignment; cout << "Enter the name of the course" << endl; cin >> course_name; cout << "Enter the number of students" << endl; cin >> numb_students; cout << "Enter the name of the assignment" << endl; cin >> assignment_name; assignment = new Assignment(assignment_name); /** iterate asking for student name and score **/ int i = 0; string student_name; double student_score = 0.0; while( i < numb_students ){ cout << "Enter the name for student #" << i << endl; cin >> student_name; cout << "Enter the score for student #" << i << endl; cin >> student_score; assignment->addScore( Student( student_name, student_score )); i++; } }

    Read the article

  • Input validation in WPF

    - by irfanali-wpfexpert
    i am developing an application in wpf using MVVM design pattern. i have a listbox when an item is slected then a dialog is open having the same record in editable mode. this dialog is binded with the selected item of the list. i have apply the validation rule for textbox using IDataErrorInfo. when the user update a record on dialogbox then at every key press, the selected record in listbox is also changed. if the user press save button then i submit changes to database. but if user click cancel button then i do not submit changes to database but the list box is updated with the current updation in GUI. when i refresh the list then old value appears again. My requirement is to update the listbox only when the user hit the save button but not on every key press on dialog box. I first fill the generic list with the linq to sql classes then bind the listbox with it. Please let me know what i have to do. Thanks in advance

    Read the article

  • Custom shortcut for switching keyboard input languages in Windows XP

    - by uaaquarius
    Hi, I'm using Linux for years and now I have to work with Windows XP at work. The problem is I don't like default shortcuts for switching keyboard input languages: [CTRL]+[SHIFT] and [ALT]+[SHIFT]. And I'd really like to change the shortcut to the one I'm using in Linux [SHIFT]+[SHIFT]. I've googled for a while, played with registry but have not found any solution. So, can I assign custom ([SHIFT]+[SHIFT]) shortcut for switching keyboard input languages? Thanks in advance, Andriy

    Read the article

  • Jquery append input for 2 different input-sections

    - by Email
    Hi i use the following simple jquery script to append input. Source http://muiomuio.com/web-design/add-remove-items-with-jquery <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Add and Remove - jQuery tutorial</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function() { var i = $('input').size() + 1; $('a.add').click(function() { $('<p><input type="text" value="input ' + i + '" name="input_field'+ i +'" /></p>').animate({ opacity: "show" }, "slow").appendTo('#inputs'); i++; }); $('a.remove').click(function() { if(i > 2) { $('input:last').animate({opacity:"hide"}, "slow").remove(); i--; } }); $('a.reset').click(function() { while(i > 2) { $('input:last').remove(); i--; } }); }); </script> </head> <body> <h1>Add / remove text fields from webform</h1> <a href="#" class="add"><img src="add.png" width="24" height="24" alt="add" title="add input" /></a> <a href="#" class="remove"><img src="remove.png" width="24" height="24" alt="remove input" /></a> <a href="#" class="reset"><img src="reset.png" width="24" height="24" alt="reset" /></a> <div id="inputs"> <p> <input type="text" value="input 1" name="input_field1"> </p> </div> </div> </body> </html> I know want to add more input fields so i add this html <div id="outputs"> <p> <input type="text" value="output 1" name="output_field1"> </p> how can i achieve that the var i = $('input').size() + 1; will be individually for every input section? EDITED: the full script is the following. copy and paste will get you a full clone of mine. Problem still exists <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Add and Remove - jQuery tutorial</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function() { var i = $('input').size() + 1; $('a.add').click(function() { $('<p><input type="text" value="input ' + i + '" name="input_field'+ i +'" /></p>').animate({ opacity: "show" }, "slow").appendTo('#inputs'); i++; }); $('a.remove').click(function() { if(i > 2) { $('input:last').animate({opacity:"hide"}, "slow").remove(); i--; } }); $('a.reset').click(function() { while(i > 2) { $('input:last').remove(); i--; } }); $('a.add_o').click(function() { $('<p><input type="text" value="output ' + i + '" name="input_field'+ i +'" /></p>').animate({ opacity: "show" }, "slow").appendTo('#outputs'); i++; }); $('a.remove_o').click(function() { if(i > 2) { $('input:last').animate({opacity:"hide"}, "slow").remove(); i--; } }); $('a.reset_o').click(function() { while(i > 2) { $('input:last').remove(); i--; } }); }); </script> <style rel="stylesheet" type="text/css"> h1 { font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;} .hide {visibility:hidden;} img {border:none;} input { width:500px; height:20px; padding:10px; background:#f7f7f7; border:1px solid #f0f0f0; color:#333; font-size:20px; text-align:center; line-height:120px; margin:0; -moz-border-radius:5px; -webkit-border-radius:5px; } #inputs { width:520px; padding:0px 20px; border:1px solid #f0f0f0; -moz-border-radius:20px; -webkit-border-radius:20px; } </style> </head> <body> <h1>Add / remove text fields from webform</h1> <a href="#" class="add"><img src="http://muiomuio.com/tutorials/jquery/add-remove/add.png" width="24" height="24" alt="add" title="add input" /></a> <a href="#" class="remove"><img src="http://muiomuio.com/tutorials/jquery/add-remove/remove.png" width="24" height="24" alt="remove input" /></a> <a href="#" class="reset"><img src="http://muiomuio.com/tutorials/jquery/add-remove/reset.png" width="24" height="24" alt="reset" /></a> <div id="inputs"> <p> <input type="text" value="input 1" name="input_field1"> </p> </div> <a href="#" class="add_o"><img src="http://muiomuio.com/tutorials/jquery/add-remove/add.png" width="24" height="24" alt="add" title="add input" /></a> <a href="#" class="remove_o"><img src="http://muiomuio.com/tutorials/jquery/add-remove/remove.png" width="24" height="24" alt="remove input" /></a> <a href="#" class="reset_o"><img src="http://muiomuio.com/tutorials/jquery/add-remove/reset.png" width="24" height="24" alt="reset" /></a> <div id="outputs"> <p> <input type="text" value="output 1" name="output_field1"> </p> </div> </body> </html>

    Read the article

  • A quiz with results

    - by Keon Davies
    I'm currently working on programming a quiz withe results. I've tried this: <html> <body> <h1></h1> <form> <ol> <li> How much are you willing to spend on a phone per month?</li> <ul> <li><input type = "radio" name = "q1" id="q1_1"> £5-£10.</input></li> <li><input type = "radio" name = "q1" id="q1_2"> £10-£15.</input></li> <li><input type = "radio" name = "q1" id="q1_3"> £15-£20.</input></li> <li><input type = "radio" name = "q1" id="q1_4"> £20-£25.</input></li> <li><input type = "radio" name = "q1" id="q1_5"> £25-£30.</input></li> <li><input type = "radio" name = "q1" id="q1_6"> £30-£35.</input></li> <li><input type = "radio" name = "q1" id="q1_7"> £35-£40.</input></li> </ul> <li> Are you good with technology</li> <ul> <li><input type = "radio" name = "q2" id="q2_1"> Yes.</input></li> <li><input type = "radio" name = "q2" id="q2_2"> No.</input></li> </ul> <li> Are you looking for an easy to use phone</li> <ul> <li><input type = "radio" name = "q3" id="q3_1"> Yes.</input></li> <li><input type = "radio" name = "q3" id="q3_2"> No.</input></li> </ul> <li> Are you looking for a modern type of phone?</li> <ul> <li><input type = "radio" name = "q4" id="q4_1"> Yes.</input></li> <li><input type = "radio" name = "q4" id="q4_2"> No.</input></li> </ul> <li> How big do you want the phone to be?</li> <ul> <li><input type = "radio" name = "q5" id="q5_1"> Big.</input></li> <li><input type = "radio" name = "q5" id="q5_2"> Medium.</input></li> <li><input type = "radio" name = "q5" id="q5_3"> Small.</input></li> <li><input type = "radio" name = "q5" id="q5_4"> I don't really mind.</input></li> </ul> <li> Do you care about the colour of the phone?</li> <ul> <li><input type = "radio" name = "q6" id="q6_1"> Yes.</input></li> <li><input type = "radio" name = "q6" id="q6_2"> No.</input></li> </ul> <li> Have you ever owned a phone before?</li> <ul> <li><input type = "radio" name = "q7" id="q7_1"> Yes.</input></li> <li><input type = "radio" name = "q7" id="q7_2"> No.</input></li> </ul> <li> Do you want to be able to use the phone to get out of awkward social situations?</li> <ul> <li><input type = "radio" name = "q8" id="q8_1"> Yes.</input></li> <li><input type = "radio" name = "q8" id="q8_2"> No.</input></li> </ul> <li> Do you want to be able to access the app store and download apps using your phone?</li> <ul> <li><input type = "radio" name = "q9" id="q9_1"> Yes.</input></li> <li><input type = "radio" name = "q9" id="q9_2"> No.</input></li> </ul> <li> What happened to the last phone you owned?</li> <ul> <li><input type = "radio" name = "q10" id="q10_1"> I got bored of it.</input></li> <li><input type = "radio" name = "q10" id="q10_2"> It broke.</input></li> <li><input type = "radio" name = "q10" id="q10_3"> The contract ran out.</input></li> <li><input type = "radio" name = "q10" id="q10_4"> Other.</input></li> </ul> </ol> <input type = "button" value = "Submit" onclick="getResults()"> <input type = "reset" value = "Clear"></input> <textarea id="result">The right phone for you will be displayed here.</textarea> </html> <script> function getResults() { if (document.getElementById('q1_1').checked && document.getElementById('q2_1').checked && document.getElementById('q3_1').checked && document.getElementById('q4_1').checked && document.getElementById('q5_1').checked && document.getElementById('q6_1').checked && document.getElementById('q7_1').checked && document.getElementById('q8_1').checked && document.getElementById('q9_1').checked && document.getElementById('q10_1').checked ) { document.getElementById('result').innerHTML = 'Unfortunately, the iPhone is the right phone for you.'; } } </script> </body> But it's just too long winded. Is there any other ways I can design a quiz like this but without having to write a block of code for each radio button?

    Read the article

  • Getting input from keyboard

    - by SAMIR BHOGAYTA
    When you type on the keyboard the keystrokes go to a particular application, the active application. The active application receives the input from the keyboard. This means the application has input focus. There are two events for a key on a keyboard, when the key is pressed and when it is released. No it's not a single event as you might expect if you have no prior programming experience, in shooter games for example when you keep the forward key pressed (KeyDown) the player goes forward, and when it isn't pressed (KeyUp) the player stays put. The event that occurs when the key is pressed is called KeyPress. It occurs between KeyDown and KeyUp, and therefore acts similar to KeyDown. Similar to the way we handle OnPaint and other events we also handle the OnKeyDown event (because we want the event to occur when the key is pressed and not when it is released) by overriding it. Try the code below and test it. You will understand the role of each property. protected override void OnKeyDown(KeyEventArgs keyEvent) { // Gets the key code lblKeyCode.Text = "KeyCode: " + keyEvent.KeyCode.ToString(); // Gets the key data; recognizes combination of keys lblKeyData.Text = "KeyData: " + keyEvent.KeyData.ToString(); // Integer representation of KeyData lblKeyValue.Text = "KeyValue: " + keyEvent.KeyValue.ToString(); // Returns true if Alt is pressed lblAlt.Text = "Alt: " + keyEvent.Alt.ToString(); // Returns true if Ctrl is pressed lblCtrl.Text = "Ctrl: " + keyEvent.Control.ToString(); // Returns true if Shift is pressed lblShift.Text = "Shift: " + keyEvent.Shift.ToString(); } How do I find out when the user presses a specific key? As you probably imagine, this will be easily accomplished using 'if'. if (keyEvent.KeyCode == Keys.A) { MessageBox.Show("'A' was pressed."); } Probably most beginners would be tempted to do this: if (keyEvent.KeyCode == "A") .... which is definitely incorrect because we can't compare System.Windows.Forms.Keys to a string. Also note that in the example we are using 'keyEvent.KeyCode', that means that even if we have other shift keys pressed (Alt, Ctrl, Shift, Windows...) simultaneous with A, the if condition returns true because it doesn't recognize key combinations. If we want to ignore key combinations (Alt+A, Ctrl+Shift+A), etc. we need to use 'keyEvent.KeyData' of course: if (keyEvent.KeyData == Keys.A) { MessageBox.Show("'A', and only A, was pressed."); } When you right click on a file in Windows Explorer and you have the Shift key pressed you get the additional 'Open with...' item in the menu. This and many others are cases when you need to use the mouse button together with the keyboard. The following code will change the background color of the form only if the form is clicked while the Ctrl key on the keyboard is pressed. If the Ctrl key is unpressed and the form is clicked nothing happens. private void Form1_Click(object sender, System.EventArgs e) { Keys modKey = Control.ModifierKeys; if(modKey == Keys.Control) { this.BackColor = Color.Yellow; } } If you have further questions feel free to ask them and also check the following pages at MSDN: KeyUp Event KeyPress Event KeyDown Event

    Read the article

  • Handling keyboard and mouse input (Win API)

    - by Deluxe
    There is a number of ways to catch mouse or keyboard under Windows. So I tried some of them, but every of them has some advantages and drawbacks. I want to ask you: Which method do use? I've tried these: WM_KEYDOWN/WM_KEYUP - Main disadvantage is that, I can't distinguish between left and right-handed keys like ALT, CONTROL or SHIFT. GetKeyboardState - This solves problem of first method, but there is new one. When I get that the Right-ALT key is pressed, I also get that the Left-Control key is down. This behaviour happens only when using localized keyboard layout (Czech - CS). WM_INPUT (Raw Input) - This method also doesn't distinguish left and right-handed keys (if I can remember) and for mouse movement sometimes generates message with zero delta values of mouse position.

    Read the article

  • Input Signal Out of Range 1920x1080

    - by Zach
    I've recently installed Ubuntu 12.04 on my computer. Now, every time I boot and when I shut down, my monitor goes blank and says "Input Signal Out of Range - Change Setting to 1920x1080 60Hz." Once the computer gets to the login screen, it's okay again. This problem also happens when I try to open any 3d app. My graphics card is NVIDIA GEforce 6150 SE. I tried updating the drivers, but it broke everything and I had to reinstall Ubuntu. Any help?

    Read the article

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