PLEASE NOTE: the upgrades to this server, secure.csse.uwa.edu.au, have not yet been completed.
Hopefully the changes will be completed on THURSDAY 8th December.
Web-based programs, such as csmarks, cssubmit, and the help fora, will be unavailable at some time on Thursday 8th.
  It's UWAweek 49

help2003/help4407

This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 7 articles in this topic
Showing 7 of 564 articles.
Currently 3 other people reading this forum.


 UWA week 16 (1st semester, non-teaching week) ↓
SVG not supported

Login to reply

👍?
helpful
8:07pm Tue 19th Apr, ANONYMOUS

Hi, Shall we proecess the directory recursively? Can we assume that there are only files to be processed in the directory, no other files or directories? Thanks!


SVG not supported

Login to reply

👍?
helpful
8:14pm Tue 19th Apr, Michael W.

ANONYMOUS wrote:
> Hi, > > Shall we proecess the directory recursively? Can we assume that there are only files to be processed in the directory, no other files or directories? > > Thanks!
Hi, That depends on the Part you are tackling. For the second part, the spec says a directory is expected as the second argument. Cheers MichaelW


SVG not supported

Login to reply

👍?
helpful
2:10am Wed 20th Apr, ANONYMOUS

"Michael Wise" <mi*h*e*.*i*[email protected]*a*e*u*a*> wrote:
> ANONYMOUS wrote: > > > Hi, > > > > Shall we proecess the directory recursively? Can we assume that there are only files to be processed in the directory, no other files or directories? > > > > Thanks! > > Hi, > That depends on the Part you are tackling. For the second part, the spec says a directory is expected as the second argument. > > Cheers > MichaelW
Must we write anti-bugging code to ensure that the directory provided only includes text files?


SVG not supported

Login to reply

👍?
helpful
3:23pm Wed 20th Apr, ANONYMOUS

"Michael Wise" <mi*h*e*.*i*[email protected]*a*e*u*a*> wrote:
> ANONYMOUS wrote: > > > Hi, > > > > Shall we proecess the directory recursively? Can we assume that there are only files to be processed in the directory, no other files or directories? > > > > Thanks! > > Hi, > That depends on the Part you are tackling. For the second part, the spec says a directory is expected as the second argument. > > Cheers > MichaelW
Hi Michael, Yes, for the second part, a directory is expected as the second argument. But can we assume that the directory only includes txt files? If there are some directories, shall we process the files that inside thoses directories? For example, Dir1 |- text1.txt |- text2.txt |- pic.jpg |- Dir2 |- text3.txt |- text4.txt |- Dir3 |-text5.txt |-text6.txt If I input Dir1, which files should I process? Are they just text1.txt and text2.txt, or all the .txt file (from text1.txt to text6.txt) should be considered? Thanks!


SVG not supported

Login to reply

👍?
helpful
6:02pm Thu 21st Apr, ANONYMOUS

Hi, I have 2 problems with Task2, just for clarification, 1. If user input a large number which is larger than the number of words in a file, how can we deal with this situation? 1) Use only the last word for the calculation, or 2) skip that file ? 2. Are we allowed to print some custom infos? For example, when the input parameter is larger than the number of words in a file, are we allowed to print the message like "Your input parameter is too large"? Or do we just need to process it and not print any message? Thanks!


SVG not supported

Login to reply

👍?
helpful
10:20pm Thu 21st Apr, Michael W.
Edited: 4 mins later

ANONYMOUS wrote:
> Hi, > > I have 2 problems with Task2, just for clarification, > > 1. If user input a large number which is larger than the number of words in a file, how can we deal with this situation? 1) Use only the last word for the calculation, or 2) skip that file ? > > 2. Are we allowed to print some custom infos? For example, when the input parameter is larger than the number of words in a file, are we allowed to print the message like "Your input parameter is too large"? Or do we just need to process it and not print any message? > > Thanks!
Hi, The whole point about anti-bugging is foremost, to let the user know that there is a problem, and then do something sensible. For example if N is larger than the number of words, it won't be found. Say something. This relates to the second question, indeed it is expected that you say something, if appropriate. Doing nothing is not acceptable, as the user thinks the program is broken rather than their input. Cheers MichaelW


SVG not supported

Login to reply

👍?
helpful
10:20pm Thu 21st Apr, Michael W.

ANONYMOUS wrote:
> Hi, > > I have 2 problems with Task2, just for clarification, > > 1. If user input a large number which is larger than the number of words in a file, how can we deal with this situation? 1) Use only the last word for the calculation, or 2) skip that file ? > > 2. Are we allowed to print some custom infos? For example, when the input parameter is larger than the number of words in a file, are we allowed to print the message like "Your input parameter is too large"? Or do we just need to process it and not print any message? > > Thanks!

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy