User Tools

Site Tools


opus:fall2012:eolson1:part2

Part 2

Entries

Entry 1:UNIX October 12, 2012

In class today we began talking about programming. We walked through through the different languages or tools available to the average programer to complete certain tasks. Some of the different types of languages are logical, procedural, functional etc… These different types all have there purpose and are used for different tasks. Then we talked about the different levels of programming languages such as the assembly language which is very low level all the way up to c++ which is much higher lever. Then we wrote and compiled Hello.c. All the concepts talked about today made sense to me. I am not really facing any challenges with this course.

Entry 2: UNIX October 19, 2012

Today we began by talking about the ps command like we talked about last class. We got into ps aux which shows all the processes running on the system. Then we talked about the command top. Top shows you the top running programs on the system at that time and it also refreshes itself! Also a command called whowatch became apparent to us. we then began talking bout and using the sed command which is a stream editor with that and the cut command we were able to edit our output of ps aux to what we wanted.

  • just a cool what to see what is running on the system.
  • all of this made sense

Entry 3: DATA October 31, 2012

On the dark Halloween day we started to talk about the binary tree. They seem to be very useful in the sense that they can be used for sorting automatically. There very structure allows them to sort. There are also many ways to implement them such as recursion, iteration, and even stacks. We then talked about infix notation and how the computer does the math functions different than we do. we will writ an equations (2+3)*6 and the computer will do 2 3 + 6 *. so 2 3 and the operation and do that 6 * (six times)

  • This was very interesting seeing the logic to this after trying our own implementation of a sort
  • seems very simple i am excited to attempt implementing it.
  • I am not really sure what is not making sense because i have not played with it yet.

Entry 4: UNIX October 31, 2012

In class today we did more with editing a string. We used the file spring2013-20121026.html. Most of our experimentation consisted of the sed command to replace strings of characters with other things to make the string more useful. Many times we removed a ton of code. In this case the file was an html file so after removing all the html code the file became very useful. This was very eye opening someone who was experienced with these techniques could especially get a ton of information very quickly and efficiently from different sources.

  • I just need more practice using the sed command and scanning for useful information in various files.

Keywords

data Keyword 2

stack overflow condition

Definition

A stack overflow is when to much memory is used when creating a stack. when a stack is created it uses something called a push which is basically the append function in a linked list. The push will “Push” something on the stack. similar to a stack of papers the “push” puts a paper on the top of the stack. A stack overflow is when you put to many papers on the stack.

References

data Keyword 2 Phase 2

! queue data structure !!!!

Definition

Queue Data Structure

Queue is a specialized data storage structure (Abstract data type). Unlike, arrays access of elements in a Queue is restricted. It has two main operations enqueue and dequeue. Insertion in a queue is done using enqueue function and removal from a queue is done using dequeue function. An item can be inserted at the end (‘rear’) of the queue and removed from the front (‘front’) of the queue. It is therefore, also called First-In-First-Out (FIFO) list. Queue has five properties - capacity stands for the maximum number of elements Queue can hold, size stands for the current size of the Queue, elements is the array of elements, front is the index of first element (the index at which we remove the element) and rear is the index of last element (the index at which we insert the element).

Queue is a data structure that maintain “First In First Out” (FIFO) order. And can be viewed as people queueing up to buy a ticket. In programming, queue is usually used as a data structure for BFS (Breadth First Search). Queue operations

Operations on queue Q are :

1. enqueue - insert item at the back of queue Q 2. dequeue - return (and virtually remove) the front item from queue Q 3. init - intialize queue Q, reset all variables.

References

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

Demonstration

This is a basic linked list based demonstration of a queue. A queue is basically a line so first in the queue is at the “front” of the line and when you insert into the queue you insert at the end just like a line.

discrete Keyword 2

power set

Definition

A power set is a set of all the subsets. This set includes the empty set and the set itself. for example if we took a set called t={x,y}. All the subsets would be:

{} {x} {y} {x,y}

Thus the power set of this would include:

P(t)=x_y_x_y

References

discrete Keyword 2 Phase 2

set difference

Definition

Set Difference is the resulting set from two different sets. The resulting set contains only values that were in the first set (aka set a) that are not in the second set (aka set b).

References

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

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

Demonstration of the indicated keyword.

Set's:

A = {1, 2, 3}

B = {2, 3, 4}

set difference C = {1}

unix Keyword 2

wildcards

Definition

wildcards are used in unix and other operating systems when searching for files or directory’s. some of the most common wildcards are the * and ?. The asterisk is used to represent any number of unknown characters. For example if you typed in file* you may receive a number of files beginning with file… file1.txt, file2.txt, fileboy.txt, fileoctopus.txt. Note that the .txt has nothing to do with it it is just a file name extension. The ? make on the other hand only represents one unknown character so if you typed in file? you will only receive file names such as file.txt, file1.txt, file2.txt but now files with more than one extra character after the name file.

References

unix Keyword 2 Phase 2

shabang

Definition

A shabang is this: #! The shabang is used to read the following test on the first line after it to determine what interpreter the user would like to… use. Some example of interpreters (Taken directly from http://en.wikipedia.org/wiki/Shebang_(Unix):

  • #!/bin/bash – Execute the file using sh, the Bourne shell, or a compatible shell
  • #!/bin/csh – Execute the file using csh, the C shell, or a compatible shell
  • #!/usr/bin/perl -T – Execute using Perl with the option for taint checks
  • #!/usr/bin/php – Execute the file using the PHP command line interpreter
  • #!/usr/bin/python -0 – Execute using Python with optimizations to code
  • #!/usr/bin/ruby – Execute using Ruby

References

Demonstration

The #!/bin/bash makes the script use the bash interpreter.

  1 #!/bin/bash
  2 #
  3 #script 3
  4 #
  5 #
  6
  7 value=`bc <<< "$RANDOM"`
  8 num=`bc <<< "$RANDOM"`
  9
 10 While [ $num -ne $RANDOM ] ;
 11 do
 12
 13 echo -n "guess a value: "
 14 echo "$num"
 15 echo "Nope $num is not equal to $RANDOM"
 16
 17 done
 18
 19
 20 echo "YAY!!!!! IT WORKED!"
 21
 22
 23 exit 0

Experiment 2

Question

Is it possible to run an Nvidia GPU running two monitors and a ATI GPU running a third?

Resources

After asking some Questions around the LAIR it was apparent that it was possible but could be a bit weird. After looking online i also fiound information agreeing that it would be possible. So i thought i would give it a try.

Source's:

-Wisdom and Knowledge resonating from the LAIR

-http://www.techradar.com/us/news/computing-components/peripherals/the-complete-guide-to-multiple-monitors-1074313

Hypothesis

I believe this will be possible based on what I had read and heard so basically i just decided to go full throttle and just give it a whirl.

Experiment

I am going to install an ATI graphics card borrowed from the LAIR's vast resources and start op my machine and see what happens.

Data

upon starting the computer the drivers for the graphics card were automatically installed and then i restarted the computer. Then I began to attempt to configure the tipple monitor display. In my case it was fairly easy, I stared blankly at the configuration window and wondered why it was not using the third monitor. In the middle of staring Pressly came over and simple told the Nvidia card to use the card. THEN! MAGICALLY it came alive. The point is though it did nopt give me any problems and was very simple to get the system to work.

Analysis

Based on the data collected:

  • The hypothesis was correct
  • I actually thought there would be more to it than there was. The process ended up being very simple.
  • Having two different GPU's for three monitors could have limitations especially when one is not as advanced.

Conclusions

I have ascertained that the idea will work and for my application i will have no problems. If i wanted to play games on the other hand although not tested there could be some problems.

opus/fall2012/eolson1/part2.txt · Last modified: 2012/10/31 16:24 by eolson1