Can anyone help me put this program together. It is crucial.
If anyone can help me with these it would help me out greatly because I
am deeply struggling with these and would love to finish the big program
after these are completed.
PROGRAM #1
Write a simple web server log analysis program that will read the
provided apache.log file and use a case statement to print the HTTP
method used by each web transaction in the log. Each line of the log
file is a single file transaction and has a clearly displayed HTTP verb.
Since this is a good
web server, it only accepts HEAD, GET, POST, and OPTIONS. There are
other methods like TRACE, if these are encountered ‘invalid’ should be
displayed. For the provided log file, your output
should look something like:
Request 1 used GET.
Request 2 used GET.
Request 3 used GET.
Request 4 used GET.
Request 5 used POST.
Request 6 used an invalid verb/method.
Request 7 used HEAD.
There is no need to write code to read the file. Use the gets method to
read from standard input
(STDIN). When running the program, use I/O redirection to redirect the
file to standard input like
this:
$ ruby inf_name_1.rb < apache.log
PROGRAM #2
A program that will print a two-column ASCII table for both lowercase
and uppercase letters
and the digits 0-9. Your output should look something like the
following:
Character ASCII Value
A 65
B 66
C 67
D 68
[snip]
.ord may be helpful, it will convert a single-character string (or
character literal) into the ASCII value.
If anyone can solve either one of these then it would be very helpful
and I would admire you forever =)
Thanks
It would be much better for you to learn how to do this yourself. Have
you considered doing some research?
Joel P. wrote in post #1095791:
It would be much better for you to learn how to do this yourself. Have
you considered doing some research?
I have been trying to learn it by myself but to no avail, I am cracking
under the pressures of the deadline, these are just pieces to a larger
program that I am struggling with. I am trying to put together these
pieces so I can construct the larger program =/
Your tasks look like homework assignments…if this is the case, have
you talked to your professor?
-Ryan
On Thu, Feb 7, 2013 at 5:30 PM, Wayne E. [email protected] wrote:
Can anyone help me put this program together. It is crucial.
What for?
If anyone can help me with these it would help me out greatly because I
am deeply struggling with these and would love to finish the big program
after these are completed.
How are you going to write “the big program” if you do not finish the
small programs yourself?
If anyone can solve either one of these then it would be very helpful
and I would admire you forever =)
By doing your homework / whatever assignment yourself you’ll learn
much more. This is not a coding service (even though it may look like
it at times).
Regards
robert
I was trying to see if I could get some help on a few of the smaller
parts because I was worried that I will not have time to finish these
for the class and still have time to finish some of the other smaller
parts and then piece it all together.
Robert K. wrote in post #1095797:
On Thu, Feb 7, 2013 at 5:30 PM, Wayne E. [email protected] wrote:
Can anyone help me put this program together. It is crucial.
What for?
If anyone can help me with these it would help me out greatly because I
am deeply struggling with these and would love to finish the big program
after these are completed.
How are you going to write “the big program” if you do not finish the
small programs yourself?
If anyone can solve either one of these then it would be very helpful
and I would admire you forever =)
By doing your homework / whatever assignment yourself you’ll learn
much more. This is not a coding service (even though it may look like
it at times).
Regards
robert
Not only will you learn nothing, I’d think about the chances that your
prof. is on this list…if it’s a Ruby class I’d say the chances are
very good. Just something to think about, especially with cheating being
grounds for expulsion at least in many U.S. universities.
-Ryan
On Thu, Feb 7, 2013 at 6:03 PM, Wayne E. [email protected] wrote:
I was trying to see if I could get some help on a few of the smaller
parts because I was worried that I will not have time to finish these
for the class and still have time to finish some of the other smaller
parts and then piece it all together.
Getting help is something different than asking others to write a
program for you. Also, I hope you are aware that by having others do
the work you’ll learn exactly zero.
Cheers
robert