User Tools

Site Tools


opus:fall2012:mowens3:part3

Part 3

Entries

Entry 1: November 9, 2012

Finished the MOST AWESOMEST puzzlebox EVER!!!

Entry 2: November 15, 2012

Finally our set program was due, I still have no real idea how I was supose to do mine still.

Entry 3: November 27, 2012

Taking a more indepth look into how this binary tree program is going to be. Look like I will use a couple of different things. I am going to have to write stuff down on paper by the looks of it, nothing unusual though.

Entry 4: November 28, 2012

Couple of days left to do my keywords and my experiment.

This is going to be interesting. Also went over all of our end of course experiences, looks pretty fun. I am excited for this semester to be almost over. 1 more semester and hopefully I will be trnasfering to RIT!

Keywords

data Keyword 3

Recursive tree transversal

Definition

A form of going through a Tree via recursion. Recusion is calling the function while still inside the function before finishing the original function.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

data Keyword 3 Phase 2

Postfix (reverse polish)

Definition

A mathematical notation wherein every operator follows all of its operands. For instance “3 + 4” would be written as “3 4 +”. If there are multiple operators the operator is given immediately after its second operand; so the expression written “3 − 4 + 5” in conventional infix notation would be written “3 4 − 5 +”

References

Demonstration

A simple demonstration of this would be 5 5 + 10 - which would equal 0

The conventional infix notation is 5+5-10.

discrete Keyword 3

Matrix Multiplication

Definition

The multiplication of two or more matrices to produce a new matrix.

References

discrete Keyword 3 Phase 2

finite state machine.

Definition

  It is conceived as an abstract machine that can be in one of a finite number of states. 
  The machine is in only one state at a time; the state it is in at any given time is called the current state.
  It can change from one state to another when initiated by a triggering event or condition, this is called a transition. 

References

Demonstration

Draw some circles and connect the dots, upload them to this.

Demonstration of the indicated keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

unix Keyword 3

bvi/hexedit

Definition

bvi: BVI is a binary visual editor, it allows you to visually see binary values and edit them.

Hexedit: Hexedit is a similar program that show's you the same values in hexidecimal instead of binary.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

unix Keyword 3 Phase 2

head

Definition

head is a command used to display the first few lines of a text file or piped data

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

en.wikipedia.org/wiki/Head_(Unix)

Demonstration

Demonstration of the indicated keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~/src/unix$ head wildcard.notes
Their are a set of wild cards for your command line

* means 0 or more of any character (a true wild card);
so *.o would be any file that ends with .o

? - 1 of any character (a single wild card);
so ??? would be any file with 3 letters (so ls ??? would show any 3 letter files)

[] - 1 of any of the enclosed, so any of the letters entered in the brackets
so [rstlne] means it must have one of them to show, so ls [rstlne]* would only show
lab46:~/src/unix$

Experiment 3

Question

what is up with the “+” and the “-” from jobs

Resources

What Matt said in class and my minor playing around with it before starting the hypothesis

Hypothesis

I believe the + sign desonates the last paused job that will be resumed first in a stack style. While the - sign desonates the 2nd last paused job that will become the + sign after resuming the previous + signed job.

Experiment

I am going to run and pause several jobs, and then print out jobs, and take note of where the + and - sign are. Then resume a job, and close it. Rerun jobs, and take note of where the + and - sign are again. Contine that a couple of times taking note of where the + and the - signs god, and that should give us enough data to confirm what is what.

Data

lab46:~$ jobs
lab46:~$ cat
^C
lab46:~$ cat
^Z
[1]+  Stopped                 cat
lab46:~$ vi

[2]+  Stopped                 vi
lab46:~$ nano
Use "fg" to return to nano.

[3]+  Stopped                 nano
lab46:~$ emac
-bash: emac: command not found
lab46:~$ emacs

[4]+  Stopped                 emacs
lab46:~$ jobs
[1]   Stopped                 cat
[2]   Stopped                 vi
[3]-  Stopped                 nano
[4]+  Stopped                 emacs
lab46:~$ man jobs

after resuming and closing EMACS

lab46:~$ fg 4
emacs
lab46:~$ jobs
[1]   Stopped                 cat
[2]-  Stopped                 vi
[3]+  Stopped                 nano
lab46:~$ 

we noticed how our - on nano became a + and the vi program got -, so next we will open and close Vi, which should move the - from vi to cat.

vi
lab46:~$ jobs
[1]-  Stopped                 cat
[3]+  Stopped                 nano
lab46:~$ 

Did exactly as expected. now lets open up a couple more programs and see what happens.

lab46:~$ vi

[4]+  Stopped                 vi
lab46:~$ jobs
[1]   Stopped                 cat
[3]-  Stopped                 nano
[4]+  Stopped                 vi
lab46:~$ man
What manual page do you want?
lab46:~$ man printf

[5]+  Stopped                 man printf
lab46:~$ jobs
[1]   Stopped                 cat
[3]   Stopped                 nano
[4]-  Stopped                 vi
[5]+  Stopped                 man printf
lab46:~$ 

so now lets use basic fg, which is what this entire experiment is about.

lab46:~$ fg
man printf
lab46:~$ jobs
[1]   Stopped                 cat
[3]-  Stopped                 nano
[4]+  Stopped                 vi
lab46:~$ 

it opened our man page.

So all of this data has confirmed to me my hypothosis was correct.

Analysis

Based on the data collected: My hypothesis was correct, even after running the progams several times to make sure.

Conclusions

Jobs and fg and bg work all together and they work on a stacak based idea. Last object in is the first object out. What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

opus/fall2012/mowens3/part3.txt · Last modified: 2012/11/30 18:28 by mowens3