I'm a very new coder learning python for the first time, working on making a text based adventure game as a project to teach myself. I've managed (I think) to almost get a working "engine" going, (Thanks to the wonderful people here at stackover
I'm having issues with an assignment where I have to take the contents of one file into a buffer, reverse those contents, and write them to another file. This program NEEDS to utilize two functions that look like this: int read_file( char* filename,
I'm a Lua beginner and don't know how to properly use io.read and such. I'm working on something very simple and I wanted to replace the age = 18 statement to something that can get the input from the user, asking them to say their age. Instead of th
Can a user type null terminator in an input, for which scanf is used, so the length of the input would be 0? char msg[1000]; scanf("%1000s",msg); // the user would type nothing: '' or '\0' On many systems, the answer is "Yes". Usually,
This is the simplest example i created and this does not work in ie 11 :( It literally will not let me type into the text input! <!DOCTYPE html> <html> <body> <script type='text/javascript'> var text = document.createElement('input
I want to use an if statement to select the value of a subclass in an image slider. If the input value is 'yes', it changes the text color. Javascript: $('document').ready(function(){ if $('.slide-active').find('.black').value = 'yes'){ $('.slide-tit
I have been fiddling with aligning an input filed next to a slider and I hve not have any luck. FIDDLE Please take a look at my fiddle. <div id="slider1"></div>SME<input id="box2" class="form-control input-sm"
Posted below is what I have so far. It works, however if there's only one answer, one of the outputs sets to zero. Does anyone have an idea for getting around this? My professor specifically asked that we make sure to write the code to include this s
I am making an HTML form with multiple inputs. I am using mainly select inputs (as below), <select> <option></option> <option></option> </select> and also some radio buttons. I each input represents a different category
im currently doing a project which works with input files. The code is doing everything that i want, and its fully correct, the problem is the way im reading the file. FILE *fp; fp = fopen (argv[1], "r"); in the terminal im using ./filec input.i
I have a user model that has stage_name and real_name string attributes. What I'd like to do is in my _form.hmlt.erb have a checkbox next to the real name input box that asks, Real name is stage name?. If checked then I'd like to assign the real name
I'm testing some code which users select numbers 0 & 1 - 3. 1 - 3 selects an option and adds the a number to the total, and 0 exits and prints the final total. The code seems to work but only in order eg: type 1,2,3,0. My question is how can I make i
I want to take n number of inputs and save it in the arrays c[] and p[] and later use them... I have currently written this,but i'm not getting desired output #include<stdio.h> #include<stdlib.h> int main() { int n,t,i,j,size=0; char s[100000]
I'm writing a basic C program that will convert either Celsius or Fahrenheit to the other. I have a scanf statement where the user enters the temperature they want to convert, and then a printf statement asking for whether that temperature was in c o
I want to take input from keyboard in my java program until the user type abc Here is the code which i have written but it doesn't work. the program continues to take input from keyboard even after i have typed abc and lastly I have to close the prog
I'm having a problem with the HTML tag <input type="file" /> in Google Chrome. The 'Browse' button appears on the page as expected, but when I click it in order to select a file, the pop-up dialog window from the browser doesn't open at al
I have two threads running, userInputThread waits for user input from the command line and interrupterThread tries to interrupt userInputThread 1 sec after starting. Obviously you cannot interrupt a thread that is blocked by the System.in. Another an
I have an input of type file, my question is: after I select the file, can the file name be limited to a certain number of characters ?You can get the file name using var filename = document.getElementById('file-id').value; filename = filename.replac
I wrote some code to take an input file textfile.txt and output the number of lines it contains to a text file outputtextfile.txt, but the output is blank. public static void main(String args[]) throws FileNotFoundException { String inputFileName = "
I'd like to change the font size into an <input type="text" size="10> dynamically to fill the box. Here are some examples: With less chars: With more chars: Is it possible?I know JQuery and JavaScript weren't mentioned or tagged, but
I have this table which can be very large, it contains single rows which can be selected with a tick box on the left or they can contain groups which contain their own individual rows where the group can be selected on its own to select all the indiv
In my C code I am given the following string as input: "c:\tc\bin\a c j k.jpg" I tried to read the input with scanf but it failed (passing the input both with and without quotation marks) and I am looking for an other solution. My code is as fol
I'm completely new to C and have this example from The C Programming Language book: #include <stdio.h> #define IN 1 /* inside a word */ #define OUT 0 /* outside a word */ /* count line and words and characters in input */ main() { int c, nl, nw, nc,
<input type="text" id="example"></input> <div id="test"></div> Is there anyway I can make text entered in #example appear in #test?You have to use Javascript. Basically, with jQuery: $("#example&q
So check out these buttons: they are unstyled, and look pretty good (the 2nd one is mouse over). Can I somehow maintain their looks, but change the background color? If I do it trough CSS's background-color property I get this: Which doesn't really l
I tried to figure it out using Firebug, but no chance. How is the Facebook status input border wrapped round the autosize input? Particularly, I am interested in the small triangle joined into the border. Using Firebug, I managed to find the triangle
Now i read somehwere: The scanf() conversion %[\n] will match a newline character, while %[^\n] will match all characters up to a newline. But in the following code: #include<stdio.h> int main() { printf("Enter Something: "); char name[100
This is a question in the C programming language. How do I directly read the data in the keyboard buffer? I want to directly access the data and store it in a variable. Of what data type should the variable be? I need it for an operating system our i
Hey, I am trying to create a search field that will filter or show/hide(which ever is best) the list elements based on what the user typed in and clicked the search button. I have no idea how to do this. everything I tried does not work unfortunately
If you create a status bar app with no windows, how do you respond to events? My first guess was creating an subclass of NSResponder and override the appropriate methods. However they never get called. This lead explicitly calling: [self becomeFirstR