Database (Recursion and Factorials)
I am currently working on a factorial procedure that figures out a factorial for a number and eventually I will store it in the mysql database. I am kind of getting caught up with this program below. I am confused how the program is executed with all the recursive direct calls to itself. Can somebody step me through this one slowly so I can see the flow of where a number gets passed all the way to the end where it returns the final number. I am getting hung up here the most where the actual recursion takes place I guess where I am getting lossed is where does the calculation take place and how does it take place. For instance in this example I pass 5 it then gets to the line below and evaluates value = 5 * factorial(5-1)- right there that tells me to call the function again and pass it 4 then when I get to the line right below me $value = 4 * factorial(4-1). I don't see where the actual calculation takes place 5 * 4 * 3 * 2 = 120. Everytime a number gets passed I feel that somehow what I have done before is gone. Can somebody walk me through this very carefully so I can see what is really going on. $value *= factorial($value - 1); Thanks #!/usr/bin/perl sub factorial { my $value = shift (@_); if ($value == 1) { return $value; } else{ $value *= factorial($value - 1); return $value; } } $result = factorial(5); print $result; - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Convert time difference to decimal number
I am working on a project that needs to get This particular format 1000.25 1000 representing hours and 25 represent minutes 1000 means a full 1000 minutes .25 means a quarter of an hour so essentially in english language we could say a thousand hours and about 15 minutes I need a way in sql or simple programming to take a timpestamp(end time) and a timestamp(beginning time) for instance 12:00:00 is the end time 11:30:44 is the start time from here is where i need a solution that gets me the difference of these two times in a decimal format. Of course once I get that I may need to convert back in english to say there are 30 minutes and 44 seconds. any ideas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
What is involved in running ASP scripts, MySQL SERVER on Cobalt Raq3
Just what the subject said. What is this going to take to get ASP talking to a mysql database on a Cobalt Raq 3 Server(A flavor of Linux). Is it costly? What is it going to take? Thanks BK - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Uninstalling and Troubleshooting RPM
I am very frusturated as of right now. I have a mysql database that doesn't work on Cobalt Raq3. I installed the RPM version and guess what the mysql.sock file isn't there and ther server gives me this error when starting: Starting mysqld daemon with databases from /var/lib/mysql mysqld daemon ended Then it gives me when i connect with command prompt mysql Can't connect can't connect through mysql.sock and it may not exist I am so frusturated now all I want to do is uninstall this rpm and install the source files. The bottom line is that the command rpm -e filename doesn't work it gives me an error filename is not installed. The truth is it is installed and I want it to work. I will be happy for a solution to either to fix this sock problem or uninstall this software all 3 rpm's(client,server, and devel) so I can just install the source tarball. Any suggestions Brent - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Problems with RPM installation
Why am I getting this error. Is the rpm program not working. I am running as user admin not root. I was told that I can still install mysql without using the root user. The only thing i know is that when I went to that directory below I don't have permission to write to that directory. I am not a expert in network administration. I just want some reasoning behind this error. failed to open //var/lib/rpm/packages.rpm error: cannot open //var/lib/rpm/packages.rpm - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysql.sock doesn't exist
Today I had an unsuccessful intallation of mysql 3.22.32 (RPM) server on a Cobalt Raq 3 Server. I am not quite sure why the file didn't install but the 2202 can't find var/lib/mysql mysql.sock error continues to be an error when starting safe_mysqld server. How can I solve this problem? I went ahead and manually added this sock file but when the server is started it comes and says mysql server starts and the dameon ends and my mysql.sock file that i manually added on the var/lib/mysql directory has now been deleted. I am frusturated why this didn't work. Any help would be great. Brent - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Need MYSQL for COBALT Rack3
Need some help. I need the RPM files for the Cobalt Rack 3. Any ideas. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php