637 Topics

Member Avatar for
Member Avatar for Toikkala

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 …

Member Avatar for TrustyTony
0
226
Member Avatar for cortez716

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... …

Member Avatar for VernonDozier
0
124
Member Avatar for tristanhall

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 …

Member Avatar for tristanhall
0
542
Member Avatar for ehsantl

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 …

Member Avatar for ehsantl
0
169
Member Avatar for KriBez

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 …

Member Avatar for KriBez
0
105
Member Avatar for NH1

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 …

Member Avatar for Lusiphur
0
150
Member Avatar for faisal.alawar

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) * * * * …

Member Avatar for prvnkmr449
-1
206
Member Avatar for JBLDW

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 …

Member Avatar for JBLDW
0
182
Member Avatar for NH1

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 …

Member Avatar for Geekitygeek
0
290
Member Avatar for jkaye

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 …

Member Avatar for vibhaJ
0
106
Member Avatar for coolboss

#include<iostream> using namespace std; void main() { int pro[100]; for(int a=100;a>=1;a--) { pro[a]=a; cout<<pro[a]<<"\t";} }

Member Avatar for arkoenig
0
115
Member Avatar for insanely_sane

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. …

Member Avatar for insanely_sane
0
207
Member Avatar for doctorphp

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

Member Avatar for dev.vini
0
7K
Member Avatar for fire_

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) { …

Member Avatar for Kanoisa
0
164
Member Avatar for Sunshineserene

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 …

Member Avatar for Sunshineserene
0
808
Member Avatar for Musing888

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 …

Member Avatar for TrustyTony
0
280
Member Avatar for Alexpap

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 …

Member Avatar for nick.crane
0
241
Member Avatar for crapgarden

[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 << …

Member Avatar for mike_2000_17
1
144
Member Avatar for bettersaid

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 …

Member Avatar for woooee
0
176
Member Avatar for cmutzel02

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. …

Member Avatar for cmutzel02
0
268
Member Avatar for krishx343

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 …

Member Avatar for rajarajan2017
0
9K
Member Avatar for nsutton

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" …

Member Avatar for finito
0
147
Member Avatar for doctorphp

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 …

Member Avatar for doctorphp
0
157
Member Avatar for echellwig

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 …

Member Avatar for TrustyTony
0
48K
Member Avatar for echellwig

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 …

Member Avatar for echellwig
0
147
Member Avatar for jatpatel1

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 …

Member Avatar for kingredyard
1
224
Member Avatar for Alba Ra

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 …

Member Avatar for Alba Ra
0
245
Member Avatar for maryam ahmad

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?

Member Avatar for daviddoria
0
97
Member Avatar for dreadyteddy

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. …

Member Avatar for dreadyteddy
0
229
Member Avatar for superchica08

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 …

Member Avatar for superchica08
-1
913

The End.