TA Resources
Some VI Resources
- Type
vimtutor
on the linux grace machines to get the already-installed tutorial for vi/vim, a text editor. - VI in 10 minutes - from unix-manuals.com
GDB Tutorial
Get it below: (Now with more pointers!)- Handout
- Presentation (same content as the handout, but broken into more pages)
Useful (and sometimes not-so-Useful) C/UNIX/etc Tricks
- C-Jump - A Board Game Teaching C
factor
- prime factorization on the command line:foreach
- looping in the tcsh shell (default shell):for
- looping in the bash shell:longest_line.c: Some C code to compute statistics about the longest line of a file. It uses some features of C not yet covered in class, so don't worry if the code itself looks a little confusing.
Compile it the normal way (call it longest_line.x or longest_line), and run it with some files as arguments. To download it directly to your grace account, try using the
View the formatted source code (with color!) or the unformatted version.wget
command on the unformatted version below.- To create a sequence, use the
seq
command: - Combining looping and
seq
(example given in tcsh) using the backtick operators (``): Coloring your prompt. This one's a little messy, so just copy the (admittedly obscure) content into your
~/.cshrc.mine
file, and leave it be...check_malloc(): A helper function to allocate some memory, and also check if the allocation was successful. This will become useful especially when searching for memory leaks.
View the source code here.
Solutions to Homework 1
- Check main course page
Solutions to SQL Assignment
- The solutions for the SQL Assignment is here