P. Conrad, Assistant Professor, CISC Dept.
Q1: When is the Willard Hall 009 lab open?
Q4: When I type "cat lab00.dat" there is a lot of space below it. How do I delete that empty space?
Q7: I can't get my web page to come up.
I edited my ~/public_html/index.html file (or my ~/public_html/cisc105/index.html or ~/public_html/cisc181/index.html file) but when I try to bring up my web page with my web browser, I still can't see it. Is that because I'm on my own PC?
Q8: Why do we have to submit both a source file and cat our source file inside our script?
When we submit to WebCT, you require us to submit a script file that contains a program listing (e.g. "cat lab02.c") as well as submitting the source file for our program as a separate file. That seems redundant, since the source is in both the script file (e.g. lab02.txt) and in the separate source file (e.g. lab02.c). Why do you ask for both, and why are you so strict about deducting points if we don't comply with these silly instructions?
Q9: Why do I get the error "no permission to read license file" when I try to compile?
Q1: When is the Willard Hall 009B lab open?
A: The hours of the SunRay lab are posted on the inside of the door
of the lab. I don't know if they are on the web anywhere. During times that
there are no scheduled labs, the room is open and available for you to work.
Unfortunately, the hours for Willard 009B are somewhat limited: no access on
weekends, for example, and full with scheduled labs the majority of the week.
However, there are SunRays (exactly the same as the machines in Willard 009B)
in the basement of Smith Hall that are much more available, including, I beleive,
nights and weekends.
For the hours of the Smith Hall site, and other sites throughout campus, go
to http://www.udel.edu/sites
Q2: I know that I use "qpr -q whlps filename" to print to the printers in Willard Hall. How do I print to other printers, say the printers in Smith Hall?
A: I didn't know the answer myself, but I found it very quickly.
I'll share with you not only the answer, but how I found it, so
that next time, you might be able to look it up yourself. (That
will also help you in case you misplace this answer.)
The short answer is: put "smips" in place of "whlps" everywhere
you see "whlps" in the instructions I've given you already.
A longer answer is at the following web site, which tells you
all about printing from Unix at UD:
http://www.udel.edu/topics/printing/print.html
I got there by going to http://www.udel.edu/help, and clicking on "P"
for "Printing" at the top of the page.
Q3: I tried to login to the Sun Rays. It partially logged me in, and then it kicked me right out again (or the screen froze up). What is wrong?
A: There are several possible reasons for these symptoms. However, a very common reason is "insufficient disk quota". You can find out more information about disk quota problems and how to fix them by going to the Disk Quota section of my Sun Ray page at:
Q4: When I type "cat lab00.dat" there is
a lot of space below it. How do I delete that empty space?
A: Regarding the extra spaces: if you are using emacs, here is a way to get
rid
of those:
(1) Use: "emacs lab00.dat" to get into the file.
(2) Type the "escape key" once (it is labelled "Esc") and it is at the
upper left hand corner of the keyboard. Then, type the ">" key
(it is the "shifted" key on the "period" key, lower right hand corner".This key combination does (escape >) will take you to the very end
of the file. Similarly, (escape <) will take you to the beginning.
(This is similar, for example, to what the "Home" and "End" keys
do in most Windows programs.)(3) Once you are the end of the file, you can use the delete or backspace
key to get rid of the extra spaces. Just keep hitting delete or backspace;
as you do, your cursor should keep moving backwards until it is on the
blank line right under the last line of text.
(4) Note: There is one thing that can go wrong here. If you are working
from home instead of on the SunRays, it is sometimes the case that
when you type the delete or backspace key, Emacs doesn't actually delete,
but instead shows the following at the bottom of the screen:C-h (Type ? for further options)-
If you see this, then your delete or backspace key is set up to
send "CTRL/H" (the help key in emacs) instead of "delete".If the C-h message comes up, here's what to do:
(a) Type CTRL/G (hold down Ctrl, and type G) to get out of help mode.
(b) If you are using the SSH Secure Shell program (the one available at http://udeploy.udel.edu), go to the "Edit" menu, then "Settings", then
"Profiles Settings", "Connection", "Keyboard", and click the box
next to "Backspace sends Delete". This should fix it so that you
can delete.
Q5: When I log on, it tells me something about $623.45 left in my account. I notice this amount of money going down all the time. What's up with this? What happens when I run out of money? Do I have to pay?
A: First, you don't have to pay anything ever. The "money" that is referred to on strauss is not "real" money, even though it is measured in "dollars". The "money" refers to the amount of computer time that you are budgeted for the semester. Each time you use strauss, the amount of "money" in your account will go down a little bit. Most likely, you won't run out before the end of the semester. But if you do, it could be a problem, so you need to keep an eye on how much you have left.
The easiest way to do that is with the following command: chdgrp.
Here is an example of how to use this command:
> chdgrp Project Title Remaining Valid on hosts 2017 CISC105010-25 490.22 mahler strauss 2023 CISC181010-15,80 999.61 mahler strauss 5018 SCANNING-CIS -0.01 mahler strauss 4000 U. OF D. E-MAIL 43.37 mahler strauss Your default group is currently 2017. To change your default group please go to http://www.udel.edu/network >
The example above shows how to use the chdgrp command to list out the groups that you have available to you, and how much "money" is left in each group. In the example above, you can see that the user shown has the most money left in group 2023. However, this user's current default group is 2017. So, it would be a good idea for this user to change his/her default group to 2023. That way, each time this user logs on, she/he will be charging time against 2023 instead of 2017. When the "money" runs out in 2023, this user can switch to 2017.
To change your default group, you can just type, for example "chdgrp 2017" to change your default group to 2017. The change can take up to 24 hours to take effect. You can also change your default group at the network page: http://www.udel.edu/network.
If you want to change your group only temporarily (i.e. just for one session), use the newgrp command, e.g. "newgrp 2017". This changes your group to 2017, but only until you logoff, not permanently. (To be precise: the change is made for the lifetime of that "shell").
What do you do if you notice you are under $25 on all of your groups? Go to your instructor. Your instructor can request additional "money" to be added to your account? You don't want to wait until you get to zero, because once you do, you won't be able to use your account at all.
Q6: I have a bunch of ^M characters all through my program. How did they get there? Will they hurt anything? How can I get rid of them?
A: Don't worry about the ^M's. They are something that happens when files get transferred between Unix and Windows (and sometimes between Unix and Mac as well.).
Later in the semester, I can show you some ways to get rid of these (since it is annoying to see them).
But in the meantime, don't worry: they aren't hurting anything. To be specific: they won't break any of your programs, and unless I specifically state otherwise at some point in the future, they won't cause you to get a lower grade.
If you just can't wait to learn how to get rid of them, type "man dos2unix" and "man unix2dos" on strauss. This will give you the manual page for the commands that help you get rid of the ^M characters. Later on, I'll add to the FAQ some more detailed information about how to use these commands, but for now, trying to figure it out on your own will be a nice challenge. (Or you can just put up with them for now; your choice.) There are ways to get rid of them in emacs too, which I'll write up later. There may even be a way to do it in vi (though I'll wait for a clever vi fan to send me a writeup on that rather than trying to figure it out myself.)
Q7: I can't get my web page to come up.
I edited my ~/public_html/index.html file (or my ~/public_html/cisc105/index.html or ~/public_html/cisc181/index.html file) but when I try to bring up my web page with my web browser, I still can't see it. Is that because I'm on my own PC?
A: The problem isn't that you are using your own PC. That shouldn't make
any difference in this case.
Instead the problem is that you need to do the command:
chmod -R a+rx ~/public_html
You already did this command once; I can tell, because in your case,
your regular web page (http://udel.edu/~userid) is working fine.
However, your web page http://udel.edu/~userid/cisc105 doesn't work,
because the file ~/public_html/cisc105/index.html is still "protected"
from being looked at by other people. I can tell because I did the
following command (substituting in your userid in place of "userid"
below):
ls ~userid/public_html/cisc105
and I got this output:
> ls -l
total 16
-rw------- 1 userid 2017 511 Sep 11 19:15 index.html
-rw------- 1 userid 2017 503 Sep 11 19:03 index.html~
>
From this output, I can tell that you created your index.html file
already, but I can also tell that you didn't do the
chmod -R a+rx ~/public_html
after you created the index.html file. (see pages 79-82 of your
Anderson text for information on how to read this output.)
Basically, every time you add any new web content under your
public_html directory, you need to do the chmod command again.
Once you do, you'll be able to see your web page (both your regular one, and
the one under cisc105!)
Q8: Why do we have to submit both a source file and cat our source file inside our script?
When we submit to WebCT, you require us to submit a script file that contains a program listing (e.g. "cat lab02.c") as well as submitting the source file for our program as a separate file. That seems redundant, since the source is in both the script file (e.g. lab02.txt) and in the separate source file (e.g. lab02.c). Why do you ask for both, and why are you so strict about deducting points if we don't comply with these silly instructions?
Answer: (The reason for submitting both, though it may seem redundant, is that the script is what the TA uses to get an overall picture of your work on the assignment all in one place. We only go into the .c file if there is a question about what your program does... we might try to compile it and run it ourselves, for example, and we don't want to have to cut and paste out of the script file.)
The reason for being so strict about this and deducting points is that (a) if we don't deduct points, a high percentage of folks won't follow the instructions, no matter how many times we ask, or how nicely we ask. (b) when folks don't follow the instructions, it makes the TAs job that much more difficult. The TAs only get paid for 20 hours a week of work, and that isn't enough time to get the job done (often over 150 programs to grade per week) if they have to do "extra work" because student submissions aren't in the proper form. Having a consistent, rather strict format for input submission allows them to grade in a more efficient manner.
Adjusting the grading penalties/rewards so that students give them stuff in an "easy format" for bulk grading is just, well, necessary, given their work load.
Q9: Why do I get the error "no permission to read license file" when I try to compile?
Here's the exact error message:
>"", license error: Do not have permission to read license file: >/opt/SUNWspro/bin/../prod/bin/../lib/serial.dat >cc: acomp failed for lab04a.c >*** Error code 2
Answer: You are probably logged on to copland (or haydn, vivaldi, schubert etc.) instead of strauss. You can only do C or C++ programming on strauss.
Type ssh -X strauss and that will put you on strauss. Or, use the option on the menu of your Sun Ray or X Terminal that puts you on strauss instead of copland.
Q10: Why do you teach that strcpy is dangerous and we should use strncpy instead? What about strlcpy
I've typed this answer up as a separate file (click here).
*** end of FAQ ***