637 Topics

Member Avatar for
Member Avatar for s123456

assuming everything else works...i'm having trouble with the output...the if else statements are driving me crazy. it is outputting the date twice when i enter 7/3/12 code displays todays date....displays "payday" entered......adds 7 days to "payday" to show NEXT payday. void Date::addDays(int month, int day, int year) { _day = …

Member Avatar for MandrewP
0
147
Member Avatar for lulu79

Hi, I want to get last working day data from database(SQL database). For example, if today is Tuesday, I want to get Monday data. I can get the data directly using strtTime = Date.Now.AddDays(-1).ToString("yyyy/MM/dd") & " " & "06:15:00" But the problem is if today day is Monday. Since the …

Member Avatar for lulu79
0
217
Member Avatar for IAMADOG

I was looking at some sample code [here](http://www.kernel.org/doc/man-pages/online/pages/man2/mmap.2.html) and it had this for error handling: #define handle_error(msg) \ do { perror(msg); exit(EXIT_FAILURE); } while (0) If I remember correctly do {} while (0) would execute only once, so what is the point of this?

Member Avatar for deceptikon
0
125
Member Avatar for SeanKann

I'd like to search this before asking a question but I'm not sure exactly what to search for. Posting for help is always a last resort for me. What I'd like to find is I think it's called a loop? or foreach? I think.. What I want to do is …

Member Avatar for LastMitch
0
245
Member Avatar for vivosmith

Hello, I was working on some code, when I ran into this: foreach ($products as $product). One problem, it was not defined. How could this be? Here is the book I got it from: http://english-common.googlecode.com/svn-history/r100/trunk/huyliem/01-Murach.PHP.MySQL/Murach.PHP.and.MySQL.Nov.2010.pdf . It is on 161-163. I don't understand where the $product came from. And one …

Member Avatar for vivosmith
0
255
Member Avatar for FUTURECompEng

I am trying to input an int into the end of a singly linked list. I have already created the code to put a number at the end of the list but when I go to print it out, it only prints out (in my test class) the int that …

Member Avatar for jalpesh_007
0
304
Member Avatar for trd360

My assignment is to randomly generate a password based on the selection chosen by the user. So far, my code is unfinished but that's because I've run into a problem. For the second selection(Lowercase and uppercase letters). My password will display lowercase and uppercase letters but it won't be enough …

Member Avatar for subramanya.vl
0
167
Member Avatar for gg652

I need a program that will ask 16 true or false questions. The game needs to keep going until the user either answers 8 questions correctly or 8 inncorectly. A message should inform the user wether they won or lost and ask if they would like to play again, at …

Member Avatar for rubberman
0
277
Member Avatar for utchia

Hi there i am trying to write a java code that will essentially be like a gps but a lot simplier and i need to make a mini map about 4 by 3. where Dunada and Government is the first intersection and i have already done so by using multiple …

Member Avatar for Taywin
0
136
Member Avatar for acerious

// #include <iostream> #include <iomanip> using namespace std; int main() { float assign1, assign2, assign3, assign4, examScore; float assignWeight; cout << " Welcome to UOW Score System" << endl; cout << " " << endl; cout << "Enter the scores for Assignment 1 / 2 / 3 / 4" << …

Member Avatar for Gonbe
0
154
Member Avatar for adishardis

horizontal scroll from while loop Hmmmm, I accidently posted this in the wrong forum. Is there a way to move it? Hey, ive been trying for several hours now to get the list horizontal with scroll instead of vertical. the divs stacks up to the right but wraps at the …

Member Avatar for adishardis
0
463
Member Avatar for mmcdonald

Hey all. All I need is to collect every `id` from `servers` where `active ='1'` and then cycle the results in a loop right until the end for each individual id. (I've written this on daniweb, might be typo's or errors. I'm not interested in code errors it's the process …

Member Avatar for cereal
0
206
Member Avatar for suhrud.l

For an array of n int variables, When does binary search perform better than ternary search?? Also, reverse case, ie when does ternary search perform better than binary search? Why is binary search a more preferred method of searching for integers entered in an array??

Member Avatar for c1c2c3c4c
0
241
Member Avatar for mike.severini.3

I have an assignment where I have to produce a rectangle or square based off of input values. For example; the user inputs height = 3 and width = 3 *** *** *** But I also need to make a hollowed out box, so it's like this height = 4 …

Member Avatar for mike.severini.3
0
142
Member Avatar for HelloJarvis

Hi guys, I'm working on a little script that generates all combinations of a given input string. My problem is, it's generating the combinations perfectly fine (I checked with an echo), but not inserting them in to an array. Here is my code: function check($width, $position, $base_string, $charSet) { $combinations …

Member Avatar for Bachu
0
163
Member Avatar for cody.reddoor

public void inOrderTraversal(TreeNode node) { if(node == null) { return; } inOrderTraversal(node.getLeft()); System.out.print(node.getKey() + " "); inOrderTraversal(node.getRight()); } I wrote this code for going through a binary search tree and printing out the items in order from low to high. it works just fine but i need to get it …

Member Avatar for Taywin
0
281
Member Avatar for Dean_williams

Hello. I am having a tough time understanding the concept of double linked list. For now, i understand double linked list has 2 links, one forward and another one previous. data is in the middle. when inserting must check where to insert. if previous is equal to null, then can …

Member Avatar for Dean_williams
0
233
Member Avatar for andyy121

if($username&&$password) { $connect = mysql_connect("localhost","root","") or ("Couldn't connect!"); mysql_select_db("phplogin") or die ("Couldn't find db"); $query = mysql_query("Select * FROM users WHERE username='$username'"); $numrow= mysql_num_rows($query); i just wont to know the IF statement when it stars what is his function in the code.

Member Avatar for diafol
0
131
Member Avatar for jalpesh_007

Dear all, I have stuck with one problem. I have taken one Hashmap, Performing some input operation,remove operation on it. So after performing remove operation, i want value of 2 successive key in two different array. Also i want to match 1st key's value with all other keys' value. Like …

Member Avatar for JamesCherrill
-1
1K
Member Avatar for natehome

hi, i'm working with php short hand for the first time and i'm trying to edit this code: <?=($c->is_admin == 'Yes')?'<a href="msg_update.php" input type="submit" class="button" value="protected page">Update Home Page Message</a>' : ' <p> This is not the page you were looking for. </p> ' ?> i want to do something …

Member Avatar for cereal
0
152
Member Avatar for squeak24

I am working on a open source script at the moment, but I am struggling on one final aspect of the script. I am a bit of a newb to PHP at this level, I have a working knowledge of PHP and MySQL, but this seems to be a little …

Member Avatar for squeak24
0
229
Member Avatar for 7c00h

i have some code i am working on andit keeps throwing an expression expected error. this code is designed to cheeck a RichTextBox form and highlight text, specified by a dictionary. Dim location As UInteger = 0 Dim dict As Dictionary(Of String, ULong) = getWords(rText1) Dim wcount As Integer = …

Member Avatar for ObSys
0
2K
Member Avatar for TylerTCF

Hi Everyone. It's been a while since I was on here last, but ran into an interesting problem with a nested for loop that I cannot solve. Hoping someone here will know the answer. I placed breakpoints in my code at the For x=1 to 10 line and after to …

Member Avatar for TylerTCF
0
299
Member Avatar for Grandiago

Hi Everyone! I'm a user of Turbo C++ and my professor gave me an activity to make a Fibonacci sequence. No I already have the Code for it and it is working. The only problem is. I don't know how the FOrmula Works. I will show you the Code below: …

Member Avatar for vinnitro
0
301
Member Avatar for coolikedat99

I am trying to make a program that generates a random number and asks the user to input the random number generated by the computer. Anyone know how to do this? This is my program: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int one; time_t …

Member Avatar for RainbowMatrix
0
291
Member Avatar for edwarddaniel.baldeviano

Hi, everyone! This is my first post ever here in Daniweb. I experienced a problem in printing the sorted array of 5 numbers, as the following code only prints the first iteration of the loop, and it does not print the array input. Here's the code: section .data i db …

0
607
Member Avatar for Djmann1013

I am having trouble with this code block: if($row['banned'] == 1) { header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } elseif ($row['banned'] == 2){ header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } Ive also tried this: if($row['banned'] == 1 or $row['banned']== 2) { header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } But none of this works... I am trying …

Member Avatar for Djmann1013
0
163
Member Avatar for Nutster

I am pretty new to programming in VB.Net, but I have been programming in other languages for a couple of decades now, including VB5/6 and C++. When I am using a **Try** - **Catch** block to handle exceptions, what is the point of a **Finally** section? Wouldn't it be just …

Member Avatar for Reverend Jim
0
292
Member Avatar for niyasc

Can anybody share the algorythm to perform inorder traversal of a binary search tree using parent node(without stack or recursion)

Member Avatar for deceptikon
0
160
Member Avatar for extjac

Hello, i wanted to know what you guys use with PDO. Do you use ->fetchAll() or ->fetch() + while based on some reading i have done, it seems that PDO->fetchAll() is faster but uses more momory...

Member Avatar for pritaeas
0
220

The End.