Here's my problem.
I need a matrix (a list of lists) of undefined size (maybe I should define it as an empty list?). The matrix will have a size of nxm but n and m will be introduced by the user.
Now, the user will also introduce the values for the matrix as a string, for example: list[0]="Hello" but I need to store that string as a list of 5 elements list[0]=[H, e, l, l, o]
Is there a not so complicated way to do that?...
Search Result
Collapse
33 results in 0.0046 seconds.
Keywords
Members
Tags
-
Filling a list of lists...
-
running a function with onKeyDown
morning!
i want to run a javascript function when I enter a key in a form text input by using onKeyDown
everything runs perfectly except the function only executes after the 2nd key stroke (not 1st key stroke, as I would expect it to)
maybe onKeyDown isn't the appropriate event or maybe i am doing something else wrong?
here's my html bit
Code:<input type="text"
-
how simulate keyboard and mouse whilst in game?
hi i am trying to make a program that whilst ingame (magicka if anyone is interested) reads what is pressed on the keyboard and the simulates a combination of keyboard key down and keyboar key up and mouse press.
eg if i press NumPad0 it would simulate Key Press A, Key Press S, Key Press F
or if i press NumPad1 it would simulate Shift Down, LButton Press, Shift Up
i have already managed to read what is... -
Mike Armstrong started a topic How to enter data by keyboard and saved to a text file and load it to another prograin Visual BasicHow to enter data by keyboard and saved to a text file and load it to another progra
I am going from gwbasic to vb 6. I want to enter data from one program to be read from a second program.
The data now looks like this
A line
122,43/34/49,23,97,69,56, 45,89,872,3444, 1,866666,643434 ,
87,88777,333222 ,6555,223,65542 ,755,4,34,34,27 6,55,988,456545 ,7664,12,54,99
Another line
123,413/35/09,27,7,669,46, 75,09,72,9744,1 ,861119,6466114 ,
67,89857,54382, 65,22,62,76545, 74,36,64,266,55 ,988,456545,766 4,12,54,99... -
Assigning multiple variables in an input statement
Ok, here goes
I was wondering if there was a better way to do this. I want my final program to run like this for the user:
What did x get? <user input>
What did y get? <user input>
What did z get? <user input>
x received <users answer>
y received <users answer>
z received <users answer>
I'm aware of two ways of doing this but they both seem rather... -
Python if statements with strings.
Why does this not work? Why does this not return "good im glad". Sorry i'm a beginner.
Code:x = str(input("Hello how are you?")) if x == "very good": print("Good Im Glad To Hear That!") else: print("I'm Sorry!")
-
form submission using javascript
Hi All,
Is there a way of submitting a form using javascript and without manual click on submit button..?
the textbox is being filled dynamically and as soon as it gets a value the form should get submitted. Have anyone tried this before?
It shouldn't be using PHP or ASP or other things.. only HTML and Javascript.
Thanks,
Imtiyaz Quraishi -
PHP button's won't function with jQuery
Code:if(isset($_POST['submit'])) { mysql_query("UPDATE Blad1 SET Naam ='$naamveld', Inkoop='$inkoopveld', Verkoopprijs='$verkoopveld', Aantal ='$aantalveld', Verkocht= '$verkochtveld' WHERE id = '$id'") or die(mysql_error()); echo "Het is aangepast!"; }
-
first-child on form elements
Code:<div class="box-title"> <h3>Login</h3> <label>Username:</label> <input type="text" name="username" /> <label>Password:</label> <input type="password" name="pass" /> </div>
-
Creating a menu based program based on a list
I am having issues creating a menu-driven program that should accept integers and calculate the mean and median values and display them. I'm not having trouble calculating the Mean or Median, but I am having trouble with configuring the list into the program.
Code:#Main def main(): array = [] #this would be the list, but what do i do with it? choice = displayMenu() while choice != '4':
-
How do I upload a user's file to a file server in HTML
I need to upload a file (xml, pdf, etc) from the user's PC, but I need to write it directly to a file server. I cannot use FileUpload because there is no way to direct its initial upload to anything but the web server. So, how do I use the HTML INPUT to upload the file from the user's PC directly to a file server located at a different URL than the web server the web page is being hosted on?
Thanks for your help. I am not as good... -
display an error msg saying wrong format.
hi everybody..
i need help with my assignment.i want to display a error message saying that the user has inputed a string where an integer is needed.because when i enter "h" (for an example) in the x coordinate field the system crashes.i want to display an error message instead.
Code:/** * A program that simulates an ant taking a step on a sheet of paper. stage 2 * * @author (safra) * @version
Last edited by Frinavale; Aug 31 '10, 06:45 PM. Reason: Please post code in [code] ... [/code] tags in the future. Added code tags. -
Inserting variables into data fields
Hi, I am writing a program to accept multiple user inputs and put these values into a table. This database will end up having hundreds of tables, each table should have the user inputted data.
I have created the table and set the fields to their propper values. The problem I encounter is when I try to input the user data (stored in my global variables userStart, userEnd, userCircuit etc etc) into the proper fields. Here is what I have.... -
How to add value in other page
for example when I click into picture this picture adresss mmust be paste on input in another window... -
how do i make text wrap in a text box, not textarea
Is it just a simple css or is it more complicated with javascript, etc. I want to limit a description input to 500 characters. <input type="text"> makes it easy with maxlength="500" but the text doesn't wrap. I'd rather write a function for limiting a textarea to 500 chars than a function for adding line breaks in a text box. SO, is there an EASY attribute to wrap text inside a text box?