Topic profile page for While loop.
This page has aggregated data from forum posts, threads, listings, online discussions, newsgroups, messageboards, and other online sources which contain user generated content for the term: While loop.
Topic "While loop" was discussed 5,220 times on 300 sites in last 3 months
Started 22 hours, 30 minutes ago (2009-11-13 19:37:00)
by FreakyBlue
I'm working on this for quite some hours now and I guess it made me blind to see any solutions. What I'm trying to do: exclude information from hidden forums to them who are not allowed to see them. Below is my code. Code: Select all $sql = 'SELECT forum_id, auth_role_id, group_id FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_role_id = 16'; $result = $db->sql_query($sql); ...
Started 2 days, 4 hours ago (2009-11-12 13:26:00)
by user11933655
hi guys please find the below mention procedure in which i got one while loop which got increment counter as date variable .. i don't know what i am doing wrong but it is not working . Can you please help me in this. Regards MY Procedure create or replace PROCEDURE sp_createTimeDim ( --declare variables DT ...
Started 2 days, 15 hours ago (2009-11-12 02:38:00)
by rhathar
I have a script to open a connection to a specified host/port and print the results both to the screen and to a file. For some reason, nothing is written to the file while the output to screen works perfectly Here is the code: Code: #!/usr/bin/python2.4 from telnetlib import Telnet from threading import Thread import sys host = 'localhost' port = '4201'...
Started 2 days, 17 hours ago (2009-11-12 00:59:00)
by georgio777
Hi everyone, I'm having trouble making work a function program related to simple math calculations. In this case is in the Division function. For this project I have to make the user answer some simple divisions problems that must also include an integer result with it's modulus. For example: The results should follow long division notation (10 / 6 results in 1 R 4). When inputing...
Started 2 days, 22 hours ago (2009-11-11 19:37:00)
by versusnim
Hello everyone! I am stuck and I need some help.. This is my assignment: Given: A file that contains a student name and a grade on exam1 and grade on exam2 for 25 students. Write a program that gives the user the choice of the following calculations: 1. Class Average (exam1, exam2) 2. Student Average (all 25 students) 3. Standard Deviation (exam1, exam2) 4. Letter ...
Started 2 days, 23 hours ago (2009-11-11 19:00:00)
by djpailo
I need to do this problem: Modify the program above so that if the number is positive, it uses multiple steps of Newton's method (see below) to approximate the square root of that number. At each step, it should print a line of text showing the current step number and the current estimate of the square root. Newton's method: If R is an estimate of the square root of A, then R- (R²-a...
Started 3 days, 12 hours ago (2009-11-11 05:57:00)
by spurs01
Hi everyone , I am writing a program that require user to choose whether to enter in hexadecimal form or in normal form. The 'while" is to check whether the user enter the correct key or not. If not, then it will always prompt the user. My problem is why the while does not break away even i enter the correct key ( y or n )?? Can anyone help me with this. Code: //Ask ...
Started 3 days, 23 hours ago (2009-11-10 18:46:00)
by mattgavin
Hi guys, I'm having trouble writing a function while loop that will terminate when a user input equals a certain value (let's say q), but at the same time, a value has to be enter and be between a range of numbers. (i.e. 5-9) What I have so far: Code: def getvalue(): QUESTION = "Enter a number, q to exit: " x = raw_input(QUESTION) while...
Started 4 days ago (2009-11-10 17:54:00)
by greens85
Hi, I currently have a piece of PHP which returns results based on a search: PHP Code: ? php $query = "SELECT * FROM edworld_candidates WHERE uname LIKE '%$uname%' AND fname LIKE '%$fname%' AND lname LI KE '%$lname%' AND email LIKE '%$email% '" ; $result = mysql_query ( $query ) or die ( mysql_error ()); ...
Started 6 days, 5 hours ago (2009-11-08 12:31:00)
by Muiter
Code: This div above from the code below is always shown belows my first line in the table instead of below each line where it belongs to. What is wrong? (the div is filled bij AJAX) When I use tis the part xxxxxxx is below each line as it should. Code: Part of code: Code:
Started 4 days, 12 hours ago (2009-11-10 05:31:00)
by ang3c0
I'm fairly new to Java (and programming in general). I've been getting everything done pretty easily so far but this issue is really frustrating me. I've been through things a thousand different ways and cannot figure out why it's doing this: Here is my code: Quote: import java.util.Scanner; public class Driver { public static void main (String ...
Started 1 week ago (2009-11-07 16:40:00)
by tri4thlete
Hello, for class I am to create a webpage that is a Lottery. Basically an individual enters 4 numbers (0-9) in 4 different text boxes and a display textbox shows how many times it took to get that exact sequence of numbers.... Here is the code I have created, and it only averages 5 sequences which seems really low... thanks for the help Code: The Lotto!...
Started 4 days, 19 hours ago (2009-11-09 23:02:00)
by oldyeller
I could use a hand with how to formulate my WHILE loop. The compiler keeps giving me errors. error C2065: 'or' : undeclared identifier error C2143: syntax error : missing ';' before 'while' int temps[10] = {22,43,31,35,39,28,41}; bool found, done; int finalValue; Int32::TryParse(valueTextBox->Text,finalValue); int i = 0;...
Started 3 days, 11 hours ago (2009-11-11 06:08:00)
by WayneAKing
Quote>done = false; // this would be "initializing" the variable At the risk of appearing pedantic, but in the interests of accuracy, I think I should point out a necessary distinction here. When the compiler issues a warning about a variable not being "initialized", it means it in the general sense that "the variable has not been given an initial value" before being used as input to ...
Started 5 days ago (2009-11-09 17:13:00)
by tuxiow
Hello all, new here and quite a novice with PHP but am learning. I am hoping someone could help me with a problem I have building a PayPal button for a third party cart. I need to increment each input name in my form so that each item_name and amount is numbered like this...... Line number On/Off | Expand/Contract and so on, depending how many items are in the ...
Started 3 days, 7 hours ago (2009-11-11 10:30:00)
by LearnerMan1234
hi, I have a c++ dll which handles socket communications. It has a function StartServer() which it exports. This function has a while loop which runs forever untill a variable has changed. I am calling this dlls StartServer() function from a C# Windows application (By Pressing a button) and my problem is that as this function has a while loop, focus is never passed back to my C# app. Is ...
Started 2 days, 19 hours ago (2009-11-11 22:50:00)
by RockyMarrone
With your all post i think you need this kind of code Code: #include #define SPACE ' ' int main() { char choice = SPACE; int hexadecimal = 0; while (1) { printf("Please enter your choice "); choice = getchar(); printf("choice === %c", choice); if (choice == 'y' || choice == 'Y' ||\ choice == 'n' || choice == 'N') break; else continue;...
Started 2 days, 6 hours ago (2009-11-12 11:19:00)
by dwblas
Quote: I am curious about the use of the strip() method Somewhere, at some time, someone will enter a space either before or after the actual input and isdigit() returns False if a space is found.