Began working on all three classes word definitions and some of the projects, such as the install of Ubuntu to a desktop system.
root | home | jdavis34 | ___________________________ | | | | | bin src data lab2 lab1 | ___________ | | | cprog unix submit
After a long extensive process I caught up on the 1 assignment I missed cause I was deathly ill over the weekend, and CSx04 which for some reason did not submit the first time I did it. Now I believe it is time to get working more on the Opus and try to see if I can find a work around for the Android tablet and certain keys not functioning correctly with remote log in for lab 46. Probably maybe going to work on a experiment as well.
Spent some time playing with and tweak Vi editor so when coding it is more comfortable to use. jdavis34@lab46:~/src/cprog$ vim ~/.vimrc
1 syn on 2 set nu 3 set ruler 4 set title 5 set cul 6 hi CursorLine term=underline cterm=underline gui=underline 7 set insertmode WTB more cool things to do with VI
aptitude install cmake
aptitude install build-essential
aptitude install mysql
aptitude install mysql-server
cd /usr/src – to change the current directory to /usr/src directory
wget http://download.berlios.de/pvpgn/pvpgn-1.8.5.tar.gz
wget http://download.berlios.de/pvpgn/pvpgn-support-1.2.tar.gz
tar xfz pvpgn-1.8.5.tar.gz
tar xfz pvpgn-support-1.2.tar.gz
to start /usr/local/sbin/bnetd
To stop: sudo killall bnetd
To restart: sudo killall -HUP bnetd
To force quit: sudo killall -KILL bnetd
stdin is associated with a user's standard input stream. usually a keyboard.
stdin is associated with an output stream used for normal program output. usually a display terminal.
stdin is associated with an output stream used for error messages. often a display terminal.
Demonstration of the chosen 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() { int x; printf( "please type your age: \n"); scanf( "%d", &x ); printf( "Is your age, %d \n"); return(0); }
A header file is a file containing C declarations, You request the use of a header file in your program by including it, with the C preprocessing directive `#include'.
There are a large number of headers listed bellow is a few
/* * Sample code block */ #include <stdio.h> #include <math.h> #include <signal.h> #include <stddef.h> #include <complex.h> int main() { return(0); }
Operator Description
+ Adds two operands
- Subtracts second operand from the first
* Multiply both operands
/ Divide numerator by denumerator
% Modulus Operator and remainder of after an integer division
++ Increment operator, increases integer value by one
– Decrement operator, decreases integer value by one
Binary arithmetic operators are +, -, *, /, and %.
int a = 25; int b = 5; int c; c = a + b; printf( "a + b = %dn", c ); c = a - b; printf( "a - b = %dn", c ); printf( "a * b = %dn", a * b ); c = a / b; printf( "a / b = %dn", c ); c = 100 % 3; printf( "a % b = %dn", c );
“==” Checks if the value of two operands is equal or not, if yes then condition becomes true.
“!=” Checks if the value of two operands is equal or not, if values are not equal then condition becomes true.
“>” Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true.
“<” Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true.
“>=” Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true.
“⇐” Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true.
“&&” Logical AND operator. If both the operands are non zero then then condition becomes true.
“||” Logical OR Operator. If any of the two operands is non zero then then condition becomes true.
“!” Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false.
Demonstration of the chosen 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$
man3 printf Are allocated blocks of storage in memory that we can associate with a name, such as “pirce”, “age”, “year”, etc.
Name Type Range
int Numeric - Integer -32 768 to 32 767
short Numeric - Integer -32 768 to 32 767
long Numeric - Integer -2 147 483 648 to 2 147 483 647
float Numeric - Real 1.2 X 10-38 to 3.4 X 1038
double Numeric - Real 2.2 X 10-308 to 1.8 X 10308
char Character All ASCII characters
Examples of variables can be but not limited to:
int x %d short x %d long x %d char x %c float x %f double x %lf
The sizeof operator gets the size of its operand.
This initializes X to the size of c, resulting in a integer of the type size_t:
size_t X = sizeof(c);
In computing, a C string is a character sequence terminated with a null character
In the following, the string literal “hello world” is printed.
/* * Sample code block */ #include <stdio.h> int main() { printf("hello world"); }
The variable initialization allows you to either declare a variable and give it a value or give a value to an already existing variable. Second, the condition tells the program that while the conditional expression is true the loop should continue to repeat itself.
FOR - for loops are the most useful type. The syntax for a for loop is
for ( variable initialization; condition; variable update ) { Code to execute while the condition is true }
By the end of this semester show the ability to demonstrate the use of logic and structure in program writing.
The method of this could be variously described, but a easy effective means would be to ask a student to create a set of instructions that:
1. creates a program
2. Initializes the program
3. contains a logical sense to obtain a desired result, IE: if someone wanted to multiply 2 numbers and get a result.
To asses how a students effectiveness was in creating this first:
1. Does the program compile without errors.
2. Does the program ask for input for the 2 variables to be multiplied.
3. Does the program give the correct desired answer for this function it is to serve.
4. Lastly the code in which it is written, was it initialized properly, does it only prompt the user for one occurring event, Does it ask the user to input a variable to end, does it continuously loop and not close itself without the user having to exit the program, there is a large list in structuring the means to a achieved goal and many ways to reach it, but in the end was it the most efficient.
Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.
Identification of chosen keyword (unless you update the section heading above).
Aptitude is a menu-driven, text-based front-end to the Advanced Packaging Tool or APT system. Many of the common package management functions, such as installation, removal, and upgrade, are performed in Aptitude with single-key commands.
start Aptitude as a normal user with the following command at a terminal prompt
lab46:~$ sudo aptitude
lab46:~$ aptitude update
lab46:~$ aptitude upgrade
Is a virtualization that presents a software interface to virtual machines.
virtualization technique that provides a virtual machine enviorment that is a complete simulation of the underlying hardware. It requires that every aspect of the hardware be reflected on other virtual machines, including the full instruction set, input/output operations, interrupts, memory access, and whatever other tools that are used by the software that runs on the bare machine.
A virtual machine monitor that allows multiple multiple operating systems to execute on the same hardware.
This is a server emulation software, that emulates blizzard battle.net online gaming services.
In the process of setting up a server so more will come for this part of this one..
Virtual Server, is a server to which intended virtual machines will be hosted and or migrated off of.
this example is the server that had been created in class.
lab46:~$ ssh root@vmserver02.student.lab
A machine on a server set up to run particular processes predefined by the user but not limited to just these, or not limited to only existing inside of a virtual machine. The benefit to this is the ease of portability depending on software used in porting it to other systems without reconfiguration, and possibly while it is still running.
Again this example is the virtual machine within the server created in the previous word.
lab46:~$ ssh root@vm34.student.lab
Defining a script that is set to run on the start up of a software or service that determines particular variables that effect the working environment in relation to end user settings desired in a particular circumstance.
such files as working with the pvpgn server we are setting up are:
*.conf
State the course objective
In your own words, define what that objective entails.
State the method you will use for measuring successful academic/intellectual achievement of this objective.
Follow your method and obtain a measurement. Document the results here.
Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.
“Localhost” refers to the local computer that a program is running on
Remote Host is the host in which you remote into, IE not the actual machine you are on but the remote one where the application or operating system exists.
The home directory is, the directory where the users home resides, essentially the root directory to the user but not really the root.
Is the directory that you are currently working in, and or where you are in relation to the root.
They show up in ls -l without a specific character in the mode field. Called regular files, to distinguish them from special file types.
lab46:~/src/unix$ ls -l total 4 -rw-r--r-- 1 jdavis34 lab46 1 Jan 26 12:14 something
Most common special file. In a directory listing ls -l, they will show up with a d in the beginning.
lab46:~$ ls -l total 8 -rw------- 1 jdavis34 lab46 1100 Oct 15 14:03 #pico29112# lrwxrwxrwx 1 jdavis34 lab46 18 Feb 10 2011 Maildir -> /var/mail/jdavis34 drwxr-xr-x 2 jdavis34 lab46 6 Sep 4 21:21 bin lrwxrwxrwx 1 jdavis34 lab46 28 Aug 30 17:02 data -> /usr/local/etc/data/jdavis34 drwx---r-x 4 jdavis34 lab46 4096 Apr 27 2011 public_html drwxr-xr-x 6 jdavis34 lab46 68 Jan 26 11:07 src drwxr-xr-x 4 jdavis34 lab46 28 Jan 26 09:44 src.bak
Graphical User Interface- programs used by devices in order to provide human interface with the computer. I (I.E. keyboard,screen,mouse,trackball
TAR
Tar is a very commonly used archiving format on Linux systems. The advantage with tar is that it consumes very little time and CPU to compress files, but the compression isn’t very much either. Tar is probably the Linux/UNIX version of zip – quick and dirty.
TAR.GZ
This format is my weapon of choice for most compression. It gives very good compression while not utilizing too much of the CPU while it is compressing the data.
# tar -cvf archive_name.tar directory_to_compress
# tar -xvf archive_name.tar.gz
# gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]
# gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ... ]
familiarity with the structure of UNIX systems
The ability to show that one understands and can demonstrate successfully navigating within a Unix based system via command line.
To do this have several lists of directories to create, including sub directories and files to be placed within these directories, all off the users home directory.
make a few directories off of your user, some inside of others etc etc until you have around like 15 random directories and put some files in some. Once this is done move to a particular directory and from here navigate to other directories without using a absolute path, have some text file displaying without absolute path etc etc.
Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.
What is the use of \n and to what effect does it have if in a simple program designed to print “hello world” if:
1. it exists.
2. it does not.
created a simple program that says “hello world”
1.
#include <stdio.h> void main() { if(printf("Hello World\n")) }
2.
#include <stdio.h> void main() { if(printf("Hello World")) }
Based on what I know the function of /n is, to tell the program next line, I think it either will not compile, or it will not display “hello world” on its own line creating a new line after execution. State your rationale.
As listed in resources I created 2 programs to test one with one without, and plan to run both and record the results.
1.
lab46:~$ cd src lab46:~/src$ gcc -o hello hello.c lab46:~/src$ ./hello Hello, World! lab46:~/src$
2.
lab46:~$ cd src lab46:~/src$ gcc -o hello hello.c lab46:~/src$ ./hello Hello, World!lab46:~/src$
Based on the data collected:
Based on the data collected, It is obvious the use, and results of having /n in program syntax, where as if it does not exist what will happen.
Is It possible to have a domain-less, no active directory server OS that is capable of updating windows client machines, via client redirected to server.
Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.
Based on everything I have read and come accross this is a viable method of deployment and for particular scenarios more recommended. Though a little more complicated in deploying, the ease of use without a central server to have to log into is more applicable to smaller client based enviorments.
State your rationale.
Based on my findings, I plan to do the required aspects of fulfilling desired outcome.
-Edit/create registry entries corresponding with directing windows to the server for updates rather than Microsoft. -Create a valid certificate, allowing for the client to validate itself to the servers SSL.
Currently I am stuck at getting the actual client machine to stop looking for its updates via Microsoft. I have disabled, re-enabled, wuauclt.exe /detectnow. All over required aspects, apparently I missed something so further testing on this is required, but hopefully the desired outcome is true.
Based on the data collected:
Conclusion so far is that this is a valid means of creating a windows update server outside of using active directory, but there is still more work needed.
For a continue up I have successfully got my WSUS server to work. It not only works in the domain environment, but i was able to successfully get clients non-existing in the domain to be redirected to the server for updating. The registry I had made was all correct except for one variable had spaces in the name, which was causing a <NULL> problem. Once that was done all I had to do was figure out what was causing the actual verification errors. I can write and explain it so easily its somewhat embarrassing how much time it took to finish, all I had to do was create a self signing certificate on the server to deploy to end users.
What happens when a “int” is multiplied by a “float” and the output is “float”.
With what I have gathered and from some of the small projects I have yet to submit I have gathered enough to be able to write and perform this on my own.
Based on what I have seen when playing with the two var types I either expect it to return the answer that it should be, or the answer will be effected by the fact the two vars are of not the same type.
State your rationale. 1.5 x 2 = 3 1 x 3 = 3 this case 1.5 = float 2 = int and 3 = float or int, so it should work in that it has the ability to output a decimal number still.
Going to set up a scenario as follows:
#include <stdio.h> float mult ( int x, int y ); main() {
float x; int y; printf( "Please input two numbers to be multiplied: " ); scanf( "%f", &x ); scanf( "%d", &y ); printf( "The product of your two numbers is %f\n", mult( x, y ) ); getchar();
} float mult (float x, int y) {
return x * y;
}
I keep having trouble when placing the code statements before and after this small section, and I can't quite see what is doing it, but experiment one is tied into this one when I do it. I don't think I have a unclosed code tag above?
Well nothing of what I had expected happened.
Based on the data collected: I had got an error of conflicting types for 'mult', and previous declaration of 'mult' was here.
Learning new languages can be annoying when trying to overcome the way we have already been wired to learn.