637 Topics
| |
Hey, i need to make app that should take 10 chars from list. I tried it with range command but it's not working. [CODE] list = 'abcdefghijklmnopqrstuvxyzo' for list in range(10): print list [/CODE] And this code just prints numbers 0 to 10. So, is there some other command that … | |
I've writen a simple calculator code it is pasted below. What do I need to change in order to make it loop using a "while" statement until, the user inputs the letter ("Q" upper or lower), casuing it to exit the program instead of a function such as(/,*,-,+).. please help... … | |
Hey guys! I am working on creating a website that offers resources and calculators for a lot of algebraic and geometric equations. One thing that I want it to do is factor polynomial equations. For example, x^2-x-2=f(x) would become f(x)=(x+1)(x-2). WolframAlpha.com does this for all polynomials so I know that … | |
Hi guys I'm trying to finish my assignment, I stuck in a weird situation. I'm trying to create a pointer a linkedlist. This linkedlist contains pointer to a user-defined objects (City) and I'm trying to add City to this linkedlist and then iterate through the linked list to find and … | |
Hello! Finally I joined daniweb. Great stuff in here guys. Anyways lets get to the problem: I have a page where a number of topics are displayed ( they are added by admin). And to get this list I`m using this script [CODE=php] // Query the database $gettopic = mysql_query("SELECT … | |
i get an error when i try and do this. [code=c] private void button2_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); DBconnect db = new DBconnect(); Global.GlobalVar = textBox1.Text; string Co = new Password('J', textBox1.Text).SetSql(); ds = db.GetDataSet(Co); DataTable dt = ds.Tables[0]; if (dt.Rows.Count == 0) { if … | |
Write a program that prompts the user for an odd positive integer, n, greater than 1, and then prints the following hourglass figure which has a height of n text lines: In this example: n = 9 ********* (please refer to the attachment for the figure) * * * * … | |
I have the following code section that is used for displaying a list of items and would like to modify it so it displays as a multi column display. I have been told that I need to use a counter, but I cannot find any information on how to do … | |
Im trying to change the color of a row when the value of one of my columns is changed to [icode]Terminated[/icode]. for example when an employee is termiated i want the color of his record to be red. this is the code i have so far. [code=c] foreach (DataRow dr … | |
Hi All, The basis of this project is that I have an album of pictures, where you can add and delete pictures. What I wanted to do, was when you delete a picture, have the rest of the pictures move down to fill in the gap. The database is set … | |
#include<iostream> using namespace std; void main() { int pro[100]; for(int a=100;a>=1;a--) { pro[a]=a; cout<<pro[a]<<"\t";} } | |
Ok.. so I just started python (just = 3 hours ago). I have basic input and output set. Hell I even understand slicing and stuff (OMG SUBSTRINGS SO MUCH EASIER ON PYTHON :O ) but Im finding it not so easy to understand how to use for loops (silly me. … | |
| Hi All. I am trying to display images using the while loop but I want the pictures to be displayed like this. [ATTACH]16585[/ATTACH] The only thing is, I don't know how to do it. Any help would be much appreciated. Thank you in advance Cameron |
Hello. I have some problems. 1.With for cycle. This is my code: [CODE]#include <iostream> #include <fstream> int main () { int i; int i2; char sentence [200]; char repeat; ofstream file ("file.txt", ios::app); for (i=0; i<1;) { cout << "Enter sentence (max. 200 symbols)\n"; cin >> sentence; if (!file) { … | |
I have 2 arrays that are in a while loop each. I have declared the array ouside of the main, declaring it 'public static'. I want to use the values store in the array outside of the while loop, but I can't seem to do it. May I know how … | |
Using the following code I am trying to check the users input string (CAcodes) and checking each one individually by assigning each element in CAcodes to a list (CAcode). A for-loop checks the conditions to make sure that the conditions for each code are met. The main for-loop tests several … | |
Hello everybody, For the last 2 days im trying to deal with a treeview. What i want to do is to copy the structure from one tree to another. I know there are other ways to do this, but the way i want is to iterate through any node-of any … | |
[COLOR="Red"]4.6 - Insert() vector argument specs. Iter or not?[/COLOR] This allows me to refer to the second spot in a vector named 'inventory': A) [CODE] vector<string>::iterator myIterator; cout << "\nYou found a compass"; inventory.insert((inventory.begin() + 1), "compass"); cout << "\nYour items:\n"; for(iter = inventory.begin(); iter != inventory.end(); ++iter) cout << … | |
im a newbie to python, still learning as of today. as a part of my 'self-training' i listed some topics to practice every week but i was not able to run it successfully and im stuck. what i wanted with my activity is for it to read a .txt file … | |
Hi all, I am having a problem when trying to compile this. from compiler: error: name lookup of 'pixel_number' changed for new ISO 'for' scoping error: obsolete binding at 'pixel_number' I understand that I cannot use the pixel_number variable outside of the for loop, have read so in other posts. … | |
Hi I need to know, is there any option to use For loop instead of While and ForEach to retrieve the result. While Loop ----------- [CODE] $query = "SELECT name, subject, message FROM contact"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "Name :{$row['name']} <br>" . }[/CODE] instead to … | |
I have a few things I want to make that I havent yet so this will be a later project but I was just wondering, How would a anti virus program work in C#? I've seen ones on youtube that iterate through your HD and looks for keywords like "Virus","Trojan" … | |
| Hi everyone I am trying to develop a friend system where you can view friends who you are friends with. I have been able to get it to show one result but it wont show any other. Please can someone tell me what I am doing wrong. Here is the … |
Hi I was wondering if there is any way to created a series of lists in a for-loop so that the first list created is named NAME0 or name_0 or indexed in some way. What I have right now is [CODE]for j in range(int(L)): popsizelocus_j=[][/CODE] however, this is not working … | |
Hi, I am trying to write elements from a list that I have created to an outfile using a for-loop with this code: [CODE]for j in range(int(Allele[i])): outfile.write(' allelelocus[j] * ')[/CODE] However when I do this I just get a whole bunch of allelelocus[j] in my out file. I was … | |
Hi there, I have been scratching my head for a few days now! with this problem: I am trying to echo out some data from a mysql table. I have a column name Country which has the following Countries: India, Malaysia Austaralia etc. I also have a column name Town … | |
Hello, for a database project (music festivals) several search options are to be included. While some search fields will be filled from a dropdown list (like "countries"), other will have a fuzzy option (like "song titles"). For this I want to use the full-text search (you may remember the words … | |
how can we make a C++ program that identifies whether the user has input a vowel or a consonant specifically by using the SWITCH structure? i mean its simple with if-else but is there a way it can be made with switch and not if-else? | |
Basically need help with one evil section of code! My program opens a start window which introduces the program. A start button leads to a second window with a number of buttons. The main two are "open" and "find restriction site". Im having problem with the code for the latter. … | |
hello everyone i was wondering if anyone would be able to help me in an program i have to do. the program wants me to use my initials A and G and plot them on using gotoxy() function to make some thing that look like the picture in the link … |
The End.