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

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
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.

Displaying the 5 articles in this topic
Showing 5 of 919 articles.
Currently 2 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
1:19am Thu 1st Sep, ANONYMOUS

Hello, would we need to transfer the file contents to another file by writing or would we be storing them in an array? I read the lecture notes covering writing into files but is this necessary here? And would we need to remove carriage-returns or newlines from the file lines because what I've done so far is to check for '#' or ''. Now, I ran some commands through the sample-solution and when the first character of a line is empty, it returns 'invalid minute' which means it's aware that the first argument value should be a value between 0-59 - but how does it know/do this? I'm unsure of the big picture. Still trying to get the hang of this. Thanks in advance!!


SVG not supported

Login to reply

👍?
helpful
1:26am Thu 1st Sep, ANONYMOUS

Would a struct be ideal for storing commands of a month, number of commands, max number of commands of each month (to be returned at the end)?


SVG not supported

Login to reply

👍?
helpful
5:29am Thu 1st Sep, Christopher M.

ANONYMOUS wrote:
> Hello, would we need to transfer the file contents to another file by writing or would we be storing them in an array? I read the lecture notes covering writing into files but is this necessary here?
There's certainly no need to use another file; unless the amount of data exceeds what can 'easily' fit in a computer's RAM, or if we wish to retain data for a long period, the usual approach is to read data from a file (once) and store it in a data-structure.
> I'm unsure of the big picture. Still trying to get the hang of this.
You appear to have some fundamental misunderstandings about the project. I strongly suggest that you (and your project partner?) attend one of our laboratory sessions and speak with a lab demonstrator.


SVG not supported

Login to reply

👍?
helpful
10:44pm Thu 1st Sep, ANONYMOUS

This is me thinking out loud: should we be allocating the time values of 'struct tm' to the crontab values, so that tm_min, tm_hour, tm_mday, tm_month and tm_weekday align with the syntax of our crontab files, so that our simulator knows which argument is valid/missing/correct, etc?


SVG not supported

Login to reply

👍?
helpful
5:31am Sat 3rd Sep, Christopher M.

ANONYMOUS wrote:
> This is me thinking out loud: should we be allocating the time values of 'struct tm' to the crontab values, so that tm_min, tm_hour, tm_mday, tm_month and tm_weekday align with the syntax of our crontab files, so that our simulator knows which argument is valid/missing/correct, etc?
This is a reasonable approach, though keep in mind that some fields of each struct tm are not specified in the crontab file (as they are not required). I've found it helpful to use the same field names, simply for readability.

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