bash-4.3$ date
Mon Mar 6 13:03:13 EST 2017
bash-4.3$ pwd
/home/accts/sbs5/cs223/www/current/lectures
bash-4.3$ cd code
bash-4.3$ ./lp0306
hello, world!
bash-4.3$ cd
bash-4.3$ cd cs223/hw5
bash-4.3$ ls
alice.html btreetest btreetestargs.o test xxx.html
alice.txt btreetestargs btreetest.c test1
btree.h btreetestargs.c Cloudx test2
btree.o btreetestargs.c~ Makefile test3
bash-4.3$ ./Cloudx < test
No words seen 5 times.
bash-4.3$ cat test
now is the time for all
good men to come to the aid of
some
their country **root**
bash-4.3$ ./Cloudx test1
Fatal error: invalid command line argument: test1
bash-4.3$ ./Cloudx < test1
The Word Cloud:
[0] country [5]
[1] their [5]
[2] of [5]
[3] aid [5]
[4] come [5]
[5] men [5]
[6] good [5]
[7] for [5]
[8] to [10]
[9] the [9]
bash-4.3$ ./Cloudx -html < test1
country
their
of
aid
come
men
good
for
to
the
bash-4.3$ ls
alice.html btreetest btreetestargs.o test xxx.html
alice.txt btreetestargs btreetest.c test1
btree.h btreetestargs.c Cloudx test2
btree.o btreetestargs.c~ Makefile test3
bash-4.3$ cd
bash-4.3$ cd cs223/www/current/lectures/code
bash-4.3$ ls
badDoubler.c lists lp0215.c queuetest.c
btreeint lists2 lp0220 queuetest.o
btreeintargs lists2.c lp0220.c random
btreeintargs.c lists.c lp0227 random.c
btreeintargs.c~ lookingAtPointers lp0227.c stacklist
btreeint.c lookingAtPointers.c lp0301 stacklist.c
btreeint.c~ lp0118 lp0301.c stacknotes
examplehash lp0118.c lp0306 stack.py
examplehash2 lp0120 lp0306.c struct
examplehash2.c lp0120.c Makefile struct2
examplehash.c lp0123 mt struct2.c
exhash lp0123.c mygetLine struct3
exhash2 lp0125 mygetLine.c struct3.c
exhash2.c lp0125.c myString struct.c
exhash.c lp0206 myString.c sumRange
getLine lp0206.c myString.h sumRange.c
getLine.c lp0208.c printArgs tolower
goodDoubler.c lp0213 printArgs.c tolower.c
hi lp0213.c __pycache__
hi.c lp0215 queuetest
bash-4.3$ ./btreeint
Welcome to btree!
Adding 2
Tree height: 1 Size: 2
Adding 5
Tree height: 2 Size: 3
Adding 3
Tree height: 3 Size: 4
Adding 7
Tree height: 3 Size: 5
Adding 2
Tree height: 3 Size: 5
Adding 5
Adding 5
Adding 5
Preorder: 0 [3] 2 [2] 5 [1] 3 [0] 7 [0]
Inorder: 0 [3] 2 [2] 3 [0] 5 [1] 7 [0]
bash-4.3$ valgrind !!
valgrind ./btreeint
==14538== Memcheck, a memory error detector
==14538== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==14538== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==14538== Command: ./btreeint
==14538==
Welcome to btree!
Adding 2
Tree height: 1 Size: 2
Adding 5
Tree height: 2 Size: 3
Adding 3
Tree height: 3 Size: 4
Adding 7
Tree height: 3 Size: 5
Adding 2
Tree height: 3 Size: 5
Adding 5
Adding 5
Adding 5
Preorder: 0 [3] 2 [2] 5 [1] 3 [0] 7 [0]
Inorder: 0 [3] 2 [2] 3 [0] 5 [1] 7 [0]
==14538==
==14538== HEAP SUMMARY:
==14538== in use at exit: 120 bytes in 5 blocks
==14538== total heap usage: 6 allocs, 1 frees, 1,144 bytes allocated
==14538==
==14538== LEAK SUMMARY:
==14538== definitely lost: 24 bytes in 1 blocks
==14538== indirectly lost: 96 bytes in 4 blocks
==14538== possibly lost: 0 bytes in 0 blocks
==14538== still reachable: 0 bytes in 0 blocks
==14538== suppressed: 0 bytes in 0 blocks
==14538== Rerun with --leak-check=full to see details of leaked memory
==14538==
==14538== For counts of detected and suppressed errors, rerun with: -v
==14538== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
bash-4.3$ ./btreeintargs 4 7 3 8 2 9
Welcome to btree!
Adding 4
Tree height: 1 Size: 2
Adding 7
Tree height: 2 Size: 3
Adding 3
Tree height: 2 Size: 4
Adding 8
Tree height: 3 Size: 5
Adding 2
Tree height: 3 Size: 6
Adding 9
Tree height: 4 Size: 7
Preorder:
0 [4] 4 [3] 3 [1] 2 [0] 7 [2] 8 [1] 9 [0]
Inorder:
0 [4] 2 [0] 3 [1] 4 [3] 7 [2] 8 [1] 9 [0]
bash-4.3$ ./btreeintargs 7 3 4 2 9 8
Welcome to btree!
Adding 7
Tree height: 1 Size: 2
Adding 3
Tree height: 2 Size: 3
Adding 4
Tree height: 3 Size: 4
Adding 2
Tree height: 3 Size: 5
Adding 9
Tree height: 3 Size: 6
Adding 8
Tree height: 3 Size: 7
Preorder:
0 [3] 7 [2] 3 [1] 2 [0] 4 [0] 9 [1] 8 [0]
Inorder:
0 [3] 2 [0] 3 [1] 4 [0] 7 [2] 8 [0] 9 [1]
bash-4.3$ exit
Process shell finished