diff --git a/.gitignore b/.gitignore index 8676367..f678c60 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,45 @@ +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + *.zip ## Ignore Visual Studio temporary files, build results, and diff --git a/SDrive/.bashrc b/SDrive/.bashrc new file mode 100644 index 0000000..7775b58 --- /dev/null +++ b/SDrive/.bashrc @@ -0,0 +1,99 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# don't put duplicate lines in the history. See bash(1) for more options +# don't overwrite GNU Midnight Commander's setting of `ignorespace'. +HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups +# ... or force ignoredups and ignorespace +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +#shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +#shopt -s checkwinsize + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + #alias grep='grep --color=auto' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' +fi + +# some more ls aliases +#alias ll='ls -l' +#alias la='ls -A' +#alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then +# . /etc/bash_completion +#fi diff --git a/SDrive/.gitconfig b/SDrive/.gitconfig new file mode 100644 index 0000000..55c7b39 --- /dev/null +++ b/SDrive/.gitconfig @@ -0,0 +1,8 @@ +[gui] + recentrepo = C:/Users/77260/Documents/Git/Vital Replica Data + recentrepo = C:/Users/77260/Documents/Git/VitalReplica +[user] + email = apaneesar@coleman.edu + name = Amrit Panesar +[merge] + tool = C:\\Users\\77260\\Apps\\KDiff3\\kdiff3.exe diff --git a/SDrive/.profile b/SDrive/.profile new file mode 100644 index 0000000..757ba0a --- /dev/null +++ b/SDrive/.profile @@ -0,0 +1,22 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi diff --git a/SDrive/NOTICE.txt b/SDrive/NOTICE.txt new file mode 100644 index 0000000..30fc7f9 --- /dev/null +++ b/SDrive/NOTICE.txt @@ -0,0 +1,14 @@ +hi there +I see you rading this. +just let me know that you were here +====================================== + +-ASP 08/06/2012 + +-------------------------------------- + +What is jenv.bat you might ask. + +Glad you asked! jenv is my way of launching +a command paromt with the propper java +enviroment variables. \ No newline at end of file diff --git a/SDrive/README.TXT b/SDrive/README.TXT new file mode 100644 index 0000000..259f10e --- /dev/null +++ b/SDrive/README.TXT @@ -0,0 +1,7 @@ +This folder is for storage of projects and resources while in your current course(s). All files and subdirectories will be deleted when you are no longer enrolled at Coleman University. + +Please be prudent with the files you store in this folder as you do not have unlimited space. + +CIS students are allowed 250 MB of storage. + +Faculty have Read-Only access to this folder for grading or instructional purposes. Please double-click on My Computer (if Using Windows XP) or Computer (if using Windows 7) to see other shares that are available to you as a resource for your course. \ No newline at end of file diff --git a/SDrive/Templates/CoverSheet.dotx b/SDrive/Templates/CoverSheet.dotx new file mode 100644 index 0000000..e78b22a Binary files /dev/null and b/SDrive/Templates/CoverSheet.dotx differ diff --git a/SDrive/Templates/FlowChart.vst b/SDrive/Templates/FlowChart.vst new file mode 100644 index 0000000..d3e0bfb Binary files /dev/null and b/SDrive/Templates/FlowChart.vst differ diff --git a/SDrive/Templates/IPO_code_template.dotx b/SDrive/Templates/IPO_code_template.dotx new file mode 100644 index 0000000..bb86014 Binary files /dev/null and b/SDrive/Templates/IPO_code_template.dotx differ diff --git a/SDrive/Vital Replica/Test Plan.docx b/SDrive/Vital Replica/Test Plan.docx new file mode 100644 index 0000000..9f6e81f Binary files /dev/null and b/SDrive/Vital Replica/Test Plan.docx differ diff --git a/SDrive/classwork/mod1/COM120SequenceAlgoPract.docx b/SDrive/classwork/mod1/COM120SequenceAlgoPract.docx new file mode 100644 index 0000000..afa2a39 Binary files /dev/null and b/SDrive/classwork/mod1/COM120SequenceAlgoPract.docx differ diff --git a/SDrive/classwork/mod1/COM120SequenceAlgoPract.xlsx b/SDrive/classwork/mod1/COM120SequenceAlgoPract.xlsx new file mode 100644 index 0000000..89ad658 Binary files /dev/null and b/SDrive/classwork/mod1/COM120SequenceAlgoPract.xlsx differ diff --git a/SDrive/classwork/mod1/Classwork10.java b/SDrive/classwork/mod1/Classwork10.java new file mode 100644 index 0000000..e98a99e --- /dev/null +++ b/SDrive/classwork/mod1/Classwork10.java @@ -0,0 +1,70 @@ +// Amrit Panesar +// 10/01/2012 +// Classwork #10 Page 618 Malik. + +public class Classwork10 +{ + public static void main(String[] args) //main + { + int[][] alpha = new int[10][20]; //a + + for(int[] row : alpha) + { + for (int coloumn : row) + { + coloumn = 5; //b + } + } + + boolean bset = true; + for (int[] row : alpha) + { + for (int coloumn : row) + { + if (bset) + coloumn = 1; //c + else + coloumn = 2; //c + } + bset = false; + } + + int curRow = 0; + int curCol = 1; + alpha[0][0] = 5; + for (int i=1; i<(10*20)-1; i++) + { + if (curCol == 20) + { + curCol = 0; + curRow++; + } + if (curCol == 0) + { + alpha[curRow][curCol] = alpha[curRow-1][19] *2; //d + } + else + { + alpha[curRow][curCol] = alpha[curRow][curCol-1] *2; //d + } + curCol++; + } + + for (int[] row : alpha) + { + for (int coloumn : row) + { + System.out.print(coloumn + ' '); //e + } + System.out.println(); //e + } + + for (int[] row : alpha) + { + for (int coloumn : row) + { + System.out.println(coloumn + ' '); //f + } + } + } +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/DebugFive2.java b/SDrive/classwork/mod1/DebugFive2.java new file mode 100644 index 0000000..c6bc6a7 --- /dev/null +++ b/SDrive/classwork/mod1/DebugFive2.java @@ -0,0 +1,23 @@ +public class DebugFive2 +// Prints odd numbers +// Prints new line after every 10 +{ + public static void main(String[] args) throws InterruptedException + { + int num, count = 0; + for(num = 1; num <= 100; num += 2) + { + System.out.print(" " + num); + ++count; + if(count == 10) + { + count = 0; + System.out.println(); + } + } + + System.out.println("End of odd numbers"); + + } + +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/DebugSeven4.java b/SDrive/classwork/mod1/DebugSeven4.java new file mode 100644 index 0000000..9957701 --- /dev/null +++ b/SDrive/classwork/mod1/DebugSeven4.java @@ -0,0 +1,19 @@ +public class DebugSeven4 +{ + public static void main(String[] args) + { + String aString = "The sly brown fox jumped over the lazy dog"; + + int numLetters = 0; + int stringLength = aString.length(); + + for(int i=0; i < stringLength; i++) + { + char ch = Character.toLowerCase(aString.charAt(i)); + + if(Character.isLetter(ch)) + numLetters++; + } + System.out.println("The number of letters is " + numLetters); + } +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/DebugSix1.java b/SDrive/classwork/mod1/DebugSix1.java new file mode 100644 index 0000000..488eda3 --- /dev/null +++ b/SDrive/classwork/mod1/DebugSix1.java @@ -0,0 +1,18 @@ +public class DebugSix1 +// Start with a penny +// Double it every day +// How much do you have in a month? +{ + public static void main(String[] args) + { + double money = 0.01; + int day = 1; + while(day <= 31) + { + money = 2 * money; + System.out.println("After day " + day + + " you have " + money); + day++; + } + } +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/DebugSix2.java b/SDrive/classwork/mod1/DebugSix2.java new file mode 100644 index 0000000..df4fee8 --- /dev/null +++ b/SDrive/classwork/mod1/DebugSix2.java @@ -0,0 +1,22 @@ +public class DebugSix2 +// Print the character values +// of 65 through 122 +{ + public static void main(String[] args) + { + char letter; + int a = 0; + for(a = 65; a <= 122; a++) + { + letter = (char)a; + System.out.print(" " + letter); + if(a == 85 || a == 105) + System.out.println(); + } + + + System.out.println("\nEnd of program"); + + } + +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/Flowchart Practice.vsd b/SDrive/classwork/mod1/Flowchart Practice.vsd new file mode 100644 index 0000000..39c3a16 Binary files /dev/null and b/SDrive/classwork/mod1/Flowchart Practice.vsd differ diff --git a/SDrive/classwork/mod1/FooTax.java b/SDrive/classwork/mod1/FooTax.java new file mode 100644 index 0000000..ee20039 --- /dev/null +++ b/SDrive/classwork/mod1/FooTax.java @@ -0,0 +1,93 @@ +import javax.swing.*; + +public class FooTax +{ + + public static void main(String[] args) //main + { + String sMarriage = JOptionPane.showInputDialog("Are you (S)ingle, (M)arried, or (H)ead of Houshold"); + char cSel = sMarriage.toLowerCase().charAt(0); + double dStdDeduct = 0.00; + if (cSel == 's') + dStdDeduct = 157.00; + else if (cSel == 'h') + dStdDeduct = 314.00; + else + { + // assume married. + String sWitholding = JOptionPane.showInputDialog("How many depedendant allowances do you claim?\n(Please enter a number)"); + int iWithholdings = Integer.parseInt(sWitholding); + if (iWithholdings < 2) + dStdDeduct = 157.00; + else + dStdDeduct = 314.00; + } + JOptionPane.showMessageDialog(null, + "Your Standard Deduction is: "+dStdDeduct, //message + "Thank You", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + String sExemptions = JOptionPane.showInputDialog("How many exemption allowances do you claim?\n(Please enter a number)"); + int iExemptions = 0; + try + { + iExemptions = Integer.parseInt(sExemptions); + } + catch(Exception e) + { + JOptionPane.showMessageDialog(null, + "Your input was incorrect, please re-run the program", //message + "Fatal Error", //title + JOptionPane.ERROR_MESSAGE//type + ); + return; + } + double dExeDeduct = 0.00; + switch (iExemptions) + { + case 0: + dExeDeduct = 0.00; + break; + case 1: + dExeDeduct = 4.68; + break; + case 2: + dExeDeduct = 9.35; + break; + case 3: + dExeDeduct = 14.03; + break; + case 4: + dExeDeduct = 18.70; + break; + case 5: + dExeDeduct = 23.38; + break; + case 6: + dExeDeduct = 28.05; + break; + case 7: + dExeDeduct = 32.73; + break; + case 8: + dExeDeduct = 37.40; + break; + case 9: + dExeDeduct = 42.08; + break; + case 10: + dExeDeduct = 46.75; + break; + default: + dExeDeduct = (4.68 * iExemptions); + break; + } + JOptionPane.showMessageDialog(null, + "Your exemption allowance is: "+dExeDeduct, //message + "Thank You", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + + } + +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/Foobar.java b/SDrive/classwork/mod1/Foobar.java new file mode 100644 index 0000000..fdc99c6 --- /dev/null +++ b/SDrive/classwork/mod1/Foobar.java @@ -0,0 +1,16 @@ +/*sdgjfalkshdfjkasdhfjkdshaflkjasdhfljksAD*/ + +import java.util.*; + +public class Foobar +{ + public static void main(String[] args) + { + + Calendar calendar = new GregorianCalendar(); + System.out.println(calendar); + System.out.println("HOUR: " + calendar.get(Calendar.HOUR)); + System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE)); + System.out.println("SECOND: " + calendar.get(Calendar.SECOND)); + } +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/IfGuidedExercise.java b/SDrive/classwork/mod1/IfGuidedExercise.java new file mode 100644 index 0000000..f796dd7 --- /dev/null +++ b/SDrive/classwork/mod1/IfGuidedExercise.java @@ -0,0 +1,92 @@ +import javax.swing.*; + +public class IfGuidedExercise +{ + + public static void main(String[] args) //main + { + String sInput = JOptionPane.showInputDialog("Please enter a phrase."); + String input = JOptionPane.showInputDialog("Please enter a whole number."); + int iInt01 = 0; + try + { + iInt01 = Integer.parseInt(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + if (iInt01 == 7) + { + JOptionPane.showMessageDialog(null, + "Thank You for inputting a 7", //message + "Thank You", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + } + if (iInt01 < 0) + { + JOptionPane.showMessageDialog(null, + "Thank You for inputting a negative number", //message + "Thank You", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + } + else + { + JOptionPane.showMessageDialog(null, + "Thank You for inputting a positive number", //message + "Thank You", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + } + if (iInt01 >= 5 && iInt01 <= 10) + { + JOptionPane.showMessageDialog(null, + "Thank You for inputting "+iInt01+", its square is: "+ + Math.pow(iInt01,2), //message + "Thank You", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + } + if (sInput.equals("Green") && iInt01 == 7) + { + JOptionPane.showMessageDialog(null, + "Congradulations on your achievement!", + "A winner is you!", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + } + else + { + JOptionPane.showMessageDialog(null, + "Better luck next time.", + "Failure", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + } + if ((sInput.equals("White") && iInt01 == 10) || + (sInput.equals("Blue") && iInt01 == 11) || + (sInput.equals("Red"))) + { + JOptionPane.showMessageDialog(null, + "Great color choice", + "Fabulous", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + } + else + { + JOptionPane.showMessageDialog(null, + "The color choice and number are not a pair.", + "Not so Fabulous", //title + JOptionPane.INFORMATION_MESSAGE //type + ); + + } + + } + +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/Iterate6897.java b/SDrive/classwork/mod1/Iterate6897.java new file mode 100644 index 0000000..72e853d --- /dev/null +++ b/SDrive/classwork/mod1/Iterate6897.java @@ -0,0 +1,33 @@ +import javax.swing.*; + +public class Iterate6897 +{ + public static void main(String[] args) //main + { + String input = JOptionPane.showInputDialog("Please enter a large number."); + //System.out.println("Input Length = "+input.length()); + String sOut =""; + int i = input.length(); + try + { + Long.parseLong(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "Your input \""+input+"\" was invalid." + , "Fatal Error", JOptionPane.ERROR_MESSAGE); + System.exit(1); + } + + while (i > 0) + { + char cBuf = input.charAt(i-1); + sOut += "" + cBuf; + //System.out.println(i + " - " + cBuf + " - " + sOut); + i--; + } + JOptionPane.showMessageDialog(null, "The digits reversed is: " + +sOut, "Results", JOptionPane.INFORMATION_MESSAGE); + System.exit(0); + } +} diff --git a/SDrive/classwork/mod1/Iterate7986.java b/SDrive/classwork/mod1/Iterate7986.java new file mode 100644 index 0000000..0b9cd3f --- /dev/null +++ b/SDrive/classwork/mod1/Iterate7986.java @@ -0,0 +1,31 @@ +import javax.swing.*; + +public class Iterate7986 +{ + public static void main(String[] args) //main + { + String input = JOptionPane.showInputDialog("Please enter a large number."); + int iInt01 = 0; + String sOut = ""; + try + { + Long.parseLong(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "Your input \""+input+"\" was invalid." + , "Fatal Error", JOptionPane.ERROR_MESSAGE); + System.exit(1); + } + for (int i=0;i<=input.length()-1;i++) + { + char cBuf = input.charAt(i); + sOut += cBuf + " "; + iInt01 += Character.getNumericValue(cBuf); + //System.out.println(cBuf + " - " + iInt01); + } + JOptionPane.showMessageDialog(null, "The summation of the digits is: " + +iInt01 + "\n" + sOut, "Results", JOptionPane.INFORMATION_MESSAGE); + System.exit(0); + } +} diff --git a/SDrive/classwork/mod1/PhoneThing.java b/SDrive/classwork/mod1/PhoneThing.java new file mode 100644 index 0000000..54fbf62 --- /dev/null +++ b/SDrive/classwork/mod1/PhoneThing.java @@ -0,0 +1,158 @@ +/****************************************************************************** + * Class Name: PhoneThing * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/12/2012 * + * Purpose: Takes input from a user in the form of a phone number, * + * validate input, convert from number to letters, allow numbers * + * from input to pass-thru, and ignore any whitespace/special * + * characters from user input. * + ******************************************************************************/ + +import javax.swing.*; + +public class PhoneThing +{ + public static void main(String[] args) //main + { + String sN00="", sN01="", sN02="abc", sN03="def", sN04="ghi", + sN05="jkl", sN06="mno", sN07="pqrs", sN08="tuv", sN09="wxyz"; + boolean quest = false; + while (true) + { + if (quest) + { + int ret = JOptionPane.showConfirmDialog(null, "Do you wish to continue?", + "Question", JOptionPane.YES_NO_OPTION); + if ( ret == JOptionPane.NO_OPTION || ret == JOptionPane.CLOSED_OPTION) + System.exit(0); + } + String input = ""; + try + { + input = JOptionPane.showInputDialog("Please enter a phone number."); + input = input.toLowerCase(); + } + catch (Exception e) + { + System.exit(0); + } + + String sOut =""; + + if (input.length() < 8) + { + JOptionPane.showMessageDialog(null, "The phone number: \"" + +input+"\" was not long enough", + "Error", JOptionPane.ERROR_MESSAGE); + quest = true; + continue; + } + + for (int i=0;i<=input.length()-1;i++) + { + char cBuf = input.charAt(i); + if(Character.isDigit(cBuf)) + { + sOut += cBuf; + continue; + } + for (int j=0;j<=9;j++) + { + switch(j) + { + case 0: + for(int k=0;k<=sN00.length()-1;k++) + { + if(sN00.charAt(k)==cBuf) + sOut += "0"; + } + break; + case 1: + for(int k=0;k<=sN01.length()-1;k++) + { + if(sN01.charAt(k)==cBuf) + sOut += "1"; + } + break; + case 2: + for(int k=0;k<=sN02.length()-1;k++) + { + if(sN02.charAt(k)==cBuf) + sOut += "2"; + } + break; + case 3: + for(int k=0;k<=sN03.length()-1;k++) + { + if(sN03.charAt(k)==cBuf) + sOut += "3"; + } + break; + case 4: + for(int k=0;k<=sN04.length()-1;k++) + { + if(sN04.charAt(k)==cBuf) + sOut += "4"; + } + break; + case 5: + for(int k=0;k<=sN05.length()-1;k++) + { + if(sN05.charAt(k)==cBuf) + sOut += "5"; + } + break; + case 6: + for(int k=0;k<=sN06.length()-1;k++) + { + if(sN06.charAt(k)==cBuf) + sOut += "6"; + } + break; + case 7: + for(int k=0;k<=sN07.length()-1;k++) + { + if(sN07.charAt(k)==cBuf) + sOut += "7"; + } + break; + case 8: + for(int k=0;k<=sN08.length()-1;k++) + { + if(sN08.charAt(k)==cBuf) + sOut += "8"; + } + break; + case 9: + for(int k=0;k<=sN09.length()-1;k++) + { + if(sN09.charAt(k)==cBuf) + sOut += "9"; + } + break; + default: + { + System.out.println("ILLOGICAL!?"); + System.exit(1); + } + } + } + } + String sOutput = ""; + for(int i=0;i<=sOut.length()-1;i++) + { + if (i <= 6) + { + if (i == 3) + { + sOutput += "-"; + } + sOutput += sOut.charAt(i); + } + } + JOptionPane.showMessageDialog(null, "The converted phone number is: " + +sOutput, "Results", JOptionPane.INFORMATION_MESSAGE); + quest = true; + } + } +} diff --git a/SDrive/classwork/mod1/PosNegZed.java b/SDrive/classwork/mod1/PosNegZed.java new file mode 100644 index 0000000..3548b7c --- /dev/null +++ b/SDrive/classwork/mod1/PosNegZed.java @@ -0,0 +1,37 @@ +import javax.swing.*; + +public class PosNegZed +{ + public static void main(String[] args) //main + { + String input = JOptionPane.showInputDialog("Please enter a whole number."); + int iInt01 = 0; + try + { + iInt01 = Integer.parseInt(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + if (iInt01 > 0) + { + JOptionPane.showMessageDialog(null, "\""+input+"\" is positive.", + "Thank You", JOptionPane.INFORMATION_MESSAGE); + } + else if (iInt01 < 0) + { + JOptionPane.showMessageDialog(null, "\""+input+"\" is negative.", + "Thank You", JOptionPane.INFORMATION_MESSAGE); + } + else if (iInt01 == 0) + { + JOptionPane.showMessageDialog(null, "\""+input+"\" is zero.", + "Thank You", JOptionPane.INFORMATION_MESSAGE); + } + System.exit(0); + + } +} \ No newline at end of file diff --git a/SDrive/classwork/mod1/Project CalcExpenses.docx b/SDrive/classwork/mod1/Project CalcExpenses.docx new file mode 100644 index 0000000..ea818c9 Binary files /dev/null and b/SDrive/classwork/mod1/Project CalcExpenses.docx differ diff --git a/SDrive/classwork/mod1/SMAlgorithmP16.docx b/SDrive/classwork/mod1/SMAlgorithmP16.docx new file mode 100644 index 0000000..12bd4ce Binary files /dev/null and b/SDrive/classwork/mod1/SMAlgorithmP16.docx differ diff --git a/SDrive/classwork/mod1/ThreeNonDec.java b/SDrive/classwork/mod1/ThreeNonDec.java new file mode 100644 index 0000000..37856d0 --- /dev/null +++ b/SDrive/classwork/mod1/ThreeNonDec.java @@ -0,0 +1,83 @@ +import javax.swing.*; + +public class ThreeNonDec +{ + public static void main(String[] args) //main + { + String input = JOptionPane.showInputDialog("Please enter a first whole number."); + int iInt01 = 0; + try + { + iInt01 = Integer.parseInt(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + input = JOptionPane.showInputDialog("Please enter a second whole number."); + int iInt02 = 0; + try + { + iInt02 = Integer.parseInt(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + input = JOptionPane.showInputDialog("Please enter a third whole number."); + int iInt03 = 0; + try + { + iInt03 = Integer.parseInt(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + + String output = ""; + if (iInt01 >= iInt02 && iInt02 >= iInt03) + output += "" + iInt03 + ", " + iInt02 + ", " + iInt01; + else if (iInt01 >= iInt02 || iInt02 <= iInt03) + { + if (iInt01 >= iInt03) + output += "" + iInt02 + ", " + iInt03 + ", " + iInt01; + else + output += "" + iInt02 + ", " + iInt01 + ", " + iInt03; + } + else if (iInt01 <= iInt02 || iInt02 >= iInt03) + { + if (iInt02 <= iInt03) + output += "" + iInt02 + ", " + iInt03 + ", " + iInt01; + else + output += "" + iInt02 + ", " + iInt01 + ", " + iInt03; + } + + JOptionPane.showMessageDialog(null, "Your numbers in nondecending order is:\n\""+output+"\"", + "Thank You", JOptionPane.INFORMATION_MESSAGE); + System.exit(0); + } +} + + + + + + + + + + + + + + + + + diff --git a/SDrive/classwork/mod2/asdfghjkl.vsd b/SDrive/classwork/mod2/asdfghjkl.vsd new file mode 100644 index 0000000..c2fbda5 Binary files /dev/null and b/SDrive/classwork/mod2/asdfghjkl.vsd differ diff --git a/SDrive/classwork/mod2/btree/Product.csv b/SDrive/classwork/mod2/btree/Product.csv new file mode 100644 index 0000000..62ded1b --- /dev/null +++ b/SDrive/classwork/mod2/btree/Product.csv @@ -0,0 +1,7 @@ +12,Circular saw ,125 +235,Cooking range ,850 +301,Table saw ,300 +302,Stapler ,49 +303,Lawn Tractor ,650 +400,Pencils (gross) ,29.95 +999,Pens(gross) ,39.95 diff --git a/SDrive/classwork/mod2/btree/build.xml b/SDrive/classwork/mod2/btree/build.xml new file mode 100644 index 0000000..f69f54a --- /dev/null +++ b/SDrive/classwork/mod2/btree/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project btree. + + + diff --git a/SDrive/classwork/mod2/btree/dist/README.TXT b/SDrive/classwork/mod2/btree/dist/README.TXT new file mode 100644 index 0000000..f996d1a --- /dev/null +++ b/SDrive/classwork/mod2/btree/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "btree.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/SDrive/classwork/mod2/btree/manifest.mf b/SDrive/classwork/mod2/btree/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/SDrive/classwork/mod2/btree/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/SDrive/classwork/mod2/btree/nbproject/build-impl.xml b/SDrive/classwork/mod2/btree/nbproject/build-impl.xml new file mode 100644 index 0000000..567f41f --- /dev/null +++ b/SDrive/classwork/mod2/btree/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SDrive/classwork/mod2/btree/nbproject/genfiles.properties b/SDrive/classwork/mod2/btree/nbproject/genfiles.properties new file mode 100644 index 0000000..a42f7eb --- /dev/null +++ b/SDrive/classwork/mod2/btree/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=dd7311e0 +build.xml.script.CRC32=b7790081 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=dd7311e0 +nbproject/build-impl.xml.script.CRC32=0f79c8dc +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/SDrive/classwork/mod2/btree/nbproject/private/private.properties b/SDrive/classwork/mod2/btree/nbproject/private/private.properties new file mode 100644 index 0000000..6b1e058 --- /dev/null +++ b/SDrive/classwork/mod2/btree/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Amrit\\AppData\\Roaming\\NetBeans\\7.2.1\\build.properties diff --git a/SDrive/classwork/mod2/btree/nbproject/private/private.xml b/SDrive/classwork/mod2/btree/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/SDrive/classwork/mod2/btree/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/SDrive/classwork/mod2/btree/nbproject/project.properties b/SDrive/classwork/mod2/btree/nbproject/project.properties new file mode 100644 index 0000000..971c699 --- /dev/null +++ b/SDrive/classwork/mod2/btree/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/btree.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=btree.Btree +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/SDrive/classwork/mod2/btree/nbproject/project.xml b/SDrive/classwork/mod2/btree/nbproject/project.xml new file mode 100644 index 0000000..3355e91 --- /dev/null +++ b/SDrive/classwork/mod2/btree/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + btree + + + + + + + + + diff --git a/SDrive/classwork/mod2/btree/src/btree/Btree.java b/SDrive/classwork/mod2/btree/src/btree/Btree.java new file mode 100644 index 0000000..15a3e79 --- /dev/null +++ b/SDrive/classwork/mod2/btree/src/btree/Btree.java @@ -0,0 +1,120 @@ +/****************************************************************************** + * Project: btree * + * Class Name: Btree * + * Author: Amrit Panesar * + * Created On: Nov 7, 2012 * + * Hours: X.XX Hours * + * Purpose: TODO: Write purpose here. * + ******************************************************************************/ + +package btree; + +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.util.Scanner; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author Amrit Panesar + */ +public class Btree { + + /** + * @param argv the command line ARGument Vector + */ + public static void main(String[] args) { + int argc = args.length; + Scanner inFile = null; + try { + inFile = new Scanner(new FileReader("Product.csv")); + } catch (FileNotFoundException ex) { + Logger.getLogger(Btree.class.getName()).log(Level.SEVERE, null, ex); + System.out.print("File not found, please make product.csv"); + System.exit(0); + } + int count = -999; + int arrfield = 0; + while(inFile.hasNext()) + { + String thisrowstring = inFile.nextLine(); + String[] thisrow = thisrowstring.split(","); + arrfield = thisrow.length; + if (count == -999) { count = 0; } + count++; + } + inFile.close(); + try { + inFile = new Scanner(new FileReader("product.csv")); + } catch (FileNotFoundException ex) { + Logger.getLogger(Btree.class.getName()).log(Level.SEVERE, null, ex); + System.out.print("File not found, please make product.csv"); + System.exit(0); + } + String[][] csv = new String[count][arrfield]; + Product[] p = new Product[count]; + //System.out.println("count = "+count); + //System.out.println("arrfield = "+arrfield); + count = 0; + while(inFile.hasNext()) + { + String thisrowstring = inFile.nextLine(); + String[] thisrow = thisrowstring.split(","); + int i = 0; + for (String t:thisrow) + { + csv[count][i] = t; + i++; + } + p[count] = new Product(csv[count]); + if(count == 0) { + count++; + continue; + } + Product w = p[0]; + while(true) + { + if(w.getiProdNumb() <= p[count].getiProdNumb()) + { + if (w.hasLT()) + { + w = w.getpLT(); + continue; + } + else + { + w.setpLT(p[count]); + break; + } + } + else + { + if (w.hasGT()) + { + w = w.getpGT(); + continue; + } + else + { + w.setpGT(p[count]); + break; + } + } + } + count++; + } + System.out.println("Item\tDescription\tPrice"); + iot(p[0]); + } + public static void iot(Product theRootNode) + { + if (theRootNode != null) { + iot(theRootNode.getpGT()); + System.out.println(theRootNode); + //System.out.println("\t\\- R Sibling -> "+theRootNode.getpGT()); + //System.out.println("\t\\- L Sibling -> "+theRootNode.getpLT()); + iot(theRootNode.getpLT()); + } + } +} diff --git a/SDrive/classwork/mod2/btree/src/btree/Product.csv b/SDrive/classwork/mod2/btree/src/btree/Product.csv new file mode 100644 index 0000000..62ded1b --- /dev/null +++ b/SDrive/classwork/mod2/btree/src/btree/Product.csv @@ -0,0 +1,7 @@ +12,Circular saw ,125 +235,Cooking range ,850 +301,Table saw ,300 +302,Stapler ,49 +303,Lawn Tractor ,650 +400,Pencils (gross) ,29.95 +999,Pens(gross) ,39.95 diff --git a/SDrive/classwork/mod2/btree/src/btree/Product.java b/SDrive/classwork/mod2/btree/src/btree/Product.java new file mode 100644 index 0000000..f479096 --- /dev/null +++ b/SDrive/classwork/mod2/btree/src/btree/Product.java @@ -0,0 +1,118 @@ +/****************************************************************************** + * Project: btree * + * Class Name: Product * + * Author: Amrit Panesar * + * Created On: Nov 7, 2012 * + * Hours: X.XX Hours * + * Purpose: TODO: Write purpose here. * + ******************************************************************************/ + +package btree; + +/** + * + * @author Amrit Panesar + */ +public class Product { + + private int iProdNumb; + private String sDescrpt; + private double dPrice; + private Product pGT = null; + private Product pLT = null; + + public Product(int iProdNumb, String sDescrpt, double dPrice) { + this.iProdNumb = iProdNumb; + this.sDescrpt = sDescrpt; + this.dPrice = dPrice; + } + + public Product(String[] arr) { + if(arr.length == 3) + { + this.iProdNumb = Integer.parseInt(arr[0]); + this.sDescrpt = arr[1]; + this.dPrice = Double.parseDouble(arr[2]); + } + } + + public Product() { + } + + public Product getpGT() { + return pGT; + } + + public void setpGT(Product pGT) { + this.pGT = pGT; + } + + public Product getpLT() { + return pLT; + } + + public void setpLT(Product pLT) { + this.pLT = pLT; + } + + public int getiProdNumb() { + return iProdNumb; + } + + public void setiProdNumb(int iProdNumb) { + this.iProdNumb = iProdNumb; + } + + public String getsDescrpt() { + return sDescrpt; + } + + public void setsDescrpt(String sDescrpt) { + this.sDescrpt = sDescrpt; + } + + public double getdPrice() { + return dPrice; + } + + public void setdPrice(double dPrice) { + this.dPrice = dPrice; + } + + @Override + public String toString() + { + return this.iProdNumb+"\t"+this.sDescrpt+"\t"+this.dPrice; + } + + public boolean hasGT() + { + if(this.pGT != null) { + return true; + } + else { + return false; + } + } + public boolean hasLT() + { + if(this.pLT != null) { + return true; + } + else { + return false; + } + } + + public boolean hasChild() + { + if(this.pGT != null || this.pLT != null) + { + return true; + } + else + { + return false; + } + } +} diff --git a/SDrive/classwork/mod2/linkedlist/Product.csv b/SDrive/classwork/mod2/linkedlist/Product.csv new file mode 100644 index 0000000..62ded1b --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/Product.csv @@ -0,0 +1,7 @@ +12,Circular saw ,125 +235,Cooking range ,850 +301,Table saw ,300 +302,Stapler ,49 +303,Lawn Tractor ,650 +400,Pencils (gross) ,29.95 +999,Pens(gross) ,39.95 diff --git a/SDrive/classwork/mod2/linkedlist/build.xml b/SDrive/classwork/mod2/linkedlist/build.xml new file mode 100644 index 0000000..bed183a --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project linkedlist. + + + diff --git a/SDrive/classwork/mod2/linkedlist/dist/README.TXT b/SDrive/classwork/mod2/linkedlist/dist/README.TXT new file mode 100644 index 0000000..8a69469 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "linkedlist.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/SDrive/classwork/mod2/linkedlist/manifest.mf b/SDrive/classwork/mod2/linkedlist/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/SDrive/classwork/mod2/linkedlist/nbproject/build-impl.xml b/SDrive/classwork/mod2/linkedlist/nbproject/build-impl.xml new file mode 100644 index 0000000..2983982 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/nbproject/build-impl.xml @@ -0,0 +1,1400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SDrive/classwork/mod2/linkedlist/nbproject/genfiles.properties b/SDrive/classwork/mod2/linkedlist/nbproject/genfiles.properties new file mode 100644 index 0000000..e0fc932 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=eb087925 +build.xml.script.CRC32=ad128e81 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=eb087925 +nbproject/build-impl.xml.script.CRC32=48e23c93 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/SDrive/classwork/mod2/linkedlist/nbproject/private/private.properties b/SDrive/classwork/mod2/linkedlist/nbproject/private/private.properties new file mode 100644 index 0000000..6b1e058 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Amrit\\AppData\\Roaming\\NetBeans\\7.2.1\\build.properties diff --git a/SDrive/classwork/mod2/linkedlist/nbproject/private/private.xml b/SDrive/classwork/mod2/linkedlist/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/SDrive/classwork/mod2/linkedlist/nbproject/project.properties b/SDrive/classwork/mod2/linkedlist/nbproject/project.properties new file mode 100644 index 0000000..9983f77 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/nbproject/project.properties @@ -0,0 +1,71 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/linkedlist.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=linkedlist.Linkedlist +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/SDrive/classwork/mod2/linkedlist/nbproject/project.xml b/SDrive/classwork/mod2/linkedlist/nbproject/project.xml new file mode 100644 index 0000000..c2d0700 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + linkedlist + + + + + + + + + diff --git a/SDrive/classwork/mod2/linkedlist/src/linkedlist/Linkedlist.java b/SDrive/classwork/mod2/linkedlist/src/linkedlist/Linkedlist.java new file mode 100644 index 0000000..3db4fed --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/src/linkedlist/Linkedlist.java @@ -0,0 +1,81 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package linkedlist; + +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.util.Scanner; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author Amrit Panesar + */ +public class Linkedlist { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + Scanner inFile = null; + try { + inFile = new Scanner(new FileReader("Product.csv")); + } catch (FileNotFoundException ex) { + Logger.getLogger(Linkedlist.class.getName()).log(Level.SEVERE, null, ex); + System.out.print("File not found, please make product.csv"); + System.exit(0); + } + int count = -999; + int arrfield = 0; + while(inFile.hasNext()) + { + String thisrowstring = inFile.nextLine(); + String[] thisrow = thisrowstring.split(","); + arrfield = thisrow.length; + if (count == -999) { count = 0; } + count++; + } + inFile.close(); + try { + inFile = new Scanner(new FileReader("product.csv")); + } catch (FileNotFoundException ex) { + Logger.getLogger(Linkedlist.class.getName()).log(Level.SEVERE, null, ex); + System.out.print("File not found, please make product.csv"); + System.exit(0); + } + String[][] csv = new String[count][arrfield]; + Product[] p = new Product[count]; + //System.out.println("count = "+count); + //System.out.println("arrfield = "+arrfield); + count = 0; + while(inFile.hasNext()) + { + String thisrowstring = inFile.nextLine(); + String[] thisrow = thisrowstring.split(","); + int i = 0; + for (String t:thisrow) + { + csv[count][i] = t; + i++; + } + p[count] = new Product(csv[count]); + //System.out.println(p[count].sDescrpt); + if (count != 0) { p[count-1].next = p[count]; } + //System.out.println(p[count].next); + count++; + } + System.out.println("Item\tDescription\tPrice"); + Product q = p[0]; + while(q.hasNext()) + { + System.out.println(q); + q=q.next; + if(q.hasNext() == false) { + System.out.println(q); + } + } + } +} diff --git a/SDrive/classwork/mod2/linkedlist/src/linkedlist/Product.java b/SDrive/classwork/mod2/linkedlist/src/linkedlist/Product.java new file mode 100644 index 0000000..1c31335 --- /dev/null +++ b/SDrive/classwork/mod2/linkedlist/src/linkedlist/Product.java @@ -0,0 +1,79 @@ +/****************************************************************************** + * Project: linkedlist * + * Class Name: Product * + * Author: Amrit Panesar * + * Created On: Nov 5, 2012 * + * Hours: X.XX Hours * + * Purpose: TODO: Write purpose here. * + ******************************************************************************/ + +package linkedlist; + +/** + * + * @author Amrit Panesar + */ +public class Product { + public int iProdNumb; + public String sDescrpt; + public double dPrice; + public Product next = null; + + public Product(int iProdNumb, String sDescrpt, double dPrice) { + this.iProdNumb = iProdNumb; + this.sDescrpt = sDescrpt; + this.dPrice = dPrice; + } + + public Product(String[] arr) { + if(arr.length == 3) + { + this.iProdNumb = Integer.parseInt(arr[0]); + this.sDescrpt = arr[1]; + this.dPrice = Double.parseDouble(arr[2]); + } + } + + public Product() { + } + + public int getiProdNumb() { + return iProdNumb; + } + + public void setiProdNumb(int iProdNumb) { + this.iProdNumb = iProdNumb; + } + + public String getsDescrpt() { + return sDescrpt; + } + + public void setsDescrpt(String sDescrpt) { + this.sDescrpt = sDescrpt; + } + + public double getdPrice() { + return dPrice; + } + + public void setdPrice(double dPrice) { + this.dPrice = dPrice; + } + + @Override + public String toString() + { + return this.iProdNumb+"\t"+this.sDescrpt+"\t"+this.dPrice; + } + + public boolean hasNext() + { + if (this.next != null) { + return true; + } + else { + return false; + } + } +} diff --git a/SDrive/classwork/mod4/COM203/GradeBook/GradeBook.sln b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook.sln new file mode 100644 index 0000000..2e142d9 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GradeBook", "GradeBook\GradeBook.vcproj", "{AAD23839-E090-4DDA-A726-ED863081E9F4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AAD23839-E090-4DDA-A726-ED863081E9F4}.Debug|Win32.ActiveCfg = Debug|Win32 + {AAD23839-E090-4DDA-A726-ED863081E9F4}.Debug|Win32.Build.0 = Debug|Win32 + {AAD23839-E090-4DDA-A726-ED863081E9F4}.Release|Win32.ActiveCfg = Release|Win32 + {AAD23839-E090-4DDA-A726-ED863081E9F4}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.cpp b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.cpp new file mode 100644 index 0000000..ae7d829 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.cpp @@ -0,0 +1,16 @@ +#include "GradeBook.h" + +void GradeBook::setcourseName(string cName) +{ + courseName = cName; +} + +string GradeBook::getcourseName() +{ + return courseName; +} + +void GradeBook::displayMessage() +{ + cout << "Hello! Welcome to " << GradeBook::getcourseName() << endl; +} \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.h b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.h new file mode 100644 index 0000000..698c859 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.h @@ -0,0 +1,16 @@ + +#include +#include + +using namespace std; + +class GradeBook +{ + string courseName; + +public: + void setcourseName(string c); + string getcourseName(); + + void displayMessage(); +}; \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.vcproj b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.vcproj new file mode 100644 index 0000000..fd717cb --- /dev/null +++ b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/GradeBook.vcproj @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/main.cpp b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/main.cpp new file mode 100644 index 0000000..aa50912 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/GradeBook/GradeBook/main.cpp @@ -0,0 +1,11 @@ +#include "GradeBook.h" + +int main() +{ + GradeBook gb; + + gb.setcourseName("COM 203"); + gb.displayMessage(); + + return 0; +} \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/Player/Player.sln b/SDrive/classwork/mod4/COM203/Player/Player.sln new file mode 100644 index 0000000..ca987f7 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player/Player.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Player", "Player\Player.vcproj", "{0633F1D0-C0F2-494E-8F28-65407CE093E1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0633F1D0-C0F2-494E-8F28-65407CE093E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {0633F1D0-C0F2-494E-8F28-65407CE093E1}.Debug|Win32.Build.0 = Debug|Win32 + {0633F1D0-C0F2-494E-8F28-65407CE093E1}.Release|Win32.ActiveCfg = Release|Win32 + {0633F1D0-C0F2-494E-8F28-65407CE093E1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/classwork/mod4/COM203/Player/Player/Player.cpp b/SDrive/classwork/mod4/COM203/Player/Player/Player.cpp new file mode 100644 index 0000000..d508367 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player/Player/Player.cpp @@ -0,0 +1,19 @@ +#include "Player.h" + +void Player::setHealth(float fHealth) +{ + health = fHealth; +} +float Player::getHealth() +{ + return health; +} + +void Player::setScore(int iScore) +{ + score = iScore; +} +int Player::getScore() +{ + return score; +} \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/Player/Player/Player.h b/SDrive/classwork/mod4/COM203/Player/Player/Player.h new file mode 100644 index 0000000..6b64662 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player/Player/Player.h @@ -0,0 +1,19 @@ +#include +#include + +using namespace std; + +class Player +{ + int score; + float health; + +public: + void setScore(int iScore); + int getScore(); + + void setHealth(float fHealth); + float getHealth(); + + void display(); +}; \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/Player/Player/Player.vcproj b/SDrive/classwork/mod4/COM203/Player/Player/Player.vcproj new file mode 100644 index 0000000..19a995c --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player/Player/Player.vcproj @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SDrive/classwork/mod4/COM203/Player/Player/main.cpp b/SDrive/classwork/mod4/COM203/Player/Player/main.cpp new file mode 100644 index 0000000..bf6caa9 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player/Player/main.cpp @@ -0,0 +1,11 @@ +#include "Player.h" + +int main() +{ + Player player; + player.setHealth(9999); + player.setScore(9001); + + cout << "Player has " << player.getHealth() << " health and a score of " << player.getScore() << endl; + cin.get(); +} \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/Player_jun03/Player.sln b/SDrive/classwork/mod4/COM203/Player_jun03/Player.sln new file mode 100644 index 0000000..ca987f7 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player_jun03/Player.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Player", "Player\Player.vcproj", "{0633F1D0-C0F2-494E-8F28-65407CE093E1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0633F1D0-C0F2-494E-8F28-65407CE093E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {0633F1D0-C0F2-494E-8F28-65407CE093E1}.Debug|Win32.Build.0 = Debug|Win32 + {0633F1D0-C0F2-494E-8F28-65407CE093E1}.Release|Win32.ActiveCfg = Release|Win32 + {0633F1D0-C0F2-494E-8F28-65407CE093E1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.cpp b/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.cpp new file mode 100644 index 0000000..d48e386 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.cpp @@ -0,0 +1,73 @@ +#include +#include "Player.h" + +Player::Player() +{ + score = 0; + health = 0; + name = ""; +} + +void Player::setHealth(float fHealth) +{ + if (fHealth > 100) + fHealth = 100; + else if (fHealth < 0) + fHealth = 0; + + health = fHealth; +} +float Player::getHealth() +{ + return health; +} + +int Player::getScore() +{ + return score; +} +void Player::setScore(int iScore) +{ + score = iScore; +} + +void Player::setName( string sName ) +{ + name = sName; +} +string Player::getName() +{ + return name; +} + +void Player::display() +{ + cout << "Player has " << getHealth() << " health and a score of " << getScore() << endl; +} + +void Player::run() +{ + cout << "Would you like to play a game?\n:"; + char playG; + cin >> playG; + + while (playG == 'y' || playG == 'Y') + { + int thisScore = 0; + int cScore = 0; + + int wCount = 0; + while (wCount < 5) + { + srand((unsigned int)time(NULL)+rand()%30+rand()%100); + thisScore += rand() % 100 + 1; + wCount++; + } + setScore(thisScore); + + cout << "Player 1: " << getName() << ", your score is: " << getScore() << endl; + + cout << "Would you like to play again?\n:"; + cin >> playG; + } +} \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.h b/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.h new file mode 100644 index 0000000..566547d --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.h @@ -0,0 +1,25 @@ +#include +#include + +using namespace std; + +class Player +{ + int score; + float health; + string name; + +public: + Player(); + void setScore(int iScore); + int getScore(); + + void setHealth(float fHealth); + float getHealth(); + + void setName(string sName); + string getName(); + + void display(); + void run(); +}; \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.vcproj b/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.vcproj new file mode 100644 index 0000000..19a995c --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player_jun03/Player/Player.vcproj @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SDrive/classwork/mod4/COM203/Player_jun03/Player/main.cpp b/SDrive/classwork/mod4/COM203/Player_jun03/Player/main.cpp new file mode 100644 index 0000000..152f1df --- /dev/null +++ b/SDrive/classwork/mod4/COM203/Player_jun03/Player/main.cpp @@ -0,0 +1,10 @@ +#include "Player.h" + +int main() +{ + Player gus; + gus.setName("Gus"); + gus.run(); + + cin.get(); +} \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo.sln b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo.sln new file mode 100644 index 0000000..e5d2335 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StudentInfo", "StudentInfo\StudentInfo.vcproj", "{2BB6D63D-A60F-4162-8F32-136AE500B238}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2BB6D63D-A60F-4162-8F32-136AE500B238}.Debug|Win32.ActiveCfg = Debug|Win32 + {2BB6D63D-A60F-4162-8F32-136AE500B238}.Debug|Win32.Build.0 = Debug|Win32 + {2BB6D63D-A60F-4162-8F32-136AE500B238}.Release|Win32.ActiveCfg = Release|Win32 + {2BB6D63D-A60F-4162-8F32-136AE500B238}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/StudentInfo.h b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/StudentInfo.h new file mode 100644 index 0000000..1b31c55 --- /dev/null +++ b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/StudentInfo.h @@ -0,0 +1,21 @@ +#include +#include + +using namespace std; + +class StudentInfo +{ + string name; + int studId; + float grade; + +public: + void setName(string sName); + string getName(); + + void setStudID(int iId); + int getStudID(); + + void setGrade(float fGrade); + float getGrade(); +}; \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/StudentInfo.vcproj b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/StudentInfo.vcproj new file mode 100644 index 0000000..222d8ab --- /dev/null +++ b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/StudentInfo.vcproj @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/Studentinfo.cpp b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/Studentinfo.cpp new file mode 100644 index 0000000..272766d --- /dev/null +++ b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/Studentinfo.cpp @@ -0,0 +1,28 @@ +#include "StudentInfo.h" + +void StudentInfo::setGrade(float fGrade) +{ + grade = fGrade; +} +float StudentInfo::getGrade() +{ + return grade; +} + +void StudentInfo::setName(std::string sName) +{ + name = sName; +} +string StudentInfo::getName() +{ + return name; +} + +void StudentInfo::setStudID(int iId) +{ + studId = iId; +} +int StudentInfo::getStudID() +{ + return studId; +} \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/main.cpp b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/main.cpp new file mode 100644 index 0000000..4ccd15e --- /dev/null +++ b/SDrive/classwork/mod4/COM203/StudentInfo/StudentInfo/main.cpp @@ -0,0 +1,12 @@ +#include "StudentInfo.h" + +int main() +{ + StudentInfo info; + info.setStudID(77260); + info.setGrade(90); + info.setName("Amrit"); + + cout << "ID: " << info.getStudID() << ", " << info.getName() << " has a score of: " << info.getGrade() << endl; + cin.get(); +} \ No newline at end of file diff --git a/SDrive/classwork/mod4/COM203/TicTacToe.docx b/SDrive/classwork/mod4/COM203/TicTacToe.docx new file mode 100644 index 0000000..c18ec21 Binary files /dev/null and b/SDrive/classwork/mod4/COM203/TicTacToe.docx differ diff --git a/SDrive/commit.bat b/SDrive/commit.bat new file mode 100644 index 0000000..b24ae8c --- /dev/null +++ b/SDrive/commit.bat @@ -0,0 +1,11 @@ +@echo off + +call path.bat + +set ttrn=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2% +set /P cmessage=Enter a commit message for todays changes (%ttrn%): + +hg add +hg commit -m "%cmessage% auto-commit at %ttrn%" + +echo Done! diff --git a/SDrive/e.bat b/SDrive/e.bat new file mode 100644 index 0000000..e373117 --- /dev/null +++ b/SDrive/e.bat @@ -0,0 +1,5 @@ +@echo off +call path.bat +start autolock +start VirtuaWin +RegisterFont add %font%EnvyCodeR.ttf %font%EnvyCodeRBold.ttf %font%EnvyCodeRItalic.ttf %font%Christmas.ttf %font%oldxmas.ttf %font%DREIDL.TTF %font%JandaCelebrationScript.ttf %font%mfiansi.fon %font%mfiapl.fon %font%pcsansi.fon %font%pcsapl.fon %font%pcsgrmrk.fon %font%pcssym5.fon %font%sttansi.fon %font%turansi.fon \ No newline at end of file diff --git a/SDrive/non-programming/COM280 Final Project.docx b/SDrive/non-programming/COM280 Final Project.docx new file mode 100644 index 0000000..d56fb1d Binary files /dev/null and b/SDrive/non-programming/COM280 Final Project.docx differ diff --git a/SDrive/non-programming/Capstone/Analogue Data Logging with Microcontrollers.docx b/SDrive/non-programming/Capstone/Analogue Data Logging with Microcontrollers.docx new file mode 100644 index 0000000..0c22fd0 Binary files /dev/null and b/SDrive/non-programming/Capstone/Analogue Data Logging with Microcontrollers.docx differ diff --git a/SDrive/non-programming/Mod1/Exercise 5/Cover Sheet.docx b/SDrive/non-programming/Mod1/Exercise 5/Cover Sheet.docx new file mode 100644 index 0000000..bd18d30 Binary files /dev/null and b/SDrive/non-programming/Mod1/Exercise 5/Cover Sheet.docx differ diff --git a/SDrive/non-programming/Mod1/Exercise 5/Exercise 5.docx b/SDrive/non-programming/Mod1/Exercise 5/Exercise 5.docx new file mode 100644 index 0000000..f1f8d3f Binary files /dev/null and b/SDrive/non-programming/Mod1/Exercise 5/Exercise 5.docx differ diff --git a/SDrive/non-programming/Mod1/Exercise 5/Exercise 5.vsd b/SDrive/non-programming/Mod1/Exercise 5/Exercise 5.vsd new file mode 100644 index 0000000..4d7b250 Binary files /dev/null and b/SDrive/non-programming/Mod1/Exercise 5/Exercise 5.vsd differ diff --git a/SDrive/non-programming/Mod1/Project 1/Coversheet.docx b/SDrive/non-programming/Mod1/Project 1/Coversheet.docx new file mode 100644 index 0000000..ae5eade Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 1/Coversheet.docx differ diff --git a/SDrive/non-programming/Mod1/Project 1/Flow Chart.vsd b/SDrive/non-programming/Mod1/Project 1/Flow Chart.vsd new file mode 100644 index 0000000..a79bcd4 Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 1/Flow Chart.vsd differ diff --git a/SDrive/non-programming/Mod1/Project 1/IPO.docx b/SDrive/non-programming/Mod1/Project 1/IPO.docx new file mode 100644 index 0000000..9774a84 Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 1/IPO.docx differ diff --git a/SDrive/non-programming/Mod1/Project 2/CoverPage.docx b/SDrive/non-programming/Mod1/Project 2/CoverPage.docx new file mode 100644 index 0000000..0e1d49c Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 2/CoverPage.docx differ diff --git a/SDrive/non-programming/Mod1/Project 2/IPO.docx b/SDrive/non-programming/Mod1/Project 2/IPO.docx new file mode 100644 index 0000000..c36a5e8 Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 2/IPO.docx differ diff --git a/SDrive/non-programming/Mod1/Project 3/Coversheet.docx b/SDrive/non-programming/Mod1/Project 3/Coversheet.docx new file mode 100644 index 0000000..310f6cf Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 3/Coversheet.docx differ diff --git a/SDrive/non-programming/Mod1/Project 3/Project 3.docx b/SDrive/non-programming/Mod1/Project 3/Project 3.docx new file mode 100644 index 0000000..c1fb620 Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 3/Project 3.docx differ diff --git a/SDrive/non-programming/Mod1/Project 3/Project 3.pdf b/SDrive/non-programming/Mod1/Project 3/Project 3.pdf new file mode 100644 index 0000000..1c9a6c5 Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 3/Project 3.pdf differ diff --git a/SDrive/non-programming/Mod1/Project 4/Project 4.docx b/SDrive/non-programming/Mod1/Project 4/Project 4.docx new file mode 100644 index 0000000..af99be5 Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 4/Project 4.docx differ diff --git a/SDrive/non-programming/Mod1/Project 4/coversheet.docx b/SDrive/non-programming/Mod1/Project 4/coversheet.docx new file mode 100644 index 0000000..59fc4d2 Binary files /dev/null and b/SDrive/non-programming/Mod1/Project 4/coversheet.docx differ diff --git a/SDrive/non-programming/Mod1/Template.dotx b/SDrive/non-programming/Mod1/Template.dotx new file mode 100644 index 0000000..d9bdcbe Binary files /dev/null and b/SDrive/non-programming/Mod1/Template.dotx differ diff --git a/SDrive/non-programming/Mod2/Final-ClassDiagram.vsd b/SDrive/non-programming/Mod2/Final-ClassDiagram.vsd new file mode 100644 index 0000000..a68f57a Binary files /dev/null and b/SDrive/non-programming/Mod2/Final-ClassDiagram.vsd differ diff --git a/SDrive/non-programming/Mod2/Final-Scaling.vsd b/SDrive/non-programming/Mod2/Final-Scaling.vsd new file mode 100644 index 0000000..94fa5eb Binary files /dev/null and b/SDrive/non-programming/Mod2/Final-Scaling.vsd differ diff --git a/SDrive/non-programming/Mod2/Final-SelectingTaxi.vsd b/SDrive/non-programming/Mod2/Final-SelectingTaxi.vsd new file mode 100644 index 0000000..cd3f144 Binary files /dev/null and b/SDrive/non-programming/Mod2/Final-SelectingTaxi.vsd differ diff --git a/SDrive/non-programming/Mod2/Final-Statechart.vsd b/SDrive/non-programming/Mod2/Final-Statechart.vsd new file mode 100644 index 0000000..dffa721 Binary files /dev/null and b/SDrive/non-programming/Mod2/Final-Statechart.vsd differ diff --git a/SDrive/non-programming/Mod2/Final-TaxiArrives.vsd b/SDrive/non-programming/Mod2/Final-TaxiArrives.vsd new file mode 100644 index 0000000..50d335d Binary files /dev/null and b/SDrive/non-programming/Mod2/Final-TaxiArrives.vsd differ diff --git a/SDrive/non-programming/Mod2/Final-TaxiLocater.vsd b/SDrive/non-programming/Mod2/Final-TaxiLocater.vsd new file mode 100644 index 0000000..b0f1a81 Binary files /dev/null and b/SDrive/non-programming/Mod2/Final-TaxiLocater.vsd differ diff --git a/SDrive/non-programming/Mod2/Final-TaxiRequest.vsd b/SDrive/non-programming/Mod2/Final-TaxiRequest.vsd new file mode 100644 index 0000000..0a71385 Binary files /dev/null and b/SDrive/non-programming/Mod2/Final-TaxiRequest.vsd differ diff --git a/SDrive/non-programming/Mod2/Project2A.vsdx b/SDrive/non-programming/Mod2/Project2A.vsdx new file mode 100644 index 0000000..b2296f6 Binary files /dev/null and b/SDrive/non-programming/Mod2/Project2A.vsdx differ diff --git a/SDrive/non-programming/Mod2/Project2B.vsdx b/SDrive/non-programming/Mod2/Project2B.vsdx new file mode 100644 index 0000000..35c8b19 Binary files /dev/null and b/SDrive/non-programming/Mod2/Project2B.vsdx differ diff --git a/SDrive/non-programming/Mod2/WebTaxi Introduction.doc b/SDrive/non-programming/Mod2/WebTaxi Introduction.doc new file mode 100644 index 0000000..f1774e0 Binary files /dev/null and b/SDrive/non-programming/Mod2/WebTaxi Introduction.doc differ diff --git a/SDrive/non-programming/Mod2/WebTaxi Project Specification.doc b/SDrive/non-programming/Mod2/WebTaxi Project Specification.doc new file mode 100644 index 0000000..5d65124 Binary files /dev/null and b/SDrive/non-programming/Mod2/WebTaxi Project Specification.doc differ diff --git a/SDrive/non-programming/Mod3/Copy of Projec One - Northwoods University Design.xlsx b/SDrive/non-programming/Mod3/Copy of Projec One - Northwoods University Design.xlsx new file mode 100644 index 0000000..9d319b4 Binary files /dev/null and b/SDrive/non-programming/Mod3/Copy of Projec One - Northwoods University Design.xlsx differ diff --git a/SDrive/non-programming/Mod3/Normalization Classwork.xlsx b/SDrive/non-programming/Mod3/Normalization Classwork.xlsx new file mode 100644 index 0000000..c0cacd9 Binary files /dev/null and b/SDrive/non-programming/Mod3/Normalization Classwork.xlsx differ diff --git a/SDrive/non-programming/Mod3/arkam books.vsd b/SDrive/non-programming/Mod3/arkam books.vsd new file mode 100644 index 0000000..c95038f Binary files /dev/null and b/SDrive/non-programming/Mod3/arkam books.vsd differ diff --git a/SDrive/non-programming/Mod4/COM280 Project 1 Use Case.docx b/SDrive/non-programming/Mod4/COM280 Project 1 Use Case.docx new file mode 100644 index 0000000..c2a0213 Binary files /dev/null and b/SDrive/non-programming/Mod4/COM280 Project 1 Use Case.docx differ diff --git a/SDrive/path.bat b/SDrive/path.bat new file mode 100644 index 0000000..deedadd --- /dev/null +++ b/SDrive/path.bat @@ -0,0 +1,7 @@ +@ECHO OFF +set drive=%cd:~0,3% +set bin=%drive%_bin\ +set font=%bin%_font\ +path = %path%;C:\Program Files\Java\jdk1.6.0_17\bin;%bin%;%bin%\Mercurial\;%bin%\gnuutil;C:\Perl64\bin +echo Done! +net use z: \\172.16.2.49\amrit.panesar$ /user:amrit.panesar * \ No newline at end of file diff --git a/SDrive/programs/Mod1/Hello World/HelloWorld.java b/SDrive/programs/Mod1/Hello World/HelloWorld.java new file mode 100644 index 0000000..74944ce --- /dev/null +++ b/SDrive/programs/Mod1/Hello World/HelloWorld.java @@ -0,0 +1,9 @@ +public class HelloWorld +{ + public static void main (String[] args) + { + System.out.println("Hello World \nThis is my first Java Program."); + System.out.println("The sum of 2 and 3 = " +5); + System.out.println("7 + 8 = " + (7 + 8)); + } +} \ No newline at end of file diff --git a/SDrive/programs/Mod1/Midterm/$12Days.java b/SDrive/programs/Mod1/Midterm/$12Days.java new file mode 100644 index 0000000..350fbb8 --- /dev/null +++ b/SDrive/programs/Mod1/Midterm/$12Days.java @@ -0,0 +1,257 @@ +/****************************************************************************** + * Project: Midterm COM 107 * + * Class Name: $12Days * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/06/2012 * + * Hours: 1.25 Hours * + * Purpose: Creating an application that exhibit adherence to best * + * programming practices. Effective application documentation, * + * Effective use of whitespace for ease in software maintenance, * + * Selection of appropriate data types using meaningful, * + * conventional identifiers, Appropriate use of error handling, * + * Creating simple and complex Boolean expressions to evaluate * + * primitives and strings, Developing a single and dual * + * alternative selection structures and linear selection * + * structures, Using test cases to validate application output. * + * * + ******************************************************************************/ + + import java.util.*; + +public class $12Days +{ + public static void main(String[] args) // main + { + // english words for possessive numbers. + String sDay01 = "first", sDay02 = "second", sDay03 = "third", + sDay04 = "fourth", sDay05 = "fifth", sDay06 = "sixth", + sDay07 = "seventh", sDay08 = "eighth", sDay09 ="nineth", + sDay10 = "tenth", sDay11 = "eleventh", sDay12 = "twelfth"; + + // actual verse. + String sGift01 = "partridge in a pear tree", + sGift02 = "turtle doves", sGift03 = "French hens", + sGift04 = "calling birds", sGift05 = "golden rings", + sGift06 = "geese a-laying", sGift07 = "swans a-swimming", + sGift08 = "maids a-milking", sGift09 = "ladies dancing", + sGift10 = "lords a-leaping", sGift11 = "pipers piping", + sGift12 = "drummers drumming"; + + // first part of verse. + String sNum01 = "And a ", sNum02 = "Two ", sNum03 = "Three ", + sNum04 = "Four ", sNum05 = "Five ", sNum06 = "Six ", + sNum07 = "Seven ", sNum08 = "Eight ", sNum09 = "Nine ", + sNum10 = "Ten ", sNum11 = "Eleven ", sNum12 = "Twelve "; + + //various strings that assisted with my switch structure below below. + String sSoR01 = "On the ", + sSor02 = " day of Christmas,\nmy true love sent to me\n", + sFNum01 = "A ", // special case for the first instance of day 1 + sC = ",\n", // common line break + sP = ".", // last line ending + sE = "!"; // special case for *very* last line (day 12). + + int iDay = 0; // start with an unsupported day, ensures validated input + + Scanner console = new Scanner(System.in); // prompt user for input + System.out.print("What day of Chistmas are we on?\n" + + "Please enter the day number.\n" + + ":"); + + String sInput = console.nextLine(); // Grab string input. + System.out.println(" "); // just for visual appeal. + try + { + iDay = Integer.parseInt(sInput); // see if we can parse an integer + } + catch (NumberFormatException ex) // bad input, not a number + { + System.out.println("We're sorry, \""+sInput+"\" was an invalid day.\n" + + "Please re-run the program."); + System.exit(1); // error out here. bad input. + } + if (iDay <= 0 || iDay > 12) // not a number we support. only days 1-12; + { + System.out.println("We're sorry, \""+sInput+"\" was an invalid day.\n" + + "Please re-run the program."); + System.exit(2); // error out here, bad input, unsupported number. + } + + + //this would be much easier if we knew iteration. + String sOut = ""; // output buffer. + switch (iDay) + { + case 1: + sOut += sSoR01+sDay01+sSor02; + sOut += sFNum01+sGift01+sP; + break; + case 2: + sOut += sSoR01+sDay02+sSor02; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 3: + sOut += sSoR01+sDay03+sSor02; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 4: + sOut += sSoR01+sDay04+sSor02; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 5: + sOut += sSoR01+sDay05+sSor02; + sOut += sNum05+sGift05+sC; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 6: + sOut += sSoR01+sDay06+sSor02; + sOut += sNum06+sGift06+sC; + sOut += sNum05+sGift05+sC; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 7: + sOut += sSoR01+sDay07+sSor02; + sOut += sNum07+sGift07+sC; + sOut += sNum06+sGift06+sC; + sOut += sNum05+sGift05+sC; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 8: + sOut += sSoR01+sDay08+sSor02; + sOut += sNum08+sGift08+sC; + sOut += sNum07+sGift07+sC; + sOut += sNum06+sGift06+sC; + sOut += sNum05+sGift05+sC; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 9: + sOut += sSoR01+sDay09+sSor02; + sOut += sNum09+sGift09+sC; + sOut += sNum08+sGift08+sC; + sOut += sNum07+sGift07+sC; + sOut += sNum06+sGift06+sC; + sOut += sNum05+sGift05+sC; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 10: + sOut += sSoR01+sDay10+sSor02; + sOut += sNum10+sGift10+sC; + sOut += sNum09+sGift09+sC; + sOut += sNum08+sGift08+sC; + sOut += sNum07+sGift07+sC; + sOut += sNum06+sGift06+sC; + sOut += sNum05+sGift05+sC; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 11: + sOut += sSoR01+sDay11+sSor02; + sOut += sNum11+sGift11+sC; + sOut += sNum10+sGift10+sC; + sOut += sNum09+sGift09+sC; + sOut += sNum08+sGift08+sC; + sOut += sNum07+sGift07+sC; + sOut += sNum06+sGift06+sC; + sOut += sNum05+sGift05+sC; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sP; + break; + case 12: + sOut += sSoR01+sDay12+sSor02; + sOut += sNum12+sGift12+sC; + sOut += sNum11+sGift11+sC; + sOut += sNum10+sGift10+sC; + sOut += sNum09+sGift09+sC; + sOut += sNum08+sGift08+sC; + sOut += sNum07+sGift07+sC; + sOut += sNum06+sGift06+sC; + sOut += sNum05+sGift05+sC; + sOut += sNum04+sGift04+sC; + sOut += sNum03+sGift03+sC; + sOut += sNum02+sGift02+sC; + sOut += sNum01+sGift01+sE; + break; + } + System.out.println(sOut); // print buffer. + System.exit(0); // we're done. + } +} + +/*Program Output: + +S:\programs\Mod1\Midterm>java $12Days +What day of Chistmas are we on? +Please enter the day number. +:11 + +On the eleventh day of Christmas, +my true love sent to me +Eleven pipers piping, +Ten lords a-leaping, +Nine ladies dancing, +Eight maids a-milking, +Seven swans a-swimming, +Six geese a-laying, +Five golden rings, +Four calling birds, +Three French hens, +Two turtle doves, +And a partridge in a pear tree. + +S:\programs\Mod1\Midterm>java $12Days +What day of Chistmas are we on? +Please enter the day number. +:2 + +On the second day of Christmas, +my true love sent to me +Two turtle doves, +And a partridge in a pear tree. + +S:\programs\Mod1\Midterm>java $12Days +What day of Chistmas are we on? +Please enter the day number. +:invalid input + +We're sorry, "invalid input" was an invalid day. +Please re-run the program. + +S:\programs\Mod1\Midterm>java $12Days +What day of Chistmas are we on? +Please enter the day number. +:5 + +On the fifth day of Christmas, +my true love sent to me +Five golden rings, +Four calling birds, +Three French hens, +Two turtle doves, +And a partridge in a pear tree. + +*/ diff --git a/SDrive/programs/Mod1/Project1/Numbers.java b/SDrive/programs/Mod1/Project1/Numbers.java new file mode 100644 index 0000000..4260121 --- /dev/null +++ b/SDrive/programs/Mod1/Project1/Numbers.java @@ -0,0 +1,51 @@ +/****************************************************************************** + * Project: Project 1b * + * Class Name: Numbers * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/08/2012 * + * Hours: 0.25 Hours * + * Purpose: To declare variables, constant variables, explore promotions * + * explicit type casting, and display the results of these * + * activities. * + ******************************************************************************/ + +public class Numbers // direction 1 +{ + public static void main(String[] args) // main + { + int iNumberTwo = 765, iNumberThree = (int) 4.75, iNumberFour = 17, iNumberFive = -2; // direction a + b + final int iNumberOne = 3; // as per directon a + c: iNumberOne must be constant + double dRealOne = 54.3, dRealTwo = 85, dRealThree = 67.56, dRealFour = 2, dRealFive = 3.3; // direction d + e + + System.out.println("NumberOne stores " + iNumberOne); //direction f + System.out.println("NumberTwo stores " + iNumberTwo); //f + System.out.println("NumberThree stores " + iNumberThree); //f + System.out.println("NumberFour stores " + iNumberFour); //f + System.out.println("NumberFive stores " + iNumberFive); //f + System.out.println("RealOne stores " + dRealOne); //f + System.out.println("RealTwo stores " + dRealTwo); //f + System.out.println("RealThree stores " + dRealThree); //f + System.out.println("RealFour stores " + dRealFour); //f + System.out.println("RealFive stores " + dRealFive); //f + System.out.println("** Number Three is type casted as an integer"); // direction g + System.out.println("** Real Two is implicitly promoted as a double"); // direction h + } +} + +/* Output: + +E:\programs\Mod1\Project1>java Numbers +NumberOne stores 3 +NumberTwo stores 765 +NumberThree stores 4 +NumberFour stores 17 +NumberFive stores -2 +RealOne stores 54.3 +RealTwo stores 85.0 +RealThree stores 67.56 +RealFour stores 2.0 +RealFive stores 3.3 +** Number Three is type casted as an integer +** Real Two is implicitly promoted as a double + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project1/Precedence.java b/SDrive/programs/Mod1/Project1/Precedence.java new file mode 100644 index 0000000..5820aed --- /dev/null +++ b/SDrive/programs/Mod1/Project1/Precedence.java @@ -0,0 +1,63 @@ +/****************************************************************************** + * Project: Project 1c * + * Class Name: Numbers * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/09/2012 * + * Hours: 0.25 Hours * + * Purpose: To declare variables, constant variables, explore promotions * + * explicit type casting, and display the results of these * + * activities. * + ******************************************************************************/ + + public class Precedence // direction a +{ + public static void main(String[] args) // main + { + int iAmFour = 4, iAmTwo = 2, iAmSeven = 7, iAmFourteen = 14, iAmEightteen = 18, iAmFive = 5, iAmOne = 1, iAmTwentyEight = 28, iAmTwenty = 20, iAmThree = 3; // direction a + double iAmPointTwo = 0.2; // direction a + System.out.println( iAmFour + " + " + iAmSeven + " * " + iAmFour + " = " + (iAmFour+iAmSeven*iAmFour) ); // comp 1 + System.out.println( iAmFour + " / " + iAmTwo + " * " + iAmFourteen + " = " + (iAmFour/iAmTwo*iAmFourteen) ); // comp 2 + System.out.println( iAmEightteen + " / " + iAmTwo + " + " + iAmFourteen + " / " + iAmTwo + " = " + (iAmEightteen/iAmTwo+iAmFourteen/iAmTwo) ); // comp 3 + System.out.println( iAmFour + " + " + iAmTwo + " / " + iAmFour + " - " + iAmTwo + " = " + (iAmFour+iAmTwo/iAmFour-iAmTwo) ); // comp 4 + System.out.println( iAmFive + " % " + iAmTwo + " * " + iAmFour + " / " + iAmOne + " + " + iAmFive + " = " + (iAmFive%iAmTwo*iAmFour/iAmOne+iAmFive) ); // comp 5 + System.out.println( iAmTwentyEight + " / " + iAmFive + " = " + (iAmTwentyEight/iAmFive) ); // comp 6 + System.out.println( iAmTwentyEight + " % " + iAmFive + " = " + (iAmTwentyEight%iAmFive) ); // comp 7 + System.out.println( iAmTwenty + " / ( " + iAmFour + " + " + iAmOne + " ) = " + (iAmTwenty/(iAmFour+iAmOne)) ); // comp 8 + System.out.println( "( " + iAmTwo + " + " + iAmThree + " ) * " + iAmFour + " = " + ((iAmTwo+iAmThree)*iAmFour) ); // comp 9 + System.out.println( "24 / " + iAmPointTwo + " = " + (24/iAmPointTwo) ); // comp 10 + System.out.println( "----------------------------------------------------------------------------------------" ); + System.out.println( "Order of Precedence:" ); // direction c + System.out.println( "1) Parentheses." ); // c + System.out.println( "2) Multiplication, Division, Modulo - Left to Right." ); // c + System.out.println( "3) Addition, Subtraction - Left to Right." ); // c + System.out.println( "4) Assignment - Right to Left." ); // c + System.out.println( "Multiplicative Operators are assosciated from Left to Right" ); // direction d + System.out.println( "Addative Operators are assosciated from Left to Right" ); // d + System.out.println( "Assignment Operators are assosciated from Right to Left" ); // d + } +} + +/* Output: + +E:\programs\Mod1\Project1>java Precedence +4 + 7 * 4 = 32 +4 / 2 * 14 = 28 +18 / 2 + 14 / 2 = 16 +4 + 2 / 4 - 2 = 2 +5 % 2 * 4 / 1 + 5 = 9 +28 / 5 = 5 +28 % 5 = 3 +20 / ( 4 + 1 ) = 4 +( 2 + 3 ) * 4 = 20 +24 / 0.2 = 120.0 +---------------------------------------------------------------------------------------- +Order of Precedence: +1) Parentheses. +2) Multiplication, Division, Modulo - Left to Right. +3) Addition, Subtraction - Left to Right. +4) Assignment - Right to Left. +Multiplicative Operators are assosciated from Left to Right +Addative Operators are assosciated from Left to Right +Assignment Operators are assosciated from Right to Left + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project1/Project1a.java b/SDrive/programs/Mod1/Project1/Project1a.java new file mode 100644 index 0000000..0c6be36 --- /dev/null +++ b/SDrive/programs/Mod1/Project1/Project1a.java @@ -0,0 +1,75 @@ +/********************************************* + * Program: Project 1a * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/07/2012 * + * Hours: 0.20 Hours * + * Purpose: create an application that * + * will display two of the folowing patterns * + * ----------------------------------------- * + * A) a 6 pointed star * + * B) a pine tree shape composed of pound * + * symbols * + * C) your initals using each inital to * + * create a large version of that letter * + *********************************************/ + +public class Project1a // direction I +{ + public static void main(String[] args) // direction I + { + String star = "\t\t\t*\n\n\t\t * * *\n\n\t\t * * * * * *\n\n\t\t * * * * * \n"+ + "\n\t\t * * * * * *\n\n\t\t * * *\n\n\t\t\t*"; // direction A -> This is the star. It is centered. + + String pine = "\t\t\t#\n\n\t\t # #\n\n\t\t # # #\n\n\t\t # # # #\n\n\t\t\t#"; // direction B -> Pine tree like figure. Centered as well + + String init = "\t AAA SSSSS PPPPPP \n\t AAAAA SS PP PP \n\t AA"+ + " AA SSSSS PPPPPP \n\t AAAAAAA SS PP \n\t AA AA SSSSS PP "; // direction c -> ASP. Centered. + + String line = "\n\n--------------------------------------------------------------------------------\n\n"; // Flush. + System.out.print(star); // Print the star + System.out.print(line); // flush + System.out.print(pine); // Print the pine + System.out.print(line); // flush + System.out.print(init); // initals + System.out.print("\n\n"); // don't need another flush. + } +} + +/* Output: + +E:\programs\Mod1\Project1>java Project1a + * + + * * * + + * * * * * * + + * * * * * + + * * * * * * + + * * * + + * + +-------------------------------------------------------------------------------- + + # + + # # + + # # # + + # # # # + + # + +-------------------------------------------------------------------------------- + + AAA SSSSS PPPPPP + AAAAA SS PP PP + AA AA SSSSS PPPPPP + AAAAAAA SS PP + AA AA SSSSS PP + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project1/Strings.java b/SDrive/programs/Mod1/Project1/Strings.java new file mode 100644 index 0000000..12d3921 --- /dev/null +++ b/SDrive/programs/Mod1/Project1/Strings.java @@ -0,0 +1,30 @@ +/****************************************************************************** + * Project: Project 1d * + * Class Name: Strings * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/13/2012 * + * Hours: 0.16 Hours * + * Purpose: To declare variables, initalize, and display two strings * + * Concarenate and display results * + ******************************************************************************/ + + public class Strings // direction 1 +{ + public static void main(String[] args) // main + { + String sStr1 = "String1", sStr2 = "String2", sStr3 = ""; // direction 2 + System.out.println(sStr1 + "\n" + sStr2); + char cH0 = 'H', cE0 = 'E', cL0 = 'L', cL1 = 'L', cO0 = 'O', cSpc = ' ', cW0 = 'W', cO2 = 'O', cR0 ='R', cL3 = 'L', cD0 = 'D', cExlm = '!'; // direction 3 + sStr3 = "" + cH0 + cE0 + cL0 + cL1 + cO0 + cSpc + cW0 + cO2 + cR0 + cL3 + cD0 + cExlm + ""; + System.out.println(sStr3); // direction 3 + } +} + +/* Output: + +E:\programs\Mod1\Project1>java Strings +String1 +String2 +HELLO WORLD! + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project1/redacted/Project1aDub.java b/SDrive/programs/Mod1/Project1/redacted/Project1aDub.java new file mode 100644 index 0000000..2875319 --- /dev/null +++ b/SDrive/programs/Mod1/Project1/redacted/Project1aDub.java @@ -0,0 +1,37 @@ +/********************************************* + * Program: Project 1a * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/08/2012 * + * Hours: 0.30 Hours * + * Purpose: create an application that * + * will display two of the folowing patterns * + * ----------------------------------------- * + * A) a 6 pointed star * + * B) a pine tree shape composed of pound * + * symbols * + * C) your initals using each inital to * + * create a large version of that letter * + *********************************************/ + +public class Project1aDub +{ + public static void main(String[] args) + { + String star = "\t\t\t*\t\t\t*\n\n\t\t * * *\t\t * * *\n\n\t\t * * * * * *\t\t * * * * * *\n\n\t\t"+ + " * * * * * \t\t * * * * * \n\n\t\t * * * * * *\t\t * * * * * *\n\n\t\t * * *\t\t "+ + " * * *\n\n\t\t\t*\t\t\t*"; // This is the star. It is centered. + String pine = "\t\t\t#\t\t\t#\n\n\t\t # #\t\t # #\n\n\t\t # # #\t\t # # #\n\n\t\t # #"+ + " # #\t\t # # # #\n\n\t\t\t#\t\t\t#"; // Pine tree like figure. Centered as well + String init = "\t AAA SSSSS PPPPPP \t AAA SSSSS PPPPPP \n\t AAAAA SS PP PP "+ + "\t AAAAA SS PP PP \n\t AA AA SSSSS PPPPPP \t AA AA SSSSS PPPPPP "+ + "\n\t AAAAAAA SS PP \t AAAAAAA SS PP \n\t AA AA SSSSS PP \t "+ + " AA AA SSSSS PP "; // ASP. Centered. + String line = "\n\n--------------------------------------------------------------------------------\n\n"; // Flush. + System.out.print(star); // Print the star + System.out.print(line); // flush + System.out.print(pine); // Print the pine + System.out.print(line); // flush + System.out.print(init); // initals + System.out.print("\n\n"); // don't need another line. + } +} diff --git a/SDrive/programs/Mod1/Project1/redacted/Project1aDub.txt b/SDrive/programs/Mod1/Project1/redacted/Project1aDub.txt new file mode 100644 index 0000000..feadc6d --- /dev/null +++ b/SDrive/programs/Mod1/Project1/redacted/Project1aDub.txt @@ -0,0 +1,77 @@ +/********************************************* + * Program: Project 1a * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/08/2012 * + * Hours: 0.30 Hours * + * Purpose: create an application that * + * will display two of the folowing patterns * + * ----------------------------------------- * + * A) a 6 pointed star * + * B) a pine tree shape composed of pound * + * symbols * + * C) your initals using each inital to * + * create a large version of that letter * + *********************************************/ + +public class Project1aDub +{ + public static void main(String[] args) + { + String star = "\t\t\t*\t\t\t*\n\n\t\t * * *\t\t * * *\n\n\t\t * * * * * *\t\t * * * * * *\n\n\t\t"+ + " * * * * * \t\t * * * * * \n\n\t\t * * * * * *\t\t * * * * * *\n\n\t\t * * *\t\t "+ + " * * *\n\n\t\t\t*\t\t\t*"; // This is the star. It is centered. + String pine = "\t\t\t#\t\t\t#\n\n\t\t # #\t\t # #\n\n\t\t # # #\t\t # # #\n\n\t\t # #"+ + " # #\t\t # # # #\n\n\t\t\t#\t\t\t#"; // Pine tree like figure. Centered as well + String init = "\t AAA SSSSS PPPPPP \t AAA SSSSS PPPPPP \n\t AAAAA SS PP PP "+ + "\t AAAAA SS PP PP \n\t AA AA SSSSS PPPPPP \t AA AA SSSSS PPPPPP "+ + "\n\t AAAAAAA SS PP \t AAAAAAA SS PP \n\t AA AA SSSSS PP \t "+ + " AA AA SSSSS PP "; // ASP. Centered. + String line = "\n\n--------------------------------------------------------------------------------\n\n"; // Flush. + System.out.print(star); // Print the star + System.out.print(line); // flush + System.out.print(pine); // Print the pine + System.out.print(line); // flush + System.out.print(init); // initals + System.out.print("\n\n"); // don't need another line. + } +} + + +================================================================================================================================= + +S:\programs\Mod1\Project1>java Project1aDub + * * + + * * * * * * + + * * * * * * * * * * * * + + * * * * * * * * * * + + * * * * * * * * * * * * + + * * * * * * + + * * + +-------------------------------------------------------------------------------- + + + # # + + # # # # + + # # # # # # + + # # # # # # # # + + # # + +-------------------------------------------------------------------------------- + + + AAA SSSSS PPPPPP AAA SSSSS PPPPPP + AAAAA SS PP PP AAAAA SS PP PP + AA AA SSSSS PPPPPP AA AA SSSSS PPPPPP + AAAAAAA SS PP AAAAAAA SS PP + AA AA SSSSS PP AA AA SSSSS PP diff --git a/SDrive/programs/Mod1/Project2/Project2a.java b/SDrive/programs/Mod1/Project2/Project2a.java new file mode 100644 index 0000000..374fd5d --- /dev/null +++ b/SDrive/programs/Mod1/Project2/Project2a.java @@ -0,0 +1,80 @@ +/****************************************************************************** + * Project: Project 2a * + * Class Name: Project2a * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/15/2012 * + * Hours: 0.25 Hours * + * Purpose: To demonstrate the ability to create a conventionally named * + * java application, use comments to document the software, * + * use imported software components, instantiante objects, * + * use methods associated with objects of prebuilt classes, * + * use of user friendly prompts, echos, and error messages, * + * use try and catch to prevent hard software crashes. * + ******************************************************************************/ + + import java.util.*; + + public class Project2a +{ + public static void main(String[] args) // main + { + Scanner console = new Scanner(System.in); // direction 1 + /* begin direction 2 */ + int iWholeNum01 = 0; + try + { + System.out.print("Please input a whole number: "); // user friendly prompt + iWholeNum01 = console.nextInt(); // grab user input + System.out.println("Your number was: " + iWholeNum01 +"\n"); // user friendly echo + } + catch (Exception e) + { + System.out.println("\nWe're sorry, this was not a whole number.\n"+ + "Please re-run the program."); // (hopefully) user friendly error massage + return; // end execution here. we want them to wisen up eh. + } + + /* begin direction 3 */ + double dRealNum01 = 0.0; + try + { + System.out.print("Please input a decimal number: "); // user friendly prompt + dRealNum01 = console.nextDouble(); // grab user input + System.out.println("Your number was: " + dRealNum01 +"\n"); // user friendly echo + } + catch (Exception e) + { + System.out.println("\nWe're sorry, this was not a real number.\n"+ + "Please re-run the program."); // (hopefully) user friendly error massage + return; // end execution here. we want them to wisen up eh. + } + + /* begin direction 4 */ + String sFirstName = ""; + System.out.print("Please enter your First name: "); // user friendly prompt + sFirstName = console.next(); // grab user input + System.out.println("Your name is: " + sFirstName); // user friendly echo + + // Done ! + } +} + +/* Output: + +E:\programs\Mod1\Project2>java Project2a +Please input a whole number: 50 +Your number was: 50 + +Please input a decimal number: 25.0 +Your number was: 25.0 + +Please enter your First name: Amrit Panesar +Your name is: Amrit + +E:\programs\Mod1\Project2>java Project2a +Please input a whole number: error + +We're sorry, this was not a whole number. +Please re-run the program. + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project2/Project2bPseudocodeAsNPpp.txt b/SDrive/programs/Mod1/Project2/Project2bPseudocodeAsNPpp.txt new file mode 100644 index 0000000..7a90399 --- /dev/null +++ b/SDrive/programs/Mod1/Project2/Project2bPseudocodeAsNPpp.txt @@ -0,0 +1,28 @@ +PROMPT for input of hours worked +STORE hours worked +CALCULATE gross pay + grossPay = hours * rate +CALCULATE tax + Tax = gross * .14 +CALCULATE net pay + netPay = gross – taxes +CALCULATE clothing expense + clothing = netPay * .10 +CALCULATE school supply expense + supplies = netPay * .01 +CALCULATE remainder + remainder = netPay – clothing – supplies +CALCULATE student savings + studentSavings = remainder * .25 +CALCULATE parental savings + Parental savings = student Savings * .5 +DISPLAY pay rate +DISPLAY hours +DISPLAY gross pay +DISPLAY taxes +DISPLAY net pay +DISPLAY clothing expense +DISPLAY supply expense +DISPLAY student savings +DISPLAY parental savings + diff --git a/SDrive/programs/Mod1/Project2/SummerJob.java b/SDrive/programs/Mod1/Project2/SummerJob.java new file mode 100644 index 0000000..75c0827 --- /dev/null +++ b/SDrive/programs/Mod1/Project2/SummerJob.java @@ -0,0 +1,134 @@ +/****************************************************************************** + * Project: Project 2b * + * Class Name: SummerJob * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/23/2012 * + * Hours: 0.50 Hours * + * Purpose: To calculate the gross and net pay of a hypothetical summer * + * job. The ability to deduct taxes is also demonstrated. * + ******************************************************************************/ + + import java.util.*; + + public class SummerJob +{ + public static void main(String[] args) // main + { + final double HOURLY_WAGE = 15.50;// hourly wage + final double PARENT_RATE = 0.50; // 50 cents per every *whole* dollar made. + final double TAX_RATE = 0.14; // 14% taxes withheld + final double CLOTHING_RATE = 0.10; // 10% for clothing + final double SCHOOL_RATE = 0.01; // 01% for school supplies + final double SAVINGS_RATE = 0.25; // 25% for savings bond purchase + double dHoursWorked = 0.0; + + //PROMPT for input of hours worked + try + { + Scanner console = new Scanner(System.in); + System.out.print("Please enter the ammount of hours worked: "); + //STORE hours worked + dHoursWorked = console.nextDouble(); + } + catch (Exception e) + { + System.out.println("We're sorry, that was an invalid value.\n" + + "Please re-run the program."); + return; + } + //CALCULATE gross pay + //grossPay = hours * rate + double dGrossPay = (dHoursWorked * HOURLY_WAGE); + //CALCULATE tax + //Tax = gross * .14 + double dTaxes = (dGrossPay * TAX_RATE); + //CALCULATE net pay + //netPay = gross – taxes + double dNetPay = (dGrossPay - dTaxes); + //CALCULATE clothing expense + //clothing = netPay * .10 + double dCloExp = (dNetPay * CLOTHING_RATE); + //CALCULATE school supply expense + //supplies = netPay * .01 + double dSchExp = (dNetPay * SCHOOL_RATE); + //CALCULATE remainder + //remainder = netPay – clothing – supplies + double dEODBal = (dNetPay - dCloExp - dSchExp); + //CALCULATE student savings + //studentSavings = remainder * .25 + double dSavBon = (int)(dEODBal * SAVINGS_RATE); + //CALCULATE parental savings + //Parental savings = student Savings * .5 + double dParSav = (dSavBon * PARENT_RATE); + double dGTotal = (dEODBal + dSavBon + dParSav); + + // System.out.format("%.2f", 10.499); + //DISPLAY pay rate + System.out.format("Your pay rate is: $%.2f per hour\n", dHourlyWage); // pay rate + //DISPLAY hours + System.out.format("You worked: %.2f hours\n", dHoursWorked); // hours + //DISPLAY gross pay + System.out.format("Your taxable income is: $%.2f\n", dGrossPay); // gross pay + //DISPLAY taxes + System.out.format("Taxes taken from your paycheck: $%.2f\n",dTaxes); // taxes + //DISPLAY net pay + System.out.format("Earning you a total of: $%.2f\n", dNetPay); // net pay + System.out.format("------------------------------------------------------\n"); + //DISPLAY clothing expense + System.out.format("Your withholdings for clothes expenses are: $%.2f\n", dCloExp); + //DISPLAY supply expense + System.out.format("Your withholdings for school supplies are: $%.2f\n", dSchExp); + //DISPLAY student savings + System.out.format("Your withholdings for a saving bond are: $%.2f\n", dSavBon); + System.out.format("------------------------------------------------------\n"); + //DISPLAY parental savings + System.out.format("Your parental contributions for this month are: $%.2f\n", dParSav); + System.out.format("Giving you a grand total of: %.2f\n", dGTotal); + } +} +/* Output: + E:\programs\Mod1\Project2>java SummerJob + Please enter the ammount of hours worked: 10 + Your pay rate is: $15.50 per hour + You worked: 10.00 hours + Your taxable income is: $155.00 + Taxes taken from your paycheck: $21.70 + Earning you a total of: $133.30 + ------------------------------------------------------ + Your withholdings for clothes expenses are: $13.33 + Your withholdings for school supplies are: $1.33 + Your withholdings for a saving bond are: $29.00 + ------------------------------------------------------ + Your parental contributions for this month are: $14.50 + Giving you a grand total of: 162.14 + + E:\programs\Mod1\Project2>java SummerJob + Please enter the ammount of hours worked: 20 + Your pay rate is: $15.50 per hour + You worked: 20.00 hours + Your taxable income is: $310.00 + Taxes taken from your paycheck: $43.40 + Earning you a total of: $266.60 + ------------------------------------------------------ + Your withholdings for clothes expenses are: $26.66 + Your withholdings for school supplies are: $2.67 + Your withholdings for a saving bond are: $59.00 + ------------------------------------------------------ + Your parental contributions for this month are: $29.50 + Giving you a grand total of: 325.77 + + E:\programs\Mod1\Project2>java SummerJob + Please enter the ammount of hours worked: 40 + Your pay rate is: $15.50 per hour + You worked: 40.00 hours + Your taxable income is: $620.00 + Taxes taken from your paycheck: $86.80 + Earning you a total of: $533.20 + ------------------------------------------------------ + Your withholdings for clothes expenses are: $53.32 + Your withholdings for school supplies are: $5.33 + Your withholdings for a saving bond are: $118.00 + ------------------------------------------------------ + Your parental contributions for this month are: $59.00 + Giving you a grand total of: 651.55 +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project2/SummerJob.xlsx b/SDrive/programs/Mod1/Project2/SummerJob.xlsx new file mode 100644 index 0000000..8132e99 Binary files /dev/null and b/SDrive/programs/Mod1/Project2/SummerJob.xlsx differ diff --git a/SDrive/programs/Mod1/Project2/tempfile.dat b/SDrive/programs/Mod1/Project2/tempfile.dat new file mode 100644 index 0000000..e69de29 diff --git a/SDrive/programs/Mod1/Project3/DecFormat.java b/SDrive/programs/Mod1/Project3/DecFormat.java new file mode 100644 index 0000000..065c52c --- /dev/null +++ b/SDrive/programs/Mod1/Project3/DecFormat.java @@ -0,0 +1,37 @@ +/****************************************************************************** + * Project: Project 3b * + * Class Name: DecFormat * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/20/2012 * + * Hours: 0.25 Hours * + * Purpose: To demonstrate the ability to create a conventionally named * + * java application, the parsing of numeric strings with * + * exception handling, format numeric output using Decimal * + * Format, write to and read from a simple text file, use Decimal* + * Format to format output * + * * + ******************************************************************************/ + +import java.text.DecimalFormat; + +public class DecFormat +{ + public static void main(String[] args) // main + { + DecimalFormat df3Pos = new DecimalFormat("#####,00.000"); //2a + DecimalFormat df5Pos = new DecimalFormat("#######,00.0000"); //2b + + double dLarge01 = 0.1535012260547; + + System.out.println("dLarge01 formatted to 3 places: " + + df3Pos.format(dLarge01)); //2c + + System.out.println("dLarge01 formatted to 5 places: " + + df5Pos.format(dLarge01)); //2c + } +} +/* output: +E:\programs\Mod1\Project3>java DecFormat +dLarge01 formatted to 3 places: 00.154 +dLarge01 formatted to 5 places: 00.1535 + */ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project3/JOptPane.java b/SDrive/programs/Mod1/Project3/JOptPane.java new file mode 100644 index 0000000..a899538 --- /dev/null +++ b/SDrive/programs/Mod1/Project3/JOptPane.java @@ -0,0 +1,54 @@ +/****************************************************************************** + * Project: Project 3c * + * Class Name: JOptPane * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/20/2012 * + * Hours: 0.25 Hours * + * Purpose: To demonstrate the ability to create a conventionally named * + * java application, the parsing of numeric strings with * + * exception handling, format numeric output using Decimal * + * Format, write to and read from a simple text file, use Decimal* + * Format to format output * + * * + ******************************************************************************/ + +import javax.swing.*; //3 + +public class JOptPane //3 +{ + public static void main(String[] args) //main + { + String input = JOptionPane.showInputDialog("Please enter a whole number."); //3a + int iInt01; + try + { + iInt01 = Integer.parseInt(input); //3b + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + //3c + return; + } + JOptionPane.showMessageDialog(null, "Your number was: "+iInt01, + "Success", JOptionPane.INFORMATION_MESSAGE);// 3d + + /*--double time--*/ + input = JOptionPane.showInputDialog("Please enter a decimal number."); //3e + double dReal01; + try + { + dReal01 = Double.parseDouble(input); //3f + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + //3g + return; + } + JOptionPane.showMessageDialog(null, "Your number was: "+dReal01, + "Success", JOptionPane.INFORMATION_MESSAGE);// 3d + } +} \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project3/Project3a.java b/SDrive/programs/Mod1/Project3/Project3a.java new file mode 100644 index 0000000..726c9fa --- /dev/null +++ b/SDrive/programs/Mod1/Project3/Project3a.java @@ -0,0 +1,122 @@ +/****************************************************************************** + * Project: Project 3a * + * Class Name: Project3a * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/20/2012 * + * Hours: 1.00 Hours * + * Purpose: To demonstrate the ability to create a conventionally named * + * java application, the parsing of numeric strings with * + * exception handling, format numeric output using Decimal * + * Format, write to and read from a simple text file, use Decimal* + * Format to format output * + * * + ******************************************************************************/ + +public class Project3a +{ + public static void main(String[] args) // main + { + int iNum01 = 1337; //1a + int iNum02 = 42; //1a + + double dPow = Math.pow(iNum01, iNum02); //1b1 + double dSqrt = Math.sqrt(iNum01); //1b2 + + System.out.println("The first number is: "+iNum01+"."); + System.out.println("The second number is: "+iNum02+"."); + System.out.println(""+iNum01+" raised to the power of "+iNum02+" is: " + + dPow+"."); //1b1 + System.out.println("The square root of "+iNum01+" is: "+dSqrt+".\n");//1b2 + + if (dPow >= dSqrt) //1b3 + { + System.out.println("The first number ("+iNum01+") raised to the " + +"second number ("+iNum02+") \nis greater than the square " + +"root of ("+iNum01+")."); //1b3 + } + else + { + System.out.println("The square root of "+iNum01+" is greater than" + + "the first number("+iNum01+") raised to the second number" + + "("+iNum02+")."); //1b3 + } + System.out.println("\n---------------------------------------------\n"); + + double dRad = 7; //1b4 + double dDia = 7*2; //1b4 + double dArea = Math.PI*(Math.pow(dRad, 2)); //1b4 + + System.out.println("Circle's Radius: "+ dRad + "."); //1b4 + System.out.println("Circle's Diameter: " + dDia + "."); //1b4 + System.out.println("Circle's Area: "+ dArea + "."); //1b4 + + System.out.println("\n---------------------------------------------\n"); + + String sQuote= "Now is the time for all good men to come to the aid of " + + "their country."; //1c + + System.out.println("The ammount of characters in the quote \n" + + "\""+sQuote+"\" \nis: "+sQuote.length()+".\n"); //1c1 + + System.out.println("The same quote in all caps is: \n" + + "\""+sQuote.toUpperCase()+"\"\n"); //1c2 + + System.out.println("The same quote in lower case is: \n" + + "\""+sQuote.toLowerCase()+"\"\n"); //1c3 + + System.out.println("The first index of the character 'o' is: " + + sQuote.indexOf('o')+"\n"); //1c4 + + System.out.println("The next index of the character 'o' is: " + + sQuote.indexOf('o',(sQuote.indexOf('o')+1))+"\n"); //1c5 + + System.out.println("The character present at index 17 is a(n) '" + + sQuote.charAt(17) + "'.\n"); //1c6 + + String sSubstr = sQuote.substring(sQuote.indexOf('t'), + (sQuote.length()-1)); //1c7 + + System.out.println("The substring of the quote from the first instence " + + "of the character 't' \nto the last character, not including " + + "a period is: \n\""+sSubstr+"\""); //1c8 + } +} + +/* output: + E:\programs\Mod1\Project3>java Project3a + The first number is: 1337. + The second number is: 42. + 1337 raised to the power of 42 is: 1.983896928320167E131. + The square root of 1337 is: 36.565010597564445. + + The first number (1337) raised to the second number (42) + is greater than the square root of (1337). + + --------------------------------------------- + + Circle's Radius: 7.0. + Circle's Diameter: 14.0. + Circle's Area: 153.93804002589985. + + --------------------------------------------- + + The ammount of characters in the quote + "Now is the time for all good men to come to the aid of their country." + is: 69. + + The same quote in all caps is: + "NOW IS THE TIME FOR ALL GOOD MEN TO COME TO THE AID OF THEIR COUNTRY." + + The same quote in lower case is: + "now is the time for all good men to come to the aid of their country." + + The first index of the character 'o' is: 1 + + The next index of the character 'o' is: 17 + + The character present at index 17 is a(n) 'o'. + + The substring of the quote from the first instence of the character 't' + to the last character, not including a period is: + "the time for all good men to come to the aid of their country" +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project3/TempCon.java b/SDrive/programs/Mod1/Project3/TempCon.java new file mode 100644 index 0000000..026ae45 --- /dev/null +++ b/SDrive/programs/Mod1/Project3/TempCon.java @@ -0,0 +1,80 @@ +/****************************************************************************** + * Project: Project 3d * + * Class Name: TempCon * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 08/23/2012 * + * Hours: 1.50 Hours * + * Purpose: To demonstrate the ability to create a conventionally named * + * java application, the parsing of numeric strings with * + * exception handling, format numeric output using Decimal * + * Format, write to and read from a simple text file, use Decimal* + * Format to format output * + * * + ******************************************************************************/ + +import javax.swing.*; +import java.io.*; +import java.util.*; + +public class TempCon +{ + public static void main(String[] args) // main + { + String sCity = JOptionPane.showInputDialog("Please enter a city."); //4a + sCity = sCity.toUpperCase();//4b + + String sDate = JOptionPane.showInputDialog("Please enter a date, mm/dd/yyyy."); //4c + + String sTemp = JOptionPane.showInputDialog("Please enter a temperature in Fahrenheit."); //4d + double dTemp = 0; + try + { + dTemp = Double.parseDouble(sTemp); + } + catch (NumberFormatException ex) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+dTemp+"\" was an invalid input" + +"Please re-run the application.", "Fatal Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + double dTempc = (dTemp - 32) * (5.0/9.0); + String sTempc = String.format("%.2f", dTempc); + + PrintWriter outFile = null; + Scanner inFile = null; + try + { + outFile = new PrintWriter("tempfile.dat"); + inFile = new Scanner(new FileReader("tempfile.dat")); + String sOut = "Temperature for: "+sCity+"\non: "+sDate+"\n" + +dTemp+"\u00B0 Fahrenheit\n"+sTempc+"\u00B0 Celsius."; + String sIn = ""; + + outFile.append(sOut); + outFile.flush(); + sIn = inFile.nextLine() + "\n" + inFile.nextLine() + "\n" + + inFile.nextLine() + "\n" + inFile.nextLine(); + + JOptionPane.showMessageDialog(null,sIn, "Temperature for: "+sCity, + JOptionPane.INFORMATION_MESSAGE); + } + catch (FileNotFoundException ex) + { + JOptionPane.showMessageDialog(null, "We're sorry, please make a file named " + +"Tempfile.dat", "Fatal Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + catch (IOException ex) + { + JOptionPane.showMessageDialog(null, "We're sorry, caught an I/o exception " + ,"Fatal Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + finally + { + outFile.close(); + inFile.close(); + } + System.exit(0); + } +} \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project3/tempfile.dat b/SDrive/programs/Mod1/Project3/tempfile.dat new file mode 100644 index 0000000..03e7277 --- /dev/null +++ b/SDrive/programs/Mod1/Project3/tempfile.dat @@ -0,0 +1,4 @@ +Temperature for: EL CAJON +on: 01/10/1990 +-212.0° Fahrenheit +-135.56° Celsius. \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project4/CoverSheet.docx b/SDrive/programs/Mod1/Project4/CoverSheet.docx new file mode 100644 index 0000000..279ccf9 Binary files /dev/null and b/SDrive/programs/Mod1/Project4/CoverSheet.docx differ diff --git a/SDrive/programs/Mod1/Project4/Project4a.docx b/SDrive/programs/Mod1/Project4/Project4a.docx new file mode 100644 index 0000000..3e61051 Binary files /dev/null and b/SDrive/programs/Mod1/Project4/Project4a.docx differ diff --git a/SDrive/programs/Mod1/Project4/Project4a.java b/SDrive/programs/Mod1/Project4/Project4a.java new file mode 100644 index 0000000..ba3c1e1 --- /dev/null +++ b/SDrive/programs/Mod1/Project4/Project4a.java @@ -0,0 +1,60 @@ +/****************************************************************************** + * Project: Project 4a * + * Class Name: Project4a * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/10/2012 * + * Hours: 0.20 Hours * + * Purpose: Evaluate the input of a char representing the taxpayer's * + * filing status and reporting weather the taxpayer will be * + * taxed as a single or married person. * + * * + ******************************************************************************/ + +import java.util.*; + + +public class Project4a +{ + public static void main(String[] args) // main + { + System.out.println("Are you (M)arried (H)ead of Household or " + + "(S)ingle?"); + Scanner console = new Scanner(System.in); + String sInput = console.next(); + char cStatus = sInput.toLowerCase().charAt(0); + + if (cStatus != 'm' && cStatus != 'h' && cStatus != 's') + { + System.out.println("Invalid input \""+cStatus+"\", please re-run the program"); + System.exit(0); + } + if (cStatus != 'm') + System.out.println("You are filing as Single"); + else + System.out.println("You are filing as Married"); + } +} + +/* Output: + +E:\programs\Mod1\Project 4>java Project4a +Are you (M)arried (H)ead of Household or (S)ingle? +m +You are filing as Married + +E:\programs\Mod1\Project 4>java Project4a +Are you (M)arried (H)ead of Household or (S)ingle? +h +You are filing as Single + +E:\programs\Mod1\Project 4>java Project4a +Are you (M)arried (H)ead of Household or (S)ingle? +s +You are filing as Single + +E:\programs\Mod1\Project 4>java Project4a +Are you (M)arried (H)ead of Household or (S)ingle? +4 +Invalid input "4", please re-run the program + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project4/Project4b.docx b/SDrive/programs/Mod1/Project4/Project4b.docx new file mode 100644 index 0000000..24bed0d Binary files /dev/null and b/SDrive/programs/Mod1/Project4/Project4b.docx differ diff --git a/SDrive/programs/Mod1/Project4/Project4b.java b/SDrive/programs/Mod1/Project4/Project4b.java new file mode 100644 index 0000000..5ec3206 --- /dev/null +++ b/SDrive/programs/Mod1/Project4/Project4b.java @@ -0,0 +1,60 @@ +/****************************************************************************** + * Project: Project 4b * + * Class Name: Project4b * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/10/2012 * + * Hours: 0.20 Hours * + * Purpose: Evaluate the input of a char representing the taxpayer's * + * filing status and reporting weather the taxpayer will be * + * taxed as a single or married person. * + * * + ******************************************************************************/ + +import java.util.*; + + +public class Project4b +{ + public static void main(String[] args) // main + { + System.out.println("Are you (M)arried (H)ead of Household (E)xempt " + + "or (S)ingle?"); + Scanner console = new Scanner(System.in); + String sInput = console.next(); + char cStatus = sInput.toLowerCase().charAt(0); + + if (cStatus != 'm' && cStatus != 'h' && cStatus != 's') + { + System.out.println("You have elected for exempt status"); + System.exit(0); + } + if (cStatus == 'm') + System.out.println("You are filing as Married"); + else if (cStatus == 's') + System.out.println("You are filing as Single"); + else if (cStatus == 'h') + System.out.println("You are filing as Head of Household"); + } + +} +/* output: +E:\programs\Mod1\Project4>java Project4b +Are you (M)arried (H)ead of Household (E)xempt or (S)ingle? +m +You are filing as Married + +E:\programs\Mod1\Project4>java Project4b +Are you (M)arried (H)ead of Household (E)xempt or (S)ingle? +head of household +You are filing as Head of Household + +E:\programs\Mod1\Project4>java Project4b +Are you (M)arried (H)ead of Household (E)xempt or (S)ingle? +s +You are filing as Single + +E:\programs\Mod1\Project4>java Project4b +Are you (M)arried (H)ead of Household (E)xempt or (S)ingle? +4 +You have elected for exempt status +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project4/Project4c.docx b/SDrive/programs/Mod1/Project4/Project4c.docx new file mode 100644 index 0000000..49362e2 Binary files /dev/null and b/SDrive/programs/Mod1/Project4/Project4c.docx differ diff --git a/SDrive/programs/Mod1/Project4/Project4c.java b/SDrive/programs/Mod1/Project4/Project4c.java new file mode 100644 index 0000000..53aedc1 --- /dev/null +++ b/SDrive/programs/Mod1/Project4/Project4c.java @@ -0,0 +1,96 @@ +/****************************************************************************** + * Project: Project 4c * + * Class Name: Project4c * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/10/2012 * + * Hours: 0.20 Hours * + * Purpose: Evaluate the input of a char representing the taxpayer's * + * filing status and reporting weather the taxpayer will be * + * taxed as a single or married person. * + * * + ******************************************************************************/ + +import java.util.*; + + +public class Project4c +{ + public static void main(String[] args) // main + { + Scanner console = new Scanner (System.in); + System.out.println("How many withholdings do you have?"); + int iWHold = 0; + String input = console.next(); + try + { + iWHold = Integer.parseInt(input); + } + catch (NumberFormatException nfe) + { + System.out.println("We're sorry, \""+input+"\" was an invalid " + + "input. Please re-run the program."); + System.exit(0); + } + + //input has been sanitized. + int iHVal = 0; + switch (iWHold) + { + case 1: + iHVal = 42; + break; + case 2: + iHVal = 83; + break; + case 3: + iHVal = 125; + break; + case 4: + iHVal = 167; + break; + case 5: + iHVal = 208; + break; + case 6: + iHVal = 250; + break; + case 7: + iHVal = 292; + break; + case 8: + iHVal = 333; + break; + case 9: + iHVal = 375; + break; + case 10: + iHVal = 417; + break; + default: + iHVal = iWHold * 42; + break; + } + System.out.println (iWHold + " withholding allowances provides an " + + "estimated deduction of: $" +iHVal); + + } +} + +/*output: + +E:\programs\Mod1\Project4>java Project4c +How many withholdings do you have? +1 +1 withholding allowances provides an estimated deduction of: $42 + +E:\programs\Mod1\Project4>java Project4c +How many withholdings do you have? +1024 +1024 withholding allowances provides an estimated deduction of: $43008 + +E:\programs\Mod1\Project4>java Project4c +How many withholdings do you have? +5 +5 withholding allowances provides an estimated deduction of: $208 + + */ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project4/Project4d.docx b/SDrive/programs/Mod1/Project4/Project4d.docx new file mode 100644 index 0000000..14fb075 Binary files /dev/null and b/SDrive/programs/Mod1/Project4/Project4d.docx differ diff --git a/SDrive/programs/Mod1/Project4/Project4d.java b/SDrive/programs/Mod1/Project4/Project4d.java new file mode 100644 index 0000000..7eedd61 --- /dev/null +++ b/SDrive/programs/Mod1/Project4/Project4d.java @@ -0,0 +1,129 @@ +/****************************************************************************** + * Project: Project 4d * + * Class Name: Project4d * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/10/2012 * + * Hours: 0.20 Hours * + * Purpose: Evaluate the input of a char representing the taxpayer's * + * filing status and reporting weather the taxpayer will be * + * taxed as a single or married person. * + * * + ******************************************************************************/ + + import java.util.*; + + +public class Project4d +{ + public static void main(String[] args) // main + { + Scanner console = new Scanner (System.in); + System.out.println("What is your gross pay?"); + double dGross = 0; + String input = console.next(); + try + { + dGross = Double.parseDouble(input);k + } + catch (NumberFormatException nfe) + { + System.out.println("We're sorry, \""+input+"\" was an invalid " + + "input. Please re-run the program."); + System.exit(0); + } + System.out.println("How many withholdings do you have?"); + int iWHold = 0; + input = console.next(); + try + { + iWHold = Integer.parseInt(input); + } + catch (NumberFormatException nfe) + { + System.out.println("We're sorry, \""+input+"\" was an invalid " + + "input. Please re-run the program."); + System.exit(0); + } + if (iWHold < 0) + { + System.out.println("We're sorry, \""+input+"\" was an invalid " + + "input. Please re-run the program."); + System.exit(0); + } + System.out.println("Are you (M)arried (H)ead of Household or " + + "(S)ingle?"); + String sInput = console.next(); + char cStatus = sInput.toLowerCase().charAt(0); + if (cStatus != 'm' && cStatus != 'h' && cStatus != 's') + { + System.out.println("We're sorry, \""+cStatus+"\", was an invalid" + + "input. Please re-run the program."); + System.exit(0); + } + boolean bLowInc = false; + if ((cStatus == 's' && dGross <= 522) || + (cStatus == 'm' && dGross <= 522 && iWHold <=1 ) || + (cStatus == 'm' && dGross <= 1044 && iWHold >=2 ) || + (cStatus == 'h' && dGross <= 1044)) + { + bLowInc = true; + } + switch (cStatus) + { + case 's': + System.out.println("You are filing as single."); + break; + case 'm': + System.out.println("You are filing as married."); + break; + case 'h': + System.out.println("You are filing as head of household."); + break; + } + if (bLowInc) + System.out.println("You ARE classified as low income"); + else + System.out.println("You are NOT classified as low income"); + } +} +/* Output +F:\programs\Mod1\Project4>java Project4d +What is your gross pay? +1043 +How many withholdings do you have? +1 +Are you (M)arried (H)ead of Household or (S)ingle? +m +You are filing as married. +You are NOT classified as low income + +F:\programs\Mod1\Project4>java Project4d +What is your gross pay? +1043 +How many withholdings do you have? +1 +Are you (M)arried (H)ead of Household or (S)ingle? +m +You are filing as married. +You are NOT classified as low income + +F:\programs\Mod1\Project4>java Project4d +What is your gross pay? +1044 +How many withholdings do you have? +2 +Are you (M)arried (H)ead of Household or (S)ingle? +m +You are filing as married. +You ARE classified as low income + +F:\programs\Mod1\Project4>java Project4d +What is your gross pay? +1045 +How many withholdings do you have? +3 +Are you (M)arried (H)ead of Household or (S)ingle? +m +You are filing as married. +You are NOT classified as low income + */ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project4/Project4e.docx b/SDrive/programs/Mod1/Project4/Project4e.docx new file mode 100644 index 0000000..7bede39 Binary files /dev/null and b/SDrive/programs/Mod1/Project4/Project4e.docx differ diff --git a/SDrive/programs/Mod1/Project4/Project4e.java b/SDrive/programs/Mod1/Project4/Project4e.java new file mode 100644 index 0000000..b82a7c3 --- /dev/null +++ b/SDrive/programs/Mod1/Project4/Project4e.java @@ -0,0 +1,214 @@ +/****************************************************************************** + * Project: Project 4e * + * Class Name: Project4e * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/10/2012 * + * Hours: 0.20 Hours * + * Purpose: Evaluate the input of a char representing the taxpayer's * + * filing status and reporting weather the taxpayer will be * + * taxed as a single or married person. * + * * + ******************************************************************************/ + + import java.util.*; + + +public class Project4e +{ + public static void main(String[] args) // main + { + Scanner console = new Scanner (System.in); //console + System.out.println("What is your gross pay?"); + double dGross = 0; + String input = console.next(); //grab a string + try + { + dGross = Double.parseDouble(input); // parse it + } + catch (NumberFormatException nfe) // bomb if it doesn't validate + { + System.out.println("We're sorry, \""+input+"\" was an invalid " + + "input. Please re-run the program."); + System.exit(0); + } + if (dGross < 0) + { + System.out.println("We're sorry, \""+input+"\" was an invalid " + + "input. Please re-run the program."); + System.exit(0); + } + System.out.println("Are you (M)arried (H)ead of Household or " + + "(S)ingle?"); + String sInput = console.next(); // grab a string + char cStatus = sInput.toLowerCase().charAt(0); // make it lowercase, grab the first character + if (cStatus != 'm' && cStatus != 'h' && cStatus != 's') //only need to handle these + { + System.out.println("We're sorry, \""+cStatus+"\", was an invalid" + + "input. Please re-run the program."); + System.exit(0); + } + double dBase = 0, dExcess = 0, dPercent = 0; + if (cStatus == 's' || cStatus == 'h' ) { + if (dGross <= 90) + { + dBase = 0.00; + dPercent = 0.00; + dExcess = 0.00; + } + else if (dGross > 90 && dGross <=452) + { + dBase = 0.00; + dPercent = 0.10; + dExcess = 90.00; + } + else if (dGross > 452 && dGross <= 1563) + { + dBase = 36.20; + dPercent = 0.15; + dExcess = 452.00; + } + else if (dGross > 1563 && dGross <= 3658) + { + dBase = 202.85; + dPercent = 0.25; + dExcess = 1563.00; + } + else if (dGross > 3658 && dGross <= 7533) + { + dBase = 276.60; + dPercent = 0.28; + dExcess = 3658.00; + } + else if (dGross > 7533 && dGross <= 16271) + { + dBase = 4695.14; + dPercent = 0.33; + dExcess = 7533.00; + } + else if (dGross > 16271) + { + dBase = 4695.14; + dPercent = 0.35; + dExcess = 16271.00; + } + else + { + System.out.println("Illogical."); + System.exit(0); + } + + } + else if (cStatus == 'm') + { + if (dGross <= 338) + { + dBase = 0.00; + dPercent = 0.00; + dExcess = 0.00; + } + else if (dGross > 338 && dGross <=1063 ) + { + dBase = 0.00; + dPercent = 0.10; + dExcess = 338.00; + } + else if (dGross > 1063 && dGross <= 3283) + { + dBase = 72.50; + dPercent = 0.15; + dExcess = 1063.00; + } + else if (dGross > 3283 && dGross <= 6283) + { + dBase = 405.50; + dPercent = 0.25; + dExcess = 3283.00; + } + else if (dGross > 6283 && dGross <= 9398) + { + dBase = 1155.50; + dPercent = 0.28; + dExcess = 6283.00; + } + else if (dGross > 9398 && dGross <= 16519) + { + dBase = 2027.70; + dPercent = 0.33; + dExcess = 9398.00; + } + else if (dGross > 16519 ) + { + dBase = 4377.63; + dPercent = 0.35; + dExcess = 16519.00; + } + else + { + System.out.println("Illogical."); + System.exit(0); + } + + } + else + { + System.out.println("Illogical."); + System.exit(0); + } + + double dFed = dBase + ((dGross - dExcess) * dPercent); + + switch (cStatus) + { + case 'm': + System.out.println("You are filing as: Married"); + break; + case 's': + System.out.println("You are filing as: Single"); + break; + case 'h': + System.out.println("You are filing as: Head of Household"); + break; + } + System.out.printf("You gross income is: $%.2f\n", dGross); + System.out.printf("Therefore, your base tax is: $%.2f\n", dBase); + System.out.printf("Your tax surcharge percentage is: %%%.2f\n", (dPercent*100)); + // System.out.printf("%s + ((%s - %s) * (%s/100)\n", dBase, dGross, dExcess, (dPercent*100)); // debugging. + System.out.printf("Your withholding tax is: $%.2f\n", dFed); + + } +} + +/* output: +S:\programs\Mod1\Project4>java Project4e +What is your gross pay? +31415 +Are you (M)arried (H)ead of Household or (S)ingle? +s +You are filing as: Single +You gross income is: $31415.00 +Therefore, your base tax is: $4695.14 +Your tax surcharge percentage is: %35.00 +Your withholding tax is: $9995.54 + +S:\programs\Mod1\Project4>java Project4e +What is your gross pay? +1231 +Are you (M)arried (H)ead of Household or (S)ingle? +s +You are filing as: Single +You gross income is: $1231.00 +Therefore, your base tax is: $36.20 +Your tax surcharge percentage is: %15.00 +Your withholding tax is: $153.05 + +S:\programs\Mod1\Project4>java Project4e +What is your gross pay? +555555 +Are you (M)arried (H)ead of Household or (S)ingle? +m +You are filing as: Married +You gross income is: $555555.00 +Therefore, your base tax is: $4377.63 +Your tax surcharge percentage is: %35.00 +Your withholding tax is: $193040.23 + */ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project5/CoverSheet.docx b/SDrive/programs/Mod1/Project5/CoverSheet.docx new file mode 100644 index 0000000..dea6c34 Binary files /dev/null and b/SDrive/programs/Mod1/Project5/CoverSheet.docx differ diff --git a/SDrive/programs/Mod1/Project5/Project5a.java b/SDrive/programs/Mod1/Project5/Project5a.java new file mode 100644 index 0000000..08371b1 --- /dev/null +++ b/SDrive/programs/Mod1/Project5/Project5a.java @@ -0,0 +1,55 @@ +/****************************************************************************** + * Project: Project 5a * + * Class Name: Project5a * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 10/04/2012 * + * Hours: 0.20 Hours * + * Purpose: demonstrate proficiency in using Counted loops, proficiency in* + * using Sentinel controlled loops, proficiency in using Flag * + * controlled loops, proficiency in using EOF controlled loops, * + * proficiency in using Forever loops, providing appropriate * + * documentation for programs, the use of conventional * + * identifiers for classes and variables, the ability to use * + * simple program testing techniques to ensure the quality of * + * their work product, the use of white space for ensuring * + * readability of program code, correct formulation of boolean * + * expressions to be used in the control of iterative structures * + ******************************************************************************/ +import java.util.*; +import java.io.*; + +public class Project5a +{ + public static void main(String[] args) // main + { + String sSent = ""; + Scanner inFile = null; + Scanner console = new Scanner (System.in); //console + String temp = ""; + while (!sSent.equals("!q")) + { + System.out.println("Enter a name, type !q to quit"); + temp = console.nextLine(); + sSent = temp; + System.out.println(temp); + } + } +} + +/* output: + +E:\programs\Mod1\Project5>java Project5a +Enter a name, type !q to quit +Blah +Blah +Enter a name, type !q to quit +hjsdalkf +hjsdalkf +Enter a name, type !q to quit +Neo Anderson +Neo Anderson +Enter a name, type !q to quit +!q +!q + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project5/Project5b.java b/SDrive/programs/Mod1/Project5/Project5b.java new file mode 100644 index 0000000..eddfb35 --- /dev/null +++ b/SDrive/programs/Mod1/Project5/Project5b.java @@ -0,0 +1,117 @@ +/****************************************************************************** + * Project: Project 5b * + * Class Name: Project5b * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 10/04/2012 * + * Hours: 0.20 Hours * + * Purpose: demonstrate proficiency in using Counted loops, proficiency in* + * using Sentinel controlled loops, proficiency in using Flag * + * controlled loops, proficiency in using EOF controlled loops, * + * proficiency in using Forever loops, providing appropriate * + * documentation for programs, the use of conventional * + * identifiers for classes and variables, the ability to use * + * simple program testing techniques to ensure the quality of * + * their work product, the use of white space for ensuring * + * readability of program code, correct formulation of boolean * + * expressions to be used in the control of iterative structures * + ******************************************************************************/ +import java.util.*; +import java.io.*; + +public class Project5b +{ + public static void main(String[] args) // main + { + Scanner inFile = null; + try + { + inFile = new Scanner(new FileReader("payrollData.txt")); + } + catch (Exception e) + { + System.exit(0); + } + for (int i=0;i<5;i++) + { + int iEmployee = inFile.nextInt(); + char cFiling = inFile.next().charAt(0); + int iWHold = inFile.nextInt(); + char cClass = inFile.next().charAt(0); + double dHours = inFile.nextDouble(); + double dPayR = inFile.nextDouble(); + double dSal = inFile.nextDouble(); + double dYTD = inFile.nextDouble(); + String sFOut = ""; + String sCout = ""; + + + if (cFiling == 's') + { + sFOut = "Single"; + } + else if (cFiling == 'h' ) + { + sFOut = "Head of Household"; + } + else if (cFiling == 'm') + { + sFOut = "Married"; + } + else + { + sFOut = "Illogical."; + } + + if (cClass == 'h') + { + sCout = "Hourly"; + } + else if (cClass == 's') + { + sCout = "Salary"; + } + else + { + sCout = "Illigocial."; + } + + String out = "Employee Number: "+ iEmployee + "\t" + + "Filing as: "+ sFOut + "\t" + + "Number of Withholdings: "+iWHold+ "\t"+ + "Pay Type: "+sCout + "\t"; + if (cClass == 'h') + { + out += "Hours Worked: "+ dHours +"\t"+ + "Pay Rate: " + dPayR + "\t"; + + } + else + { + out += "Salary: " + dSal + "\t"; + } + out += "Year To Date: " + dYTD + "\t"; + System.out.println(out); + } + } +} + +/* output: + +E:\programs\Mod1\Project5>java Project5b +Employee Number: 1001 Filing as: Single Number of Withholdings: 11 +Pay Type: Hourly Hours Worked: 40.0 Pay Rate: 15.35 Year To Date: 12 +28.0 +Employee Number: 1002 Filing as: Single Number of Withholdings: 10 +Pay Type: Hourly Hours Worked: 38.0 Pay Rate: 15.0 Year To Date: 57 +0.0 +Employee Number: 1003 Filing as: Single Number of Withholdings: 9 +Pay Type: Hourly Hours Worked: 26.45 Pay Rate: 20.0 Year To Date: 10 +58.0 +Employee Number: 1004 Filing as: Single Number of Withholdings: 8 +Pay Type: Hourly Hours Worked: 20.0 Pay Rate: 39.15 Year To Date: 23 +49.0 +Employee Number: 1005 Filing as: Single Number of Withholdings: 7 +Pay Type: Hourly Hours Worked: 37.15 Pay Rate: 20.0 Year To Date: 14 +86.0 + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project5/Project5c.java b/SDrive/programs/Mod1/Project5/Project5c.java new file mode 100644 index 0000000..367adfb --- /dev/null +++ b/SDrive/programs/Mod1/Project5/Project5c.java @@ -0,0 +1,129 @@ +/****************************************************************************** + * Project: Project 5c * + * Class Name: Project5c * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 10/04/2012 * + * Hours: 0.20 Hours * + * Purpose: demonstrate proficiency in using Counted loops, proficiency in* + * using Sentinel controlled loops, proficiency in using Flag * + * controlled loops, proficiency in using EOF controlled loops, * + * proficiency in using Forever loops, providing appropriate * + * documentation for programs, the use of conventional * + * identifiers for classes and variables, the ability to use * + * simple program testing techniques to ensure the quality of * + * their work product, the use of white space for ensuring * + * readability of program code, correct formulation of boolean * + * expressions to be used in the control of iterative structures * + ******************************************************************************/ +import java.util.*; +import java.io.*; + +public class Project5c +{ + public static void main(String[] args) // main + { + Scanner inFile = null; + try + { + inFile = new Scanner(new FileReader("payrollData.txt")); + } + catch (Exception e) + { + System.exit(0); + } + while(inFile.hasNext()) + { + int iEmployee = inFile.nextInt(); + char cFiling = inFile.next().charAt(0); + int iWHold = inFile.nextInt(); + char cClass = inFile.next().charAt(0); + double dHours = inFile.nextDouble(); + double dPayR = inFile.nextDouble(); + double dSal = inFile.nextDouble(); + double dYTD = inFile.nextDouble(); + String sFOut = ""; + String sCout = ""; + + + if (cFiling == 's') + { + sFOut = "Single"; + } + else if (cFiling == 'h' ) + { + sFOut = "Head of Household"; + } + else if (cFiling == 'm') + { + sFOut = "Married"; + } + else + { + sFOut = "Illogical."; + } + + if (cClass == 'h') + { + sCout = "Hourly"; + } + else if (cClass == 's') + { + sCout = "Salary"; + } + else + { + sCout = "Illigocial."; + } + + String out = "Employee Number: "+ iEmployee + "\t" + + "Filing as: "+ sFOut + "\t" + + "Number of Withholdings: "+iWHold+ "\t"+ + "Pay Type: "+sCout + "\t"; + if (cClass == 'h') + { + out += "Hours Worked: "+ dHours +"\t"+ + "Pay Rate: " + dPayR + "\t"; + + } + else + { + out += "Salary: " + dSal + "\t"; + } + out += "Year To Date: " + dYTD + "\t"; + System.out.println(out); + } + } +} + +/* output: + +E:\programs\Mod1\Project5>java Project5c +Employee Number: 1001 Filing as: Single Number of Withholdings: 11 +Pay Type: Hourly Hours Worked: 40.0 Pay Rate: 15.35 Year To Date: 12 +28.0 +Employee Number: 1002 Filing as: Single Number of Withholdings: 10 +Pay Type: Hourly Hours Worked: 38.0 Pay Rate: 15.0 Year To Date: 57 +0.0 +Employee Number: 1003 Filing as: Single Number of Withholdings: 9 +Pay Type: Hourly Hours Worked: 26.45 Pay Rate: 20.0 Year To Date: 10 +58.0 +Employee Number: 1004 Filing as: Single Number of Withholdings: 8 +Pay Type: Hourly Hours Worked: 20.0 Pay Rate: 39.15 Year To Date: 23 +49.0 +Employee Number: 1005 Filing as: Single Number of Withholdings: 7 +Pay Type: Hourly Hours Worked: 37.15 Pay Rate: 20.0 Year To Date: 14 +86.0 +Employee Number: 1006 Filing as: Single Number of Withholdings: 6 +Pay Type: Hourly Hours Worked: 55.35 Pay Rate: 20.0 Year To Date: 55 +35.0 +Employee Number: 1007 Filing as: Single Number of Withholdings: 5 +Pay Type: Hourly Hours Worked: 53.3 Pay Rate: 20.0 Year To Date: 10 +66.0 +Employee Number: 1008 Filing as: Single Number of Withholdings: 4 +Pay Type: Salary Salary: 1430.0 Year To Date: 14300.0 +Employee Number: 1009 Filing as: Single Number of Withholdings: 3 +Pay Type: Salary Salary: 1389.0 Year To Date: 13890.0 +Employee Number: 1010 Filing as: Single Number of Withholdings: 2 +Pay Type: Salary Salary: 1777.0 Year To Date: 15993.0 + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project5/Project5d.java b/SDrive/programs/Mod1/Project5/Project5d.java new file mode 100644 index 0000000..ad906f1 --- /dev/null +++ b/SDrive/programs/Mod1/Project5/Project5d.java @@ -0,0 +1,78 @@ +/****************************************************************************** + * Project: Project 5d * + * Class Name: Project5d * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 10/04/2012 * + * Hours: 0.20 Hours * + * Purpose: demonstrate proficiency in using Counted loops, proficiency in* + * using Sentinel controlled loops, proficiency in using Flag * + * controlled loops, proficiency in using EOF controlled loops, * + * proficiency in using Forever loops, providing appropriate * + * documentation for programs, the use of conventional * + * identifiers for classes and variables, the ability to use * + * simple program testing techniques to ensure the quality of * + * their work product, the use of white space for ensuring * + * readability of program code, correct formulation of boolean * + * expressions to be used in the control of iterative structures * + ******************************************************************************/ +import java.util.*; +import java.io.*; + + public class Project5d +{ + public static void main(String[] args) // main + { + boolean bSent = true; + Scanner console = new Scanner (System.in); //console + while (bSent) + { + System.out.println("Please enter either 'M', 'H', 'S', or 'E' " + + "to find out more about that filing type, or enter" + + " any other character to quit."); + System.out.print(":"); + switch (console.next().toLowerCase().charAt(0)) + { + case 'm': + System.out.println("Married"); + break; + case 'h': + System.out.println("Head of Household"); + break; + case 's': + System.out.println("Single"); + break; + case 'e': + System.out.println("Exempt"); + break; + default: + bSent = false; + break; + } + } + } +} + +/* output: + +E:\programs\Mod1\Project5>java Project5d +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:m +Married +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:h +Head of Household +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:s +Single +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:e +Exempt +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:q + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project5/Project5e.java b/SDrive/programs/Mod1/Project5/Project5e.java new file mode 100644 index 0000000..cbdead8 --- /dev/null +++ b/SDrive/programs/Mod1/Project5/Project5e.java @@ -0,0 +1,77 @@ +/****************************************************************************** + * Project: Project 5e * + * Class Name: Project5e * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 10/04/2012 * + * Hours: 0.20 Hours * + * Purpose: demonstrate proficiency in using Counted loops, proficiency in* + * using Sentinel controlled loops, proficiency in using Flag * + * controlled loops, proficiency in using EOF controlled loops, * + * proficiency in using Forever loops, providing appropriate * + * documentation for programs, the use of conventional * + * identifiers for classes and variables, the ability to use * + * simple program testing techniques to ensure the quality of * + * their work product, the use of white space for ensuring * + * readability of program code, correct formulation of boolean * + * expressions to be used in the control of iterative structures * + ******************************************************************************/ +import java.util.*; +import java.io.*; + + public class Project5e +{ + public static void main(String[] args) // main + { + Scanner console = new Scanner (System.in); //console + out: + while (true) + { + System.out.println("Please enter either 'M', 'H', 'S', or 'E' " + + "to find out more about that filing type, or enter" + + " any other character to quit."); + System.out.print(":"); + switch (console.next().toLowerCase().charAt(0)) + { + case 'm': + System.out.println("Married"); + break; + case 'h': + System.out.println("Head of Household"); + break; + case 's': + System.out.println("Single"); + break; + case 'e': + System.out.println("Exempt"); + break; + default: + break out; + } + } + } +} + +/*output: + +E:\programs\Mod1\Project5>java Project5e +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:m +Married +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:h +Head of Household +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:s +Single +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:e +Exempt +Please enter either 'M', 'H', 'S', or 'E' to find out more about that filing typ +e, or enter any other character to quit. +:q + +*/ \ No newline at end of file diff --git a/SDrive/programs/Mod1/Project5/payrollData.txt b/SDrive/programs/Mod1/Project5/payrollData.txt new file mode 100644 index 0000000..f1189ff --- /dev/null +++ b/SDrive/programs/Mod1/Project5/payrollData.txt @@ -0,0 +1,10 @@ +1001 s 11 h 40 15.35 0 1228 +1002 s 10 h 38 15 0 570 +1003 s 9 h 26.45 20 0 1058 +1004 s 8 h 20 39.15 0 2349 +1005 s 7 h 37.15 20 0 1486 +1006 s 6 h 55.35 20 0 5535 +1007 s 5 h 53.3 20 0 1066 +1008 s 4 s 0 0 1430 14300 +1009 s 3 s 0 0 1389 13890 +1010 s 2 s 0 0 1777 15993 diff --git a/SDrive/programs/Mod1/Project6/Name.docx b/SDrive/programs/Mod1/Project6/Name.docx new file mode 100644 index 0000000..3a7e70b Binary files /dev/null and b/SDrive/programs/Mod1/Project6/Name.docx differ diff --git a/SDrive/programs/Mod1/Project6/Project6a.java b/SDrive/programs/Mod1/Project6/Project6a.java new file mode 100644 index 0000000..3f8bb07 --- /dev/null +++ b/SDrive/programs/Mod1/Project6/Project6a.java @@ -0,0 +1,37 @@ +/****************************************************************************** + * Project: Project 6a * + * Class Name: Project6a * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/17/2012 * + * Hours: 1.00 Hours * + * Purpose: To do things because Charlie tells us to d * + ******************************************************************************/ + +import javax.swing.*; + +public class Project6a +{ + public static void main(String[] args) //main + { + double dNum1, dNum2; + try + { + input = JOptionPane.showInputDialog("Please enter your first number."); + dNum1 = Double.parseDouble(input); + input = JOptionPane.showInputDialog("Please enter your second number."); + dNum2 = Double.parseDouble(input); + } + add(dNum1,dNum2); + + } + public static void add(double n1, double n2) + { + double result = n1 + n2; + JOptionPane.showMessageDialog(null, + "Adding your two numbers together yields: "+result, + "Results", + JOptionPane.INFORMATION_MESSAGE); + return; + } + +} \ No newline at end of file diff --git a/SDrive/programs/Mod1/debugs/DbL3c.java b/SDrive/programs/Mod1/debugs/DbL3c.java new file mode 100644 index 0000000..9d883bc --- /dev/null +++ b/SDrive/programs/Mod1/debugs/DbL3c.java @@ -0,0 +1,15 @@ +public class DbL3c +// Demonstrates modulus and printing +{ + public static void main(String args[]) + { + double a = 99, b = 8, result; + int c = (long) 7777777777777; + result = a % b; + System.out.println("Divide " + a + " by " + b); + System.out.println("remainder is " + result); + System.out.print("c is a very large number:"); + System.out.println(c); + } + +} \ No newline at end of file diff --git a/SDrive/programs/Mod1/final points/BufferFinalOne.java b/SDrive/programs/Mod1/final points/BufferFinalOne.java new file mode 100644 index 0000000..cab7e5e --- /dev/null +++ b/SDrive/programs/Mod1/final points/BufferFinalOne.java @@ -0,0 +1,65 @@ +import java.io.*; +import java.util.*; + +public class BufferFinalOne +{ + public static int words, lines, pgraf, curWords, curLB, read; + public static BufferedReader infile; + public static PrintWriter outfile; + public static void main(String[] args) throws IOException + { + initalize(); + while (read != -1) + { + while(read != '\u2424') + { + if (read == -1) + break; + char c = (char)read; + if (Character.isWhitespace(c)) + processBlank(c); + else + processText(c); + System.out.print(c+" ("+read+")"); + read = infile.read(); + } + updateCount(); + } + printTotal(); + } + public static void initalize() throws FileNotFoundException, IOException + { + words = 0; lines = 0; pgraf = 0; curWords = 0; curLB=0; + infile = new BufferedReader(new FileReader("inspectFile.dat")); + outfile = new PrintWriter("outfile.txt"); + read = infile.read(); + } + public static void processText(char c) + { + if (curLB!=0) + curLB = 0; + outfile.append(c); + } + public static void processBlank(char c) + { + if (curLB!=0) + curLB = 0; + outfile.append(c); + curWords++; + } + public static void updateCount() + { + if (curLB == 1) + pgraf++; + words += curWords; + curWords = 0; + lines++; + } + public static void printTotal() throws IOException + { + System.out.print("words: "+words+" number of lines: "+lines+" paragraphs: "+pgraf); + infile.close(); + outfile.close(); + } + +} diff --git a/SDrive/programs/Mod1/final points/inspectFile.dat b/SDrive/programs/Mod1/final points/inspectFile.dat new file mode 100644 index 0000000..c44d294 --- /dev/null +++ b/SDrive/programs/Mod1/final points/inspectFile.dat @@ -0,0 +1,5 @@ +This is the first line of the first paragraph \n +Second line in the paragraph\n + +This is the second paragraph \n + diff --git a/SDrive/programs/Mod1/final points/outfile.txt b/SDrive/programs/Mod1/final points/outfile.txt new file mode 100644 index 0000000..c44d294 --- /dev/null +++ b/SDrive/programs/Mod1/final points/outfile.txt @@ -0,0 +1,5 @@ +This is the first line of the first paragraph \n +Second line in the paragraph\n + +This is the second paragraph \n + diff --git a/SDrive/programs/Mod1/midterm points/point1.java b/SDrive/programs/Mod1/midterm points/point1.java new file mode 100644 index 0000000..2255b7b --- /dev/null +++ b/SDrive/programs/Mod1/midterm points/point1.java @@ -0,0 +1,102 @@ +/****************************************************************************** + * Project: Point 1 * + * Class Name: point1 * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/05/2012 * + * Hours: 0.50 Hours * + * Purpose: Blah. * + ******************************************************************************/ + +import javax.swing.*; + +public class point1 +{ + public static void main(String[] args) //main + { + String sMessage01 = "This application will accept the input of the " + + "lengths of the sides of a triangle and determine if it is a right triangle.\n" + + "A triangle is a polygon with 3 sides and three angles.\n" + + "A triangle is considered right if one of the angles is 90 degrees."; + String sMessage02 = "This program will determine weather or not a triangle is right."; + + JOptionPane.showMessageDialog(null, sMessage01, "Welcome", + JOptionPane.PLAIN_MESSAGE); + JOptionPane.showMessageDialog(null, sMessage02, "Welcome", + JOptionPane.PLAIN_MESSAGE); + String input = JOptionPane.showInputDialog("Please enter a side length."); + double dSide01 = 0; + try + { + dSide01 = Double.parseDouble(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + if (dSide01 < 0) + { + JOptionPane.showMessageDialog(null, "We're sorry, you cannot have a " + + "negative side length.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + input = JOptionPane.showInputDialog("Please enter a side length."); + double dSide02 = 0; + try + { + dSide02 = Double.parseDouble(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + if (dSide02 < 0) + { + JOptionPane.showMessageDialog(null, "We're sorry, you cannot have a " + + "negative side length.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + input = JOptionPane.showInputDialog("Please enter a side length."); + double dSide03 = 0; + try + { + dSide03 = Double.parseDouble(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + if (dSide03 < 0) + { + JOptionPane.showMessageDialog(null, "We're sorry, you cannot have a " + + "negative side length.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + // big ugly boolean. + // IF (intFirstSide * intFirstSide == intSecondSide * intSecondSide + intThirdSide * intThirdSide) || + // (intSecondSide * intSecondSide == intFirstSide * intFirstSide + intThirdSide * intThirdSide)|| + // (intThirdSide * intThirdSide == intFirstSide * intFirstSide + intSecondSide * intSecondSide) + + dSide01 = Math.pow(dSide01, 2); + dSide02 = Math.pow(dSide02, 2); + dSide03 = Math.pow(dSide03, 2); + if ((dSide01 == (dSide02 + dSide03)) || + (dSide02 == (dSide01 + dSide03)) || + (dSide03 == (dSide01 + dSide02))) + { + JOptionPane.showMessageDialog(null, "This is a right triangle.", + "Thank You", JOptionPane.INFORMATION_MESSAGE); + } + else + { + JOptionPane.showMessageDialog(null, "This is NOT a right triangle.", + "Thank You", JOptionPane.INFORMATION_MESSAGE); + } + System.exit(0); + } +} \ No newline at end of file diff --git a/SDrive/programs/Mod1/midterm points/point2.java b/SDrive/programs/Mod1/midterm points/point2.java new file mode 100644 index 0000000..07a789c --- /dev/null +++ b/SDrive/programs/Mod1/midterm points/point2.java @@ -0,0 +1,80 @@ +/****************************************************************************** + * Project: Point 2 * + * Class Name: point2 * + * Author: Amrit Panesar -ASP ,o/ * + * Last Edited: 09/05/2012 * + * Hours: 0.50 Hours * + * Purpose: Blah. * + ******************************************************************************/ + +import javax.swing.*; + +public class point2 +{ + public static void main(String[] args) //main + { + String sMessage01 = "This application will accept the input of the " + + "ammount of cookies the user has to organize into boxes and containers.\n" + + "A box contains 24 cookies.\n" + + "A container contains 75 boxes."; + String sMessage02 = "This program will output the ammount of boxes, containers, and the underflow."; + JOptionPane.showMessageDialog(null, sMessage01, "Welcome", + JOptionPane.PLAIN_MESSAGE); + JOptionPane.showMessageDialog(null, sMessage02, "Welcome", + JOptionPane.PLAIN_MESSAGE); + String input = JOptionPane.showInputDialog("Please enter the ammount of cookies."); + double dSide01 = 0; + try + { + dSide01 = Double.parseDouble(input); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was" + + " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + if (dSide01 < 0) + { + JOptionPane.showMessageDialog(null, "We're sorry, you cannot have a " + + "negative ammount of cookies.", "Error", JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + + String sOutMessage = ""; + Double dBoxes = dSide01 %24; + Double dContainers = dBoxes %75; + + int iContainers = (int) Math.floor(dContainers); + if (dContainers > iContainers) + iContainers++; + + int iBoxes = (int) Math.floor(dBoxes); + if (dBoxes > iBoxes) + iBoxes++; + + int iFullContainer = (int) Math.floor(dContainers); + int iFullBoxes = iFullContainer * 75; + int iLeftOverBoxes = iBoxes - iFullBoxes; + int iLeftOverCookies = iLeftOverBoxes * 24; + boolean bUnderFlow = false; + + sOutMessage += "You have a total of %d boxes with %d containers.\n"; + if (iContainers > dContainers) + { + sOutMessage += "The last container is not full.\n"; + bUnderFlow = true; + } + + if(bUnderFlow) + { + sOutMessage += "You have %d boxes in the last container, with %d cookies."; + System.out.format(sOutMessage, iBoxes, iContainers, iLeftOverBoxes, iLeftOverCookies); + } + else + { + System.out.format(sOutMessage, iBoxes, iContainers); + } + + } +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman.sln b/SDrive/programs/Mod11/Com203/Hangman/Hangman.sln new file mode 100644 index 0000000..e0f1106 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hangman", "Hangman\Hangman.vcxproj", "{7310FC30-2591-4B40-9580-33268702093E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7310FC30-2591-4B40-9580-33268702093E}.Debug|Win32.ActiveCfg = Debug|Win32 + {7310FC30-2591-4B40-9580-33268702093E}.Debug|Win32.Build.0 = Debug|Win32 + {7310FC30-2591-4B40-9580-33268702093E}.Release|Win32.ActiveCfg = Release|Win32 + {7310FC30-2591-4B40-9580-33268702093E}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.cpp b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.cpp new file mode 100644 index 0000000..b286506 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.cpp @@ -0,0 +1,458 @@ +#include "stdhangman.h" + +Hangman::Hangman() +{ + attempts = 0; + wordLength = 0; + secretWord = ""; + wordList = vector(); + adminList = vector(); + //readdmins(); + readFromFile(); + blankguesses(); + doseed(); +} + +void Hangman::blankguesses() +{ + attempts = 0; + string alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + for (unsigned int i = 0; i < alpha.length(); i++) + { + alphabet[i] = alpha[i]; + } +} + +void Hangman::displayMenu() +{ + while (true) + { + cls(); + fflush(stdout); + centerline("Main Menu",1); + centerline("==========================",2); + centerline("1. Game Administration",3); + centerline("2. Begin a game",4); + centerline("3. Exit",5); + centerline("==========================",6); + cursorpos(1,7); + cout << "Please make a selection" << endl << ":"; + char input; + input = _getch(); + cout << input; + switch (input) + { + case '1': + while(doadmin()); + break; + case '2': + while(playGame()); + break; + case '3': + break; + default: + writeline("Please make a valid selection [1-3]"); + writeline(2); + } + if ( input == '3' ) + { + break; + } + } +} + +bool Hangman::playGame() +{ + chooseword(); + blankguesses(); + while (attempts <= 6) + { + while(!handleinput()); + if (revealedword == secretWord) + { + break; + } + } + cls(); + if (attempts >= 6) + { + centerline("Hangman - Loss", 1); + centerline(secretWord, 4); + centerline("Sorry! You loose this round", 8); + } + else + { + centerline("Hangman - Winner", 1); + centerline(secretWord, 4); + centerline("Congratulations! You guessed correctly",8); + } + writeline(2); + + char input; + while (true) + { + cout << "Play again?" << endl << "[Y/n]"; + input = _getch(); + cout << input; + if (toupper(input) == 'Y') + { + return true; + } + else if (toupper(input) == 'N') + { + return false; + } + else + { + cout << "Please enter either Yes or No" << endl; + } + } + return true; +} + +bool Hangman::notguessed(char inguess) +{ + for (int j = 0; j < 26; j++) + { + if (alphabet[j] == inguess) + { + alphabet[j] = ' '; + return true; + } + } + return false; +} + +bool Hangman::doadmin() +{ + cls(); + centerline("Hangman - Administration",1); + centerline("Hangman Administrator Login",4); + cursorpos(1,10); + cout << "Please enter your password" << endl << ":"; + return false; +} + +bool Hangman::isinword(char inguess) +{ + string secret = getSecretWord(); + for (unsigned int i = 0; i < secret.length(); i++) + { + if (secret[i] == toupper(inguess)) + { + return true; + } + } + return false; +} + +void Hangman::drawletters() +{ + for (int i = 0; i < 26; i++) + { + if (i == 0) + { + cursorpos (4,6); + } + if (i == 8) + { + cursorpos (4,8); + } + if (i == 16) + { + cursorpos (4,10); + } + if ( i == 24 ) + { + cursorpos(4, 12); + } + cout << alphabet[i] << " "; + } + cursorpos(4, 18); + cout << revealedword; +} + +bool Hangman::handleinput() +{ + cls(); // clear screen + drawseperator(); // do the separator thing + centerline("Hangman",1); // screen title + drawhangman(); + drawletters(); + fflush(stdout); + cursorpos(0, 20); + writeline("Please enter a letter"); + cout << ":"; + char input; + input = _getch(); + input = toupper(input); + cout << input; + if (isalpha(input) && notguessed(input)) + { + if (isinword(input)) + { + revealchar(input); + } + else + { + attempts++; + } + return true; + } + else + { + cout << input << " is an invalid input, please try again"; + pause(); + return false; + } +} + +void Hangman::revealchar(char input) +{ + string secret = getSecretWord(); + for (unsigned int i = 0; i < secret.length(); i++) + { + if (secret[i] == input) + { + revealedword[i] = secret[i]; + } + } +} + +void Hangman::readFromFile() +{ +/* + hangword holdword; + ifstream hangmanfile ("wordlist.bin", ios::in|ios::binary|ios::ate); + if (hangmanfile.is_open()) + { + while(!hangmanfile.eof()) + { + holdword.Read(hangmanfile); + wordList.push_back(holdword); + } + } + else + { + cout << "Unable to open wordlist.bin for reading. Trying to create it.." << endl; +*/ + initFile(); +// } +} + +void Hangman::initFile() +{ + hangword holdword; + ifstream hangwordtxt ("hangmanwordlist.txt", ios::in); + int id = 1; + if (hangwordtxt.is_open()) + { + while (!hangwordtxt.eof()) + { + string word = ""; + getline(hangwordtxt,word); + for (unsigned int j = 0; j < word.length(); j++) + { + word[j] = toupper(word[j]); + } + holdword.setword(word); + holdword.setid(id); + wordList.push_back(holdword); + id++; + } + } + else + { + cout << "Error unable to open hangmanwordlist.txt for reading" << endl; + pause(); + } + hangwordtxt.close(); + if (wordList.size() != 0) + { + ofstream hangmanbin ("wordlist.bin", ios::out|ios::binary|ios::app); + if (hangmanbin.is_open()) + { + for (unsigned int i = 0; i < wordList.size(); i++) + { + wordList[i].Write(hangmanbin); + } + } + else + { + cout << "Error unable to open wordlist.bin for writing" << endl; + pause(); + } + } + else + { + cout << "No words in the wordlist. Not creating file." << endl; + pause(); + } +} + +void Hangman::chooseword() +{ + if (wordList.size() == 0) + { + hangword hang; + hang.setid(0); + hang.setword("TEST"); + wordList.push_back(hang); + } + int wordindex = rand()%wordList.size(); + setSecretWord(wordList[wordindex].getword()); + string rev = string(getSecretWord().length(),'_'); + revealedword = rev; +} + +void Hangman::drawhangman() +{ + cursorpos(55, 10); + switch (attempts) + { + case 0: + cout <<" ___ " << endl; + cursorpos(55, 11); + cout <<" | |" << endl; + cursorpos(55, 12); + cout <<" |" << endl; + cursorpos(55, 13); + cout <<" |" << endl; + cursorpos(55, 14); + cout <<" |" << endl; + cursorpos(55, 15); + cout <<" |" << endl; + break; + case 1: + cout <<" ___ " << endl; + cursorpos(55, 11); + cout <<" | |" << endl; + cursorpos(55, 12); + cout <<" @ |" << endl; + cursorpos(55, 13); + cout <<" |" << endl; + cursorpos(55, 14); + cout <<" |" << endl; + cursorpos(55, 15); + cout <<" |" << endl; + break; + case 2: + cout <<" ___ " << endl; + cursorpos(55, 11); + cout <<" | |" << endl; + cursorpos(55, 12); + cout <<" @ |" << endl; + cursorpos(55, 13); + cout <<" | |" << endl; + cursorpos(55, 14); + cout <<" |" << endl; + cursorpos(55, 15); + cout <<" |" << endl; + break; + case 3: + cout <<" ___ " << endl; + cursorpos(55, 11); + cout <<" | |" << endl; + cursorpos(55, 12); + cout <<" @ |" << endl; + cursorpos(55, 13); + cout <<" /| |" << endl; + cursorpos(55, 14); + cout <<" |" << endl; + cursorpos(55, 15); + cout <<" |" << endl; + break; + case 4: + cout <<" ___ " << endl; + cursorpos(55, 11); + cout <<" | |" << endl; + cursorpos(55, 12); + cout <<" @ |" << endl; + cursorpos(55, 13); + cout <<" /|\\ |" << endl; + cursorpos(55, 14); + cout <<" |" << endl; + cursorpos(55, 15); + cout <<" |" << endl; + break; + case 5: + cout <<" ___ " << endl; + cursorpos(55, 11); + cout <<" | |" << endl; + cursorpos(55, 12); + cout <<" @ |" << endl; + cursorpos(55, 13); + cout <<" /|\\ |" << endl; + cursorpos(55, 14); + cout <<" | |" << endl; + cursorpos(55, 15); + cout <<" |" << endl; + break; + case 6: + cout <<" ___ " << endl; + cursorpos(55, 11); + cout <<" | |" << endl; + cursorpos(55, 12); + cout <<" @ |" << endl; + cursorpos(55, 13); + cout <<" /|\\ |" << endl; + cursorpos(55, 14); + cout <<" | |" << endl; + cursorpos(55, 15); + cout <<" / |" << endl; + break; + case 7: + cout <<" ___ " << endl; + cursorpos(55, 11); + cout <<" | |" << endl; + cursorpos(55, 12); + cout <<" @ |" << endl; + cursorpos(55, 13); + cout <<" /|\\ |" << endl; + cursorpos(55, 14); + cout <<" | |" << endl; + cursorpos(55, 15); + cout <<" / \\ |" << endl; + break; + } + cursorpos(55, 16); + cout <<" ________|________" << endl; + cursorpos(55, 17); + cout <<" / | /|" << endl; + cursorpos(55, 18); + cout <<"/________________/ /" << endl; + cursorpos(55, 19); + cout <<"|________________|/" << endl; +} + +void Hangman::setSecretWord(string word) +{ + secretWord = word; +} +string Hangman::getSecretWord() +{ + return secretWord; +} + +void Hangman::setWordLength(int length) +{ + wordLength = length; +} +int Hangman::getWordLength() +{ + return wordLength; +} + +/*********************************** + ___ + | | + @ | + /|\ | + | | + / \ | + ________|________ + / | /| +/________________/ / +|________________|/ + +************************************/ \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.h b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.h new file mode 100644 index 0000000..95d4dd2 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.h @@ -0,0 +1,42 @@ +#pragma once + +#include "stdhangman.h" + +class Hangman +{ +private: + int attempts; + vector wordList; + vector adminList; + string secretWord; + string revealedword; + int wordLength; + char alphabet[26]; + bool emessage; + string message; +public: + Hangman(); + bool playGame(); + void enterNewWords(); + bool isWin(); + void convertToUpper(); + void readFromFile(); + + void setSecretWord(string word); + string getSecretWord(); + + void setWordLength(int length); + int getWordLength(); + + void initFile(); + bool notguessed(char guess); + bool isinword(char guess); + bool doadmin(); + void displayMenu(); + void drawhangman(); + bool handleinput(); + void blankguesses(); + void revealchar(char reveal); + void chooseword(); + void drawletters(); +}; diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.vcxproj b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.vcxproj new file mode 100644 index 0000000..6f5f5a3 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.vcxproj @@ -0,0 +1,102 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {7310FC30-2591-4B40-9580-33268702093E} + Win32Proj + Hangman + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.vcxproj.filters b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.vcxproj.filters new file mode 100644 index 0000000..7d412c4 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangman.vcxproj.filters @@ -0,0 +1,58 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangword.cpp b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangword.cpp new file mode 100644 index 0000000..655defb --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Hangword.cpp @@ -0,0 +1,76 @@ +#include "stdhangman.h" + +int hangword::getid() +{ + return id; +} +void hangword::setid(int id) +{ + this->id = id; +} + +void hangword::setword(string word) +{ + this->word = word; +} +string hangword::getword() +{ + return word; +} + +void hangword::Read(ifstream& file) +{ + setid(readid(file)); + setword(readword(file)); +} + +void hangword::Write(ofstream& file) +{ + int id = getid(); + writeid(file, id); + writeword(file, getword()); +} + +void hangword::writeword(ofstream& file,const string& str) +{ + // get the length of the string data + unsigned int len = str.size(); + + // write the size: + file.write( reinterpret_cast( &len ), sizeof(len) ); + + // write the actual string data: + file.write( str.c_str(), len ); +} + +string hangword::readword(ifstream& file) +{ + // this probably isn't the optimal way to do it, but whatever + string str; + + // get the length + unsigned int len; + file.read( reinterpret_cast( &len ), sizeof(len) ); + + // we can't read to string directly, so instead, create a temporary buffer + if(len > 0) + { + char* buf = new char[len]; + file.read( buf, len ); + str.append( buf, len ); + delete[] buf; + } + return str; +} + +inline void hangword::writeid(ofstream& file, int& num) +{ + file.write(reinterpret_cast(&num),sizeof(int)); +} + +int hangword::readid(ifstream& file) +{ + int num; + file.read(reinterpret_cast(&num),sizeof(int)); + return num; +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/Resource.rc b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Resource.rc new file mode 100644 index 0000000..770bbf1 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Hangman/Hangman/Resource.rc differ diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/hangmanwordlist.txt b/SDrive/programs/Mod11/Com203/Hangman/Hangman/hangmanwordlist.txt new file mode 100644 index 0000000..f8c0fea --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/hangmanwordlist.txt @@ -0,0 +1,100 @@ +fluorine +steapsin +gadoid +optics +master +uninvasive +nettable +preintend +scourge +clinah +planking +autogenetic +inweaved +peipus +corneal +descendant +premonopolizing +wadmoll +grimily +anatolic +uniced +unendeared +geothermic +tarsier +hartmann +actuarially +caffein +antiexpressive +refasten +hostelling +sacculus +teazeling +resolution +demoralised +fletcherizing +decently +mitrephorus +reverser +eudora +comestible +kilpatrick +peroneal +corporate +provisional +plaice +atheneum +juicing +wintery +ellipsoid +avigation +republicanism +bocage +frederika +cleruch +counterbracing +uninstigated +undocumented +voyeurism +catchfly +scatomas +overwore +radiably +rhoecus +eighteenmo +imperfectness +siziness +curable +gradin +breadroot +heresy +ophytic +cosmopolitanizing +cannoneer +haverhill +abingdon +mentor +dissimulator +fazenda +syrphid +rockier +inobservance +hipbone +duckiest +interclub +mollendo +touche +dionysius +impedible +intoner +cichoriaceous +nondrinkable +nevada +pithecanthropus +upswinging +humectant +diakinesis +capacitively +nonaccord +cilice +exuviate \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/hangword.h b/SDrive/programs/Mod11/Com203/Hangman/Hangman/hangword.h new file mode 100644 index 0000000..9a89c50 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/hangword.h @@ -0,0 +1,25 @@ +#pragma once + +#include "stdhangman.h" + +class hangword +{ +private: + int id; + string word; +public: + void setid(int in); + int getid(); + + void setword(string in); + string getword(); + + void Read(ifstream& file); + void Write(ofstream& file); + + void writeword(ofstream& file,const string& str); + string readword(ifstream& file); + + void writeid(ofstream& file, int& num); + int readid(ifstream& file); +}; diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/icon.ico b/SDrive/programs/Mod11/Com203/Hangman/Hangman/icon.ico new file mode 100644 index 0000000..248d2bc Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Hangman/Hangman/icon.ico differ diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/main.cpp b/SDrive/programs/Mod11/Com203/Hangman/Hangman/main.cpp new file mode 100644 index 0000000..0b27a3f --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/main.cpp @@ -0,0 +1,78 @@ +#define _CRT_SECURE_NO_WARNINGS + +#include "stdhangman.h" +#include "main.h" +#include "resource.h" + +using namespace std; + +int main() +{ + ConsoleSetup(TEXT("Hangman")); + Hangman game; + game.displayMenu(); + + cout << "Thanks for playing!" << endl << endl; + pause(); + return 0; +} + +/* ------------------------------------------- Just boring stuff after here ------------------------ */ + +void ConsoleSetup(TCHAR* input) +{ + system("color 1e"); + + ChangeConsoleIcon(IDI_ICON1); + ChangeConsoleTitle(input); + cout << string(80,'*') << "Welcome to "; + wcout << input; + cout << " " << GetYear() << " Edition!" << endl << string(80,'*') << endl << endl; +} + +void ChangeConsoleTitle (const TCHAR* input) +{ + time_t t = time(NULL); + tm* timePtr = localtime(&t); + TCHAR szNewTitle[MAX_PATH]; + TCHAR szYear[7]; + + StringCchCopy(szNewTitle, MAX_PATH, TEXT(" ")); + StringCchCat(szNewTitle, MAX_PATH, input); + + StringCchPrintf(szYear, 7, TEXT(" %d!"), GetYear()); + StringCchCat(szNewTitle, MAX_PATH, szYear); + + SetConsoleTitle(szNewTitle); +} + +void ChangeConsoleIcon (const int resource_number) +{ + HMODULE hMainMod = GetModuleHandle(0); + assert (hMainMod); + + HICON hMainIcon = ::LoadIcon(hMainMod, MAKEINTRESOURCE(resource_number)); + assert (hMainIcon); + + // Load kernel 32 library + HMODULE hMod = LoadLibrary( _T( "Kernel32.dll" )); + assert (hMod); + + // Load console icon changing procedure + typedef DWORD (__stdcall *SCI)(HICON); + SCI pfnSetConsoleIcon = reinterpret_cast(GetProcAddress(hMod, "SetConsoleIcon")); + assert (pfnSetConsoleIcon); + + // Call function to change icon + pfnSetConsoleIcon (hMainIcon); + + FreeLibrary (hMod); +}// End ChangeIcon + +int GetYear() +{ + time_t t = time(NULL); + tm* timePtr = localtime(&t); + + return timePtr->tm_year + 1900; +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/main.h b/SDrive/programs/Mod11/Com203/Hangman/Hangman/main.h new file mode 100644 index 0000000..9023a58 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/main.h @@ -0,0 +1,13 @@ + + +void ChangeConsoleTitle (const TCHAR* input); + +void ChangeConsoleIcon (int resource_number); + +void ConsoleSetup(TCHAR* input); + +int GetYear(); + +enum { NUL = 0, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, + LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, + SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, DEL = 127 }; \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/resource.h b/SDrive/programs/Mod11/Com203/Hangman/Hangman/resource.h new file mode 100644 index 0000000..661a5ba Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Hangman/Hangman/resource.h differ diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/stdhangman.cpp b/SDrive/programs/Mod11/Com203/Hangman/Hangman/stdhangman.cpp new file mode 100644 index 0000000..da00808 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/stdhangman.cpp @@ -0,0 +1,94 @@ +#include "stdhangman.h" + +// Pause() use conio.h's get character to pause the program +void pause() +{ + int c; + cout << endl << "Press any key to continue . . ." << endl; + c = _getch(); + if (c == 0 || c == 224) // getch will return a 0 or 244 on error + { + _getch(); // try again + } +} + +// cursorpos(X,Y) use ConsoleAPI to place the cursor at a particular position +void cursorpos(int X, int Y) +{ + if ( X < 0 ) // off the screen + { + X = 0; + } + if ( Y < 0 ) + { + Y = 0; + } + HANDLE hStdOut = GetStdHandle( STD_OUTPUT_HANDLE ); //grab the stdout handle + COORD newpos = { X, Y }; // use the Coord struct to stage the new position + SetConsoleCursorPosition( hStdOut, newpos ); // set the new cursor position +} + +// take the input modulus the length by 80, set the cursor position there +void centerline(string input, int linenum) +{ + if (input.length() > 80) // over 80 characters? must be centred already + { + cursorpos(0,linenum); + } + int mod = (80-input.length())/2; // formula: input length subtracted from console line length divided by 2 + cursorpos(mod,linenum); // set where to write + cout << input << endl; // write it +} + +// write a line +void writeline(string input) +{ + cout << ' ' << input << endl; // simple function to begin a line with a ' ' +} + +// write a blank line +void writeline(int num) +{ + for (int i = 0; i <= num; i++) // easy function for multiple blank lines + { + cout << endl; + } +} + +// do the separator thing +void drawseperator() +{ + for (int i = 2; i < 24; i++) // separates the hangman from the words + { + cursorpos(50,i); + cout << "|"; + } +} + +// seed using micro time. much better than grabbing a random pointer. +void doseed() +{ + unsigned __int64 freq; + QueryPerformanceFrequency((LARGE_INTEGER*)&freq); + double timerFrequency = (1.0/freq); + + unsigned __int64 startTime; + QueryPerformanceCounter((LARGE_INTEGER *)&startTime); + srand(startTime*freq); +} + +// use the console api to fill the screen with spaces +void cls() { + HANDLE screen = GetStdHandle(STD_OUTPUT_HANDLE); + COORD pos = {0, 0}; + DWORD written; + CONSOLE_SCREEN_BUFFER_INFO screen_attr; + unsigned size; + + GetConsoleScreenBufferInfo(screen, &screen_attr); + + size = screen_attr.dwSize.X * screen_attr.dwSize.Y; + FillConsoleOutputCharacterW(screen, ' ', size, pos, &written); + + SetConsoleCursorPosition(screen, pos); +} diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/stdhangman.h b/SDrive/programs/Mod11/Com203/Hangman/Hangman/stdhangman.h new file mode 100644 index 0000000..f619be7 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Hangman/Hangman/stdhangman.h @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "atlbase.h" +#include "atlstr.h" +#include "comutil.h" + +#include "Hangman.h" +#include "hangword.h" + +using namespace std; + +void pause(); +void cursorpos(int x, int y); +void centerline(string input, int linenum); +void writeline(string input); +void writeline(int num); +void drawseperator(); +void doseed(); +void cls(); diff --git a/SDrive/programs/Mod11/Com203/Hangman/Hangman/wordlist.bin b/SDrive/programs/Mod11/Com203/Hangman/Hangman/wordlist.bin new file mode 100644 index 0000000..2c4b8a1 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Hangman/Hangman/wordlist.bin differ diff --git a/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld.sln b/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld.sln new file mode 100644 index 0000000..561c3b9 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld", "HelloWorld\HelloWorld.vcxproj", "{1DB2F6D8-614C-4057-97E4-831195518676}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1DB2F6D8-614C-4057-97E4-831195518676}.Debug|Win32.ActiveCfg = Debug|Win32 + {1DB2F6D8-614C-4057-97E4-831195518676}.Debug|Win32.Build.0 = Debug|Win32 + {1DB2F6D8-614C-4057-97E4-831195518676}.Release|Win32.ActiveCfg = Release|Win32 + {1DB2F6D8-614C-4057-97E4-831195518676}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.cpp b/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.cpp new file mode 100644 index 0000000..a778137 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.cpp @@ -0,0 +1,89 @@ +/***************************************************************************** + * Program: Hello World * + * Author: Amrit Panesar * + * Date: 08/04/2014 * + * Description: Display "Hello World" and do a bit of adding and multlipling * + *****************************************************************************/ + +#include +#include +#include + +using namespace std; + +bool pause() +{ + enum { NUL = 0, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, + LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, + SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, DEL = 127 }; + + cout << "Press any key to continue..." << endl << endl; + int i = getch(); + if ( i == ETX || i == ESC ) // control + c || escape + { + return true; + } + return false; +} + +int main(int argc, char* argv[]) +{ + int i, j, k, l = 0; + while (true) + { + cout << "Hello World!" << endl; + + if (pause()) + break; + + cout << "Adding! Please enter two integers." << endl; + cout << "Number 1: "; + cin >> i; + cout << endl; + cout << "Number 2: "; + cin >> j; + cout << endl; + k = i + j; + cout << "The result is: " << k << endl; + + if (pause()) + break; + + cout << "Comparing! Please enter two integers." << endl; + cout << "Number 1: "; + cin >> i; + cout << endl; + cout << "Number 2: "; + cin >> j; + cout << endl; + if ( i == j ) + cout << i << " == " << j << endl; + else + cout << i << " != " << j << endl; + if ( i > j ) + cout << i << " > " << j << endl; + else if ( i < j ) + cout << i << " < " << j << endl; + + if (pause()) + break; + + + cout << "Multiplication! Please enter three integers." << endl; + cout << "Number 1: "; + cin >> i; + cout << endl; + cout << "Number 2: "; + cin >> j; + cout << endl; + cout << "Number 3: "; + cin >> k; + cout << endl; + l = i * j * k; + cout << "The result is: " << l << endl; + + if (pause()) + break; + } + return 0; +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.vcxproj b/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.vcxproj new file mode 100644 index 0000000..bf57534 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.vcxproj @@ -0,0 +1,68 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {1DB2F6D8-614C-4057-97E4-831195518676} + HelloWorld + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + + + true + + + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.vcxproj.filters b/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.vcxproj.filters new file mode 100644 index 0000000..203c5a0 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/HelloWorld/HelloWorld/HelloWorld.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim.sln b/SDrive/programs/Mod11/Com203/PetSim/PetSim.sln new file mode 100644 index 0000000..3652228 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/PetSim/PetSim.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PetSim", "PetSim\PetSim.vcxproj", "{8387506E-641F-4005-AF63-F98EBDDF0E48}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8387506E-641F-4005-AF63-F98EBDDF0E48}.Debug|Win32.ActiveCfg = Debug|Win32 + {8387506E-641F-4005-AF63-F98EBDDF0E48}.Debug|Win32.Build.0 = Debug|Win32 + {8387506E-641F-4005-AF63-F98EBDDF0E48}.Release|Win32.ActiveCfg = Release|Win32 + {8387506E-641F-4005-AF63-F98EBDDF0E48}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/CenteredOut.h b/SDrive/programs/Mod11/Com203/PetSim/PetSim/CenteredOut.h new file mode 100644 index 0000000..0a49096 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/PetSim/PetSim/CenteredOut.h @@ -0,0 +1,21 @@ +#include "stdhead.h" + +using namespace std; + +class CenteredOut +{ +public: + ostream &m_file; + CenteredOut(ostream &o = cout):m_file(o){}; + + template + CenteredOut &operator<<(const T &a) { + m_file< * + * Date: 08/18/2014 * + * License: Released into public domain * + *****************************************************************************/ + +#include "stdhead.h" + +/****************************************** Getters and Setters **************/ + +int Pet::getHungerLevel() +{ + return hungerlevel; +} + +void Pet::setHungerLevel(int hunger) +{ + hungerlevel = hunger; +} + +int Pet::getBoredomLevel() +{ + return boredomlevel; +} +void Pet::setBoredomLevel(int boredom) +{ + boredomlevel = boredom; +} + +string Pet::getName() +{ + return name; +} +void Pet::setName(string name) +{ + Pet::name = name; +} + +/*********************** lets begin ******************************************/ + +Pet::Pet(string name, int hunger, int boredom) +{ + setName(name); + setHungerLevel(hunger); + setBoredomLevel(boredom); +} + +void Pet::Talk() +{ + if (PetMood() < 7) + cout << getName() << " is feeling happy!" << endl; + else if (PetMood() >= 7 && PetMood() < 16) + cout << getName() << " is feeling okay." << endl; + else if (PetMood() >=16 && PetMood() < 21) + cout << getName() << " is feeling fustrated." << endl; + else + cout << getName() << " is feeling mad!" << endl; + PassTime(); + DisplayPetBehavior(); +} + +void Pet::FeedPet(int in) +{ + if (in > 4) + in = 4; + if (in <= 0) + in = 1; + + if (getHungerLevel() < in) + setHungerLevel(getHungerLevel()-getHungerLevel()); + else + setHungerLevel(getHungerLevel()-in); + + cout << getName() << " has been fed " << in << " pellets of food" << endl; + PassTime(); + DisplayPetBehavior(); +} + +void Pet::Play(int in) +{ + if (in > 4) + in = 4; + if (in <= 0) + in = 1; + if (getBoredomLevel() < in) + setBoredomLevel(getBoredomLevel()-getBoredomLevel()); + else + setBoredomLevel(getBoredomLevel()-in); + cout << getName() << " had " << in << " hours of fun." << endl; + PassTime(); + DisplayPetBehavior(); +} + +void Pet::DisplayPetBehavior() +{ + cout << " Boredom: " << getBoredomLevel() << endl; + cout << " Hunger: " << getHungerLevel() << endl; + if (getBoredomLevel() < 3 && getHungerLevel() < 3) + cout << getName() << " is content" << endl; + + if ( getBoredomLevel() >= 3 && getBoredomLevel() < 11) + cout << getName() << " is a litte bored" << endl; + else if (getBoredomLevel() >= 11) + cout << getName() << " is very bored" << endl; + + if ( getHungerLevel() >= 3 && getHungerLevel() < 11) + cout << getName() << " is a litte hungry" << endl; + else if (getHungerLevel() >= 11) + cout << getName() << " is very hungry" << endl; + cout << endl; +} + +int Pet::PetMood() +{ + return getBoredomLevel() + getHungerLevel(); +} + +void Pet::PassTime(int time) +{ + setHungerLevel(getHungerLevel()+time); + setBoredomLevel(getBoredomLevel()+time); +} + +void Pet::menu() +{ + enum { TALK = 1, FEED, PLAY, QUIT }; + bool breakout = false; + while (!breakout) + { + cout << "Pet: " << getName() << endl; + cout << TALK << ". Talk with your pet." << endl; + cout << FEED << ". Feed your pet." << endl; + cout << PLAY << ". Play with your pet." << endl; + cout << QUIT << ". Quit your pet." << endl; + cout << "What would you like to do?" << endl << ":"; + int menuSelection = getch() - '0'; + //cls(); + system("cls"); + switch (menuSelection) + { + case TALK: + Talk(); + break; + case FEED: + FeedPet((((rand()%509)*(rand()%349))%4)); + break; + case PLAY: + Play((((rand()%509)*(rand()%349))%4)); + break; + case QUIT: + breakout = true; + default: + break; + } + } +} diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/Pet.h b/SDrive/programs/Mod11/Com203/PetSim/PetSim/Pet.h new file mode 100644 index 0000000..9e40724 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/PetSim/PetSim/Pet.h @@ -0,0 +1,39 @@ + +/****************************************************************************** + * Pet.h - Define a pet object * + * Author: Amrit Panesar * + * Date: 08/18/2014 * + * License: Released into public domain * + *****************************************************************************/ + +#include "stdhead.h" + +class Pet +{ +private: + int hungerlevel; + int boredomlevel; + string name; + + int PetMood(); + void PassTime(int time = 1); + + int getHungerLevel(); + void setHungerLevel(int hunger); + + int getBoredomLevel(); + void setBoredomLevel(int boredom); + + string getName(); + void setName(string name); + + +public: + Pet(string name, int hunger = 0, int boredom = 0); + void Talk(); + void FeedPet(int in); + void Play(int in); + void DisplayPetBehavior(); + void menu(); + +}; \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.cpp b/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.cpp new file mode 100644 index 0000000..eedbea1 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.cpp @@ -0,0 +1,173 @@ +// PetSim.cpp : Defines the entry point for the console application. +// + +#include "stdhead.h" + + +bool yorn(); +void ChangeIcon( const HICON hNewIcon ); + +int _tmain(int argc, _TCHAR* argv[]) +{ + int i; + time_t t = time(NULL); + tm* timePtr = localtime(&t); + TCHAR szNewTitle[MAX_PATH]; + + HMODULE hMainMod = GetModuleHandle( 0 ); + assert( hMainMod ); + + HICON hMainIcon = ::LoadIcon( hMainMod, MAKEINTRESOURCE( IDI_ICON1 )); + assert( hMainIcon ); + + // Change main window icon + ChangeIcon( hMainIcon ); + + system("color 1e"); + StringCchPrintf(szNewTitle, MAX_PATH, TEXT("Pet Simulator %d"), timePtr->tm_year + 1900); + SetConsoleTitle(szNewTitle); + + cout << string(80, '*'); + cout << "Welcome to Pet Simulator " << timePtr->tm_year + 1900 << " Edition!" << endl << endl; + cout << string(80, '*'); + + bool named = false; + string name; + + while(!named) + { + cout << endl << endl; + cout << "Step one: Name your pet." << endl; + cout << "It's time to name your pet! Please enter a name for your pet" << endl << ": "; + cin >> name; + cout << "You've named your pet: " << name << endl << endl; + cout << "Is this correct?" << endl << "[Y/n]: "; + i = getch(); + cout << (char)i << endl; + bool breakout = false; + if ( i == 89 || 121 || 13 || 27 || 28 || 110) + { + switch (i) + { + case 89: + case 121: + case 13: + named = true; + breakout = true; + break; + case 27: + case 28: + case 110: + breakout = true; + break; + } + } + if (!breakout) + { + if (yorn()) + { + named = true; + breakout = true; + } + else + { + breakout = true; + } + } + } + + + Pet pet = Pet(name); + + bool breakout = false; + while(!breakout) + { + pet.menu(); + system("cls"); + cout << "Would you like to play again?" << endl << "[Y/n]: "; + i = getch(); + cout << (char)i << endl; + bool bjorn = false; + if ( i == 89 || 121 || 13 || 27 || 28 || 110) + { + switch (i) + { + case 89: + case 121: + case 13: + bjorn = true; + breakout = false; + break; + case 27: + case 28: + case 110: + bjorn = true; + breakout = true; + break; + default: + bjorn = false; + } + } + if (!bjorn) + { + if (yorn()) + { + breakout = false; + } + else + { + breakout = true; + } + } + } + + system("cls"); + cout << "Game over .." << endl << endl; + cout << "Press any key to continue..."; + getch(); + + return 0; +} + +bool yorn() +{ + int i = 0; + while (i != 0) + { + cout << "Please enter Y or N :" << endl; + i = getch(); + cout << (char)i << endl; + switch (i) + { + case 89: + case 121: + return true; + break; + case 28: + case 110: + return false; + break; + default: + i = 0; + } + } + + ChangeIcon( 0 ); +} + +void ChangeIcon( const HICON hNewIcon ) +{ + // Load kernel 32 library + HMODULE hMod = LoadLibrary( _T( "Kernel32.dll" )); + assert( hMod ); + + // Load console icon changing procedure + typedef DWORD ( __stdcall *SCI )( HICON ); + SCI pfnSetConsoleIcon = reinterpret_cast( GetProcAddress( hMod, "SetConsoleIcon" )); + assert( pfnSetConsoleIcon ); + + // Call function to change icon + pfnSetConsoleIcon( hNewIcon ); + + FreeLibrary( hMod ); +}// End ChangeIcon diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.vcxproj b/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.vcxproj new file mode 100644 index 0000000..3e8923d --- /dev/null +++ b/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.vcxproj @@ -0,0 +1,98 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {8387506E-641F-4005-AF63-F98EBDDF0E48} + Win32Proj + PetSim + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.vcxproj.filters b/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.vcxproj.filters new file mode 100644 index 0000000..cc256ee --- /dev/null +++ b/SDrive/programs/Mod11/Com203/PetSim/PetSim/PetSim.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/ReadMe.txt b/SDrive/programs/Mod11/Com203/PetSim/PetSim/ReadMe.txt new file mode 100644 index 0000000..677fc13 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/PetSim/PetSim/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + CONSOLE APPLICATION : PetSim Project Overview +======================================================================== + +AppWizard has created this PetSim application for you. + +This file contains a summary of what you will find in each of the files that +make up your PetSim application. + + +PetSim.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +PetSim.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +PetSim.cpp + This is the main application source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named PetSim.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/Resource.rc b/SDrive/programs/Mod11/Com203/PetSim/PetSim/Resource.rc new file mode 100644 index 0000000..93b8f64 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/PetSim/PetSim/Resource.rc differ diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/icon.ico b/SDrive/programs/Mod11/Com203/PetSim/PetSim/icon.ico new file mode 100644 index 0000000..9c550f1 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/PetSim/PetSim/icon.ico differ diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/resource.h b/SDrive/programs/Mod11/Com203/PetSim/PetSim/resource.h new file mode 100644 index 0000000..661a5ba Binary files /dev/null and b/SDrive/programs/Mod11/Com203/PetSim/PetSim/resource.h differ diff --git a/SDrive/programs/Mod11/Com203/PetSim/PetSim/stdhead.h b/SDrive/programs/Mod11/Com203/PetSim/PetSim/stdhead.h new file mode 100644 index 0000000..33ddfe1 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/PetSim/PetSim/stdhead.h @@ -0,0 +1,29 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +using namespace std; + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + + + +// TODO: reference additional headers your program requires here + +#include "CenteredOut.h" +#include "resource.h" +#include "Pet.h" diff --git a/SDrive/programs/Mod11/Com203/Pong/Code change from handout.txt b/SDrive/programs/Mod11/Com203/Pong/Code change from handout.txt new file mode 100644 index 0000000..d17e044 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Code change from handout.txt @@ -0,0 +1,9 @@ +Code change needed from the handout. +Use the following code to instantiate your root object in the Pong constructor: + + +#ifdef _DEBUG + rootPtr = new Root("Plugins_d.cfg"); // initialize Root object +#else + rootPtr = new Root("Plugins.cfg"); // initialize Root object +#endif diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project.sln b/SDrive/programs/Mod11/Com203/Pong/Ogre Project.sln new file mode 100644 index 0000000..b6f5a09 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ogre Project", "Ogre Project\Ogre Project.vcproj", "{220D5644-C06B-4022-A9D7-7B43CEBC46D8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {220D5644-C06B-4022-A9D7-7B43CEBC46D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {220D5644-C06B-4022-A9D7-7B43CEBC46D8}.Debug|Win32.Build.0 = Debug|Win32 + {220D5644-C06B-4022-A9D7-7B43CEBC46D8}.Release|Win32.ActiveCfg = Release|Win32 + {220D5644-C06B-4022-A9D7-7B43CEBC46D8}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project.sln.old b/SDrive/programs/Mod11/Com203/Pong/Ogre Project.sln.old new file mode 100644 index 0000000..b6f5a09 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project.sln.old @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ogre Project", "Ogre Project\Ogre Project.vcproj", "{220D5644-C06B-4022-A9D7-7B43CEBC46D8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {220D5644-C06B-4022-A9D7-7B43CEBC46D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {220D5644-C06B-4022-A9D7-7B43CEBC46D8}.Debug|Win32.Build.0 = Debug|Win32 + {220D5644-C06B-4022-A9D7-7B43CEBC46D8}.Release|Win32.ActiveCfg = Release|Win32 + {220D5644-C06B-4022-A9D7-7B43CEBC46D8}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project.suo.old b/SDrive/programs/Mod11/Com203/Pong/Ogre Project.suo.old new file mode 100644 index 0000000..c4e6db6 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project.suo.old differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ball.cpp b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ball.cpp new file mode 100644 index 0000000..315f2a8 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ball.cpp @@ -0,0 +1,165 @@ +// Ball.cpp +// Ball class member-function definitions. +#include // Ogre class definition +using namespace Ogre; // use the Ogre namespace + +#include // OgreAL class definition +#include "Ball.h" // Ball class definition +#include "Paddle.h" // Paddle class definition +#include "Pong.h" // Pong class definition + +// Ball constructor +Ball::Ball( SceneManager *ptr ) +{ + sceneManagerPtr = ptr; // set pointer to the SceneManager + soundManagerPtr = new OgreAL::SoundManager(); // create SoundManager + speed = 100; // speed of the Ball + direction = Vector3( 1, -1, 0 ); // direction of the Ball +} // end Ball constructor + +// Ball destructor +Ball::~Ball() +{ + // empty body +} // end Ball destructor + +// add the Ball to the scene +void Ball::addToScene() +{ + // create Entity and attach it to a node in the scene + Entity *entityPtr = + sceneManagerPtr->createEntity( "Ball", "cube.mesh" ); + entityPtr->setMaterialName( "ball" ); // set material for the Ball + entityPtr->setNormaliseNormals( true ); // fix the normals when scaled + nodePtr = sceneManagerPtr->getRootSceneNode()->createChildSceneNode( "Ball" ); // create a SceneNode + nodePtr->attachObject( entityPtr ); // attach the Entity to SceneNode + nodePtr->setScale( .05, .05, .05 ); // scale SceneNode + + // attach sounds to Ball so they will play from where Ball is + wallSoundPtr = soundManagerPtr->createSound( "wallSound", "wallSound.wav", false ); + nodePtr->attachObject( wallSoundPtr ); // attach a sound to SceneNode + paddleSoundPtr = soundManagerPtr->createSound( "paddleSound", "paddleSound.wav", false ); + nodePtr->attachObject( paddleSoundPtr ); // attach sound to SceneNode + scoreSoundPtr = soundManagerPtr->createSound( "cheer", "cheer.wav", false ); // create a Sound + + // attach the score sound to its own node centered at ( 0, 0, 0 ) + sceneManagerPtr->getRootSceneNode()->createChildSceneNode( "score" )->attachObject( scoreSoundPtr ); +} // end function addToScene + +// move the Ball across the screen +void Ball::moveBall( Real time ) +{ + nodePtr->translate( ( direction * ( speed * time ) ) ); // move Ball + Vector3 position = nodePtr->getPosition(); // get Ball's new position + + // get the positions of the four walls + Vector3 topPosition = sceneManagerPtr->getSceneNode( "WallTop" )->getPosition(); + Vector3 bottomPosition = sceneManagerPtr->getSceneNode( "WallBottom" )->getPosition(); + Vector3 leftPosition = sceneManagerPtr->getSceneNode( "WallLeft" )->getPosition(); + Vector3 rightPosition = sceneManagerPtr->getSceneNode( "WallRight" )->getPosition(); + + const int WALL_WIDTH = 5; // the width of the walls + + // check if the Ball hit the left side + if ( ( position.x - RADIUS ) <= leftPosition.x + ( WALL_WIDTH / 2 ) ) + { + nodePtr->setPosition( 0, 0, 0 ); // place Ball in center of screen + Pong::updateScore( Players::PLAYER2 ); // update the score + scoreSoundPtr->play(); // play a sound when player 2 scores + } // end if + // check if the Ball hit the right side + else if ( + ( position.x + RADIUS ) >= rightPosition.x - ( WALL_WIDTH / 2 ) ) + { + nodePtr->setPosition( 0, 0, 0 ); // place Ball in center of screen + Pong::updateScore( Players::PLAYER1 ); // update the score + scoreSoundPtr->play(); // play a sound when player 1 scores + } // end else + // check if the Ball hit the bottom wall + else if ( + ( position.y - RADIUS ) <= bottomPosition.y + ( WALL_WIDTH / 2 ) && + direction.y < 0 ) + { + // place the Ball on the bottom wall + nodePtr->setPosition( position.x, + ( bottomPosition.y + ( WALL_WIDTH / 2 ) + RADIUS ), position.z ); + reverseVerticalDirection(); // make the Ball start moving up + } // end else + // check if the Ball hit the top wall + else if ( + ( position.y + RADIUS ) >= topPosition.y - ( WALL_WIDTH / 2 ) && + direction.y > 0 ) + { + // place the Ball on the top wall + nodePtr->setPosition( position.x, + ( topPosition.y - ( WALL_WIDTH / 2 ) - RADIUS ), position.z ); + reverseVerticalDirection(); // make the Ball start moving down + } // end else + + hitPaddle(); // check if the Ball hit a Paddle +} // end function moveBall + +// reverse the Ball's horizontal direction +void Ball::reverseHorizontalDirection() +{ + direction *= Vector3( -1, 1, 1 ); // reverse the horizontal direction + paddleSoundPtr->play(); // play the "paddleSound" sound effect +} // end function reverseHorizontalDirection + +// reverse the Ball's vertical direction +void Ball::reverseVerticalDirection() +{ + direction *= Vector3( 1, -1, 1 ); // reverse the vertical direction + wallSoundPtr->play(); // play the "wallSound" sound effect +} // end function reverseVerticalDirection + +// control the Ball colliding with the Paddle +void Ball::hitPaddle() +{ + // get the position of the Paddles and the Ball + Vector3 leftPaddlePosition = sceneManagerPtr-> + getSceneNode( "LeftPaddle" )->getPosition(); // left Paddle + Vector3 rightPaddlePosition = sceneManagerPtr-> + getSceneNode( "RightPaddle" )->getPosition(); // right Paddle + Vector3 ballPosition = nodePtr->getPosition(); // the Ball's position + + const int PADDLE_WIDTH = 2; // width of the Paddle + const int PADDLE_HEIGHT = 30; // height of the Paddle + + // is the Ball in range of the left Paddle? + if ( ( ballPosition.x - RADIUS ) < + ( leftPaddlePosition.x + ( PADDLE_WIDTH / 2 ) ) ) + { + // check for collision with left Paddle + if ( ( ballPosition.y - RADIUS ) < + ( leftPaddlePosition.y + ( PADDLE_HEIGHT / 2 ) ) && + ( ballPosition.y + RADIUS ) > + ( leftPaddlePosition.y - ( PADDLE_HEIGHT / 2 ) ) ) + { + reverseHorizontalDirection(); // reverse the Ball's direction + + // place the Ball at the edge of the Paddle + nodePtr->setPosition( + ( leftPaddlePosition.x + ( PADDLE_WIDTH / 2 ) + RADIUS ), + ballPosition.y, ballPosition.z ); + } // end if + } // end if + // is the Ball in range of the right Paddle? + else if ( ( ballPosition.x + RADIUS ) > + ( rightPaddlePosition.x - ( PADDLE_WIDTH / 2 ) ) ) + { + // check for collision with right Paddle + if ( ( ballPosition.y - RADIUS ) < + ( rightPaddlePosition.y + ( PADDLE_HEIGHT / 2 ) ) && + ( ballPosition.y + RADIUS ) > + ( rightPaddlePosition.y - ( PADDLE_HEIGHT / 2 ) ) ) + { + reverseHorizontalDirection(); // reverse the Ball's direction + + // place the Ball at the edge of the Paddle + nodePtr->setPosition( + ( rightPaddlePosition.x - ( PADDLE_WIDTH / 2 ) - RADIUS ), + ballPosition.y, ballPosition.z ); + } // end if + } // end else +} // end function hitPaddle diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ball.h b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ball.h new file mode 100644 index 0000000..5c75918 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ball.h @@ -0,0 +1,40 @@ +// Ball.h +// Ball class definition (represents a bouncing ball). +#ifndef BALL_H +#define BALL_H + +#include // Ogre class definition +using namespace Ogre; // use the Ogre namespace + +#include // OgreAL class definition + +class Paddle; // forward declaration of class Paddle + +const int RADIUS = 5; // the radius of the Ball + +class Ball +{ +public: + Ball( SceneManager *sceneManagerPtr ); // constructor + ~Ball(); // destructor + void addToScene(); // add the Ball to the scene + void moveBall( Real time ); // move the Ball across the screen + +private: + SceneManager *sceneManagerPtr; // pointer to the SceneManager + SceneNode *nodePtr; // pointer to the SceneNode + OgreAL::SoundManager *soundManagerPtr; // pointer to the SoundManager + OgreAL::Sound *wallSoundPtr; // sound played when Ball hits a wall + OgreAL::Sound *paddleSoundPtr; // sound played when Ball hits a Paddle + OgreAL::Sound *scoreSoundPtr; // sound played when someone scores + int speed; // speed of the Ball + Vector3 direction; // direction of the Ball + + // private utility functions + void reverseHorizontalDirection(); // change horizontal direction + void reverseVerticalDirection(); // change vertical direction + void hitPaddle(); // control the Ball hitting the Paddles +}; // end class Ball + +#endif // BALL_H + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcproj b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcproj new file mode 100644 index 0000000..a27eab8 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcproj @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcxproj b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcxproj new file mode 100644 index 0000000..96b7f13 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcxproj @@ -0,0 +1,111 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {220D5644-C06B-4022-A9D7-7B43CEBC46D8} + OgreProject + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + $(GDD_OGRE_HOME)\Ogre3D\include;$(GDD_OGRE_HOME)\OpenAL\include;$(GDD_OGRE_HOME)\OgreAL\include;$(GDD_OGRE_HOME)\ogg\include;$(GDD_OGRE_HOME)\vorbis\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + OgreMain_d.lib;OIS_d.lib;OgreAL_d.lib;%(AdditionalDependencies) + $(GDD_OGRE_HOME)\Ogre3D\lib\$(Configuration);$(GDD_OGRE_HOME)\OgreAL\lib\$(Configuration);%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(GDD_OGRE_HOME)\Ogre3D\include;$(GDD_OGRE_HOME)\OpenAL\include;$(GDD_OGRE_HOME)\OgreAL\include;$(GDD_OGRE_HOME)\ogg\include;$(GDD_OGRE_HOME)\vorbis\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + OgreMain.lib;OIS.lib;OgreAL.lib;%(AdditionalDependencies) + $(GDD_OGRE_HOME)\Ogre3D\lib\$(Configuration);$(GDD_OGRE_HOME)\OgreAL\lib\$(Configuration);%(AdditionalLibraryDirectories) + true + Windows + true + true + MachineX86 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcxproj.filters b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcxproj.filters new file mode 100644 index 0000000..4147398 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Ogre Project.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Paddle.cpp b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Paddle.cpp new file mode 100644 index 0000000..5f4fa84 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Paddle.cpp @@ -0,0 +1,45 @@ +// Paddle.cpp +// Paddle class member-function definitions. +#include // Ogre class definition +using namespace Ogre; // use the Ogre namespace + +#include "Paddle.h" // Paddle class definition + +// constructor +Paddle::Paddle( SceneManager *ptr, String paddleName, int positionX ) +{ + sceneManagerPtr = ptr; // set the pointer to the SceneManager + name = paddleName; // set the Paddle's name + x = positionX; // set the Paddle's x coordinate +} // end Paddle constructor + +// destructor +Paddle::~Paddle() +{ + // empty body +} // end Paddle default destructor + +// add the Paddle to the scene +void Paddle::addToScene() +{ + Entity *entityPtr = sceneManagerPtr-> + createEntity( name, "cube.mesh" ); // create an Entity + entityPtr->setMaterialName( "paddle" ); // set the Paddle's material + entityPtr->setNormaliseNormals( true ); // fix the normals when scaled + nodePtr = sceneManagerPtr->getRootSceneNode()->createChildSceneNode( name ); // create a SceneNode for the Paddle + nodePtr->attachObject( entityPtr ); // attach Paddle to the SceneNode + nodePtr->setScale( .02, .3, .1 ); // set the Paddle's size + nodePtr->setPosition( x, 0, 0 ); // set the Paddle's position +} // end function addToScene + +// move the Paddle up and down the screen +void Paddle::movePaddle( const Vector3 &direction ) +{ + nodePtr->translate( direction ); // move the Paddle + if ( nodePtr->getPosition().y > 52.5 ) // top of the box + nodePtr->setPosition( x, 52.5, 0 ); // place Paddle at top of box + else if ( nodePtr->getPosition().y < -52.5 ) // bottom of the box + // place the Paddle at the bottom of the box + nodePtr->setPosition( x, -52.5, 0 ); +} // end function movePaddle + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Paddle.h b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Paddle.h new file mode 100644 index 0000000..3c40178 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Paddle.h @@ -0,0 +1,27 @@ +// Paddle.h +// Paddle class definition (represents a paddle in the game). +#ifndef PADDLE_H +#define PADDLE_H + +#include // Ogre class definition +using namespace Ogre; // use the Ogre namespace + +class Paddle +{ +public: + // constructor + Paddle( SceneManager *sceneManagerPtr, String paddleName, + int positionX); + ~Paddle(); // destructor + void addToScene(); // add a Paddle to the scene + void movePaddle( const Vector3 &direction ); // move a Paddle + +private: + SceneManager* sceneManagerPtr; // pointer to the SceneManager + SceneNode *nodePtr; // pointer to a SceneNode + String name; // name of the Paddle + int x; // x coordinate of the Paddle +}; // end of class Paddle + +#endif // PADDLE_H + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Plugins.cfg b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Plugins.cfg new file mode 100644 index 0000000..e179a07 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Plugins.cfg @@ -0,0 +1,14 @@ +# Defines plugins to load + +# Define plugin folder +PluginFolder=. + +# Define plugins +Plugin=RenderSystem_Direct3D9 +Plugin=RenderSystem_GL +Plugin=Plugin_ParticleFX +Plugin=Plugin_BSPSceneManager +Plugin=Plugin_OctreeSceneManager +Plugin=Plugin_CgProgramManager + + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Plugins_d.cfg b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Plugins_d.cfg new file mode 100644 index 0000000..3fadbb2 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Plugins_d.cfg @@ -0,0 +1,14 @@ +# Defines plugins to load + +# Define plugin folder +PluginFolder=. + +# Define plugins +Plugin=RenderSystem_Direct3D9_d +Plugin=RenderSystem_GL_d +Plugin=Plugin_ParticleFX_d +Plugin=Plugin_BSPSceneManager_d +Plugin=Plugin_OctreeSceneManager_d +Plugin=Plugin_CgProgramManager_d + + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Pong.cpp b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Pong.cpp new file mode 100644 index 0000000..8217a8c --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Pong.cpp @@ -0,0 +1,407 @@ +// Pong.cpp +// Pong class member-function definitions. +#include +#include +#include // Ogre class definition +using namespace Ogre; // use the Ogre namespace +using namespace std; // use the Standard C namespace + +#include // OgreAL class definition +#include // OgreStringConverter class definition +#include // OISEvents class definition +#include // OISInputManager class definition +#include // OISKeyboard class definition +#include "Ball.h" // Ball class definition +#include "Paddle.h" // Paddle class definition +#include "Pong.h" // Pong class definition + +int Pong::player1Score = 0; // initialize player 1's score to 0 +int Pong::player2Score = 0; // initialize player 2's score to 0 +bool Pong::wait = false; // initialize wait to false + +// directions to move the Paddles +const Vector3 PADDLE_DOWN = Vector3( 0, -1, 0 ); +const Vector3 PADDLE_UP = Vector3( 0, 1, 0 ); + +// constructor +Pong::Pong() +{ + +#ifdef _DEBUG + rootPtr = new Root("Plugins_d.cfg"); // initialize Root object +#else + rootPtr = new Root("Plugins.cfg"); // initialize Root object +#endif + + // use the Ogre Config Dialog Box to choose the settings + //if ( !( rootPtr->showConfigDialog() ) ) // user canceled the dialog box + // throw runtime_error( "User Canceled Ogre Setup Dialog Box." ); + + WIN32_FIND_DATA w32FD; + HANDLE h = FindFirstFile(L"ogre.cfg", &w32FD); + if(FAILED(h)){ + if(!rootPtr->showConfigDialog()){ + throw runtime_error( "User Canceled Ogre Setup Dialog Box." ); + } else { + rootPtr->saveConfig(); + } + } else { + rootPtr->restoreConfig(); + } + + + // get a pointer to the RenderWindow + windowPtr = rootPtr->initialise( true, "Pong! 2014 Edition" ); + + // create the SceneManager + sceneManagerPtr = rootPtr->createSceneManager( ST_GENERIC ); + + // create the Camera + cameraPtr = sceneManagerPtr->createCamera( "PongCamera" ); + cameraPtr->setPosition( Vector3( 0, 0, 200 ) ); // set Camera position + cameraPtr->lookAt( Vector3( 0, 0, 0 ) ); // set where Camera looks + cameraPtr->setNearClipDistance( 5 ); // near distance Camera can see + cameraPtr->setFarClipDistance( 1000 ); // far distance Camera can see + + // create the Viewport + viewportPtr = windowPtr->addViewport( cameraPtr ); + viewportPtr->setBackgroundColour( ColourValue( 0, 0, 0 ) ); + + // set the Camera's aspect ratio + cameraPtr->setAspectRatio( Real( viewportPtr->getActualWidth() ) /( viewportPtr->getActualHeight() ) ); + + // set the scene's ambient light + sceneManagerPtr->setAmbientLight( ColourValue( 0.75, 0.75, 0.75 ) ); + + // create the Light + Light *lightPtr = sceneManagerPtr->createLight( "Light" ); // a Light + lightPtr->setPosition( 0, 0, 50 ); // set the Light's position + + unsigned long hWnd; // variable to hold the window handle + windowPtr->getCustomAttribute( "WINDOW", &hWnd ); // get window handle + OIS::ParamList paramList; // create an OIS ParamList + + // add the window to the ParamList + paramList.insert( OIS::ParamList::value_type( "WINDOW", Ogre::StringConverter::toString( hWnd ) ) ); + + // create the InputManager + inputManagerPtr = OIS::InputManager::createInputSystem( paramList ); + keyboardPtr = static_cast< OIS::Keyboard* >( inputManagerPtr->createInputObject( OIS::OISKeyboard, true ) ); // create a Keyboard + keyboardPtr->setEventCallback( this ); // add a KeyListener + + rootPtr->addFrameListener( this ); // add this Pong as a FrameListener + + // load resources for Pong + ResourceGroupManager::getSingleton().addResourceLocation("resources", "FileSystem", "Pong" ); + ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); + + quit = pause = false; // player has not quit or paused the game + time = 0; // initialize the time since Ball was reset to 0 + + paddle[0] = paddle[1] = 0; + +} // end Pong constructor + +// Pong destructor erases objects contained in a Pong object +Pong::~Pong() +{ + Ogre::WindowEventUtilities::removeWindowEventListener(windowPtr, this); + windowClosed(windowPtr); + + // free dynamically allocated memory for Keyboard/mouse + if(inputManagerPtr) + { + //inputManagerPtr->destroyInputObject( mousePtr ); + //mousePtr = 0; + + inputManagerPtr->destroyInputObject( keyboardPtr ); + keyboardPtr = 0; + + OIS::InputManager::destroyInputSystem(inputManagerPtr); + inputManagerPtr = 0; + } + + // free dynamically allocated memory for Root + delete rootPtr; // release memory pointer points to + rootPtr = 0; // point pointer at 0 + + // free dynamically allocated memory for Ball + delete ballPtr; // release memory pointer points to + ballPtr = 0; // point pointer at 0 + + // free dynamically allocated memory for Paddle + delete leftPaddlePtr; // release memory pointer points to + leftPaddlePtr = 0; // point pointer at 0 + + // free dynamically allocated memory for Paddle + delete rightPaddlePtr; // release memory pointer points to + rightPaddlePtr = 0; // point pointer at 0 +} // end Pong destructor + +// create the scene to be displayed +void Pong::createScene() +{ + // get a pointer to the Score Overlay + Overlay *scoreOverlayPtr = OverlayManager::getSingleton().getByName( "Score" ); + scoreOverlayPtr->show(); // show the Overlay + + // make the game objects + ballPtr = new Ball( sceneManagerPtr ); // make the Ball + ballPtr->addToScene(); // add the Ball to the scene + rightPaddlePtr = new Paddle( sceneManagerPtr, "RightPaddle", 90 ); + rightPaddlePtr->addToScene(); // add a Paddle to the scene + leftPaddlePtr = new Paddle( sceneManagerPtr, "LeftPaddle", -90 ); + leftPaddlePtr->addToScene(); // add a Paddle to the scene + + // create the walls + Entity *entityPtr = sceneManagerPtr->createEntity( "WallLeft", "cube.mesh" ); // create the left wall + entityPtr->setMaterialName( "wall" ); // set material for left wall + entityPtr->setNormaliseNormals( true ); // fix the normals when scaled + + // create the SceneNode for the left wall + SceneNode *nodePtr = sceneManagerPtr->getRootSceneNode()->createChildSceneNode( "WallLeft" ); + nodePtr->attachObject( entityPtr ); // attach left wall to SceneNode + nodePtr->setPosition( -95, 0, 0 ); // set the left wall's position + nodePtr->setScale( .05, 1.45, .1 ); // set the left wall's size + entityPtr = sceneManagerPtr->createEntity( "WallRight", "cube.mesh" ); + entityPtr->setMaterialName( "wall" ); // set material for right wall + entityPtr->setNormaliseNormals( true ); // fix the normals when scaled + + // create the SceneNode for the right wall + nodePtr = sceneManagerPtr->getRootSceneNode()->createChildSceneNode( "WallRight" ); + nodePtr->attachObject( entityPtr ); // attach right wall to SceneNode + nodePtr->setPosition( 95, 0, 0 ); // set the right wall's position + nodePtr->setScale( .05, 1.45, .1 ); // set the right wall's size + entityPtr = sceneManagerPtr->createEntity( "WallBottom", "cube.mesh" ); + entityPtr->setMaterialName( "wall" ); // set material for bottom wall + entityPtr->setNormaliseNormals( true ); // fix the normals when scaled + + // create the SceneNode for the bottom wall + nodePtr = sceneManagerPtr->getRootSceneNode()->createChildSceneNode( "WallBottom" ); + nodePtr->attachObject( entityPtr ); // attach bottom wall to SceneNode + nodePtr->setPosition( 0, -70, 0 ); // set the bottom wall's position + nodePtr->setScale( 1.95, .05, .1 ); // set bottom wall's size + entityPtr = sceneManagerPtr->createEntity( "WallTop", "cube.mesh" ); + entityPtr->setMaterialName( "wall" ); // set the material for wall + entityPtr->setNormaliseNormals( true ); // fix the normals when scaled + + // create the SceneNode for the top wall + nodePtr = sceneManagerPtr->getRootSceneNode()->createChildSceneNode( "WallTop" ); + nodePtr->attachObject( entityPtr ); // attach top wall to SceneNode + nodePtr->setPosition( 0, 70, 0 ); // set the top wall's position + nodePtr->setScale( 1.95, .05, .1 ); // set the top wall's size +} // end function createScene + +// start a game of Pong +void Pong::run() +{ + createScene(); // create the scene + Ogre::WindowEventUtilities::addWindowEventListener(windowPtr, this); + rootPtr->startRendering(); // start rendering frames +} // end function run + +// update the score +void Pong::updateScore( Players player ) +{ + // increase the correct player's score + if ( player == Players::PLAYER1 ) + player1Score++; + else + player2Score++; + + wait = true; // the game should wait to restart the Ball + updateScoreText(); // update the score text on the screen +} // end function updateScore + +// update the score text +void Pong::updateScoreText() +{ + ostringstream scoreText; // text to be displayed + + scoreText << "P2: " << player2Score; // make the text + + // get the right player's TextArea + OverlayElement *textElementPtr = OverlayManager::getSingletonPtr()->getOverlayElement( "right" ); + textElementPtr->setCaption( scoreText.str() ); // set the text + + scoreText.str( "" ); // reset the text in scoreText + scoreText << "P1: " << player1Score; // make the text + + // get the left player's TextArea + textElementPtr = OverlayManager::getSingletonPtr()->getOverlayElement( "left" ); + textElementPtr->setCaption( scoreText.str() ); // set the text +} // end function updateScoreText + +// respond to user keyboard input +bool Pong::keyPressed( const OIS::KeyEvent &keyEventRef ) +{ + // if the game is not paused + if ( !pause ) + { + // process KeyEvents that apply when the game is not paused + switch ( keyEventRef.key ) + { + case OIS::KC_ESCAPE: // escape key hit: quit + quit = true; + break; + case OIS::KC_UP: // up-arrow key hit: move the right Paddle up + paddle[0] = 1; + break; + case OIS::KC_DOWN: // down-arrow key hit: move the right Paddle down + paddle[0] = -1; + break; + case OIS::KC_NUMPAD8: // 8 key hit: move left Paddle up + paddle[1] = 1; + break; + case OIS::KC_NUMPAD2: // 2 key hit: move left Paddle down + paddle[1] = -1; + break; + case OIS::KC_W: // W key hit: rotate board 'up' + break; + case OIS::KC_A: // A key hit: rotate board 'left' + break; + case OIS::KC_S: // S key hit: rorate board 'down' + break; + case OIS::KC_D: // D key hit: rotate board 'right' + break; + case OIS::KC_P: // P key hit: pause the game + pause = true; // set pause to true when the user pauses the game + Overlay *pauseOverlayPtr = OverlayManager::getSingleton().getByName( "PauseOverlay" ); + pauseOverlayPtr->show(); // show the pause Overlay + break; + } // end switch + } // end if + else // game is paused + { + // user hit 'R' on the keyboard + if ( keyEventRef.key == OIS::KC_R ) + { + pause = false; // set pause to false when user resumes the game + Overlay *pauseOverlayPtr = OverlayManager::getSingleton().getByName( "PauseOverlay" ); + pauseOverlayPtr->hide(); // hide the pause Overlay + } // end if + } // end else + return true; +} // end function keyPressed + +// process key released events +bool Pong::keyReleased( const OIS::KeyEvent &keyEventRef ) +{ + switch ( keyEventRef.key ) + { + case OIS::KC_UP: // up-arrow key released, stop moving that direction + if (paddle[0] != -1) // if we're not moving down already + paddle[0] = 0; + break; + case OIS::KC_DOWN: // down-arrow key released, stop moving that direction + if (paddle[0] != 1) // if we're not moving up already + paddle[0] = 0; + break; + case OIS::KC_NUMPAD8: // number pad 8 key released, stop moving that direction + if (paddle[1] != -1) // if we're not moving down already + paddle[1] = 0; + break; + case OIS::KC_NUMPAD2: // number pad 2 key released, stop moving that direction + if (paddle[1] != 1) // if we're not moving up already + paddle[1] = 0; + break; + } + return true; +} // end function keyReleased + +// return true if the program should render the next frame +bool Pong::frameEnded( const FrameEvent &frameEvent ) +{ + WindowEventUtilities::messagePump(); + if(windowPtr->isClosed()) + { + return false; + } + return !quit; // quit = false if the user hasn't quit yet +} // end function frameEnded + +// process game logic, return true if the next frame should be rendered +bool Pong::frameStarted( const FrameEvent &frameEvent ) +{ + keyboardPtr->capture(); // get keyboard events + + + // paddle moving logic + if (paddle[0] != 0) // [0] = left paddle + { + //process + if (paddle[0] < 0) // go down + { + leftPaddlePtr->movePaddle( PADDLE_DOWN ); + } else if (paddle[0] > 0) // go up + { + leftPaddlePtr->movePaddle( PADDLE_UP ); + } + } + if (paddle[1] != 0) // [1] = right paddle + { + //process + if (paddle[1] < 0) // go down + { + rightPaddlePtr->movePaddle( PADDLE_DOWN ); + } else if (paddle[1] > 0) // go up + { + rightPaddlePtr->movePaddle( PADDLE_UP ); + } + } + + + // the game is not paused and the Ball should move + if ( !wait && !pause ) + { + // move the Ball + ballPtr->moveBall( frameEvent.timeSinceLastFrame ); + } // end if + // don't move the Ball if wait is true + else if ( wait ) + { + // increase time if it is less than 4 seconds + if ( time < 4 ) + // add the seconds since the last frame + time += frameEvent.timeSinceLastFrame; + else + { + wait = false; // shouldn't wait to move the Ball any more + time = 0; // reset the control variable to 0 + } // end else + } // end else + + return !quit; // quit = false if the user hasn't quit yet +} // end function frameStarted + + +//Adjust mouse clipping area +void Pong::windowResized(Ogre::RenderWindow* rw) +{ + unsigned int width, height, depth; + int left, top; + rw->getMetrics(width, height, depth, left, top); + + const OIS::MouseState &ms = mousePtr->getMouseState(); + ms.width = width; + ms.height = height; +} + +//Unattach OIS before window shutdown (very important under Linux) +void Pong::windowClosed(Ogre::RenderWindow* rw) +{ + +} + +bool Pong::mousePressed(const OIS::MouseEvent &,OIS::MouseButtonID) +{ + return true; +} +bool Pong::mouseReleased(const OIS::MouseEvent &,OIS::MouseButtonID) +{ + return true; +} +bool Pong::mouseMoved(const OIS::MouseEvent &) +{ + return true; +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Pong.h b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Pong.h new file mode 100644 index 0000000..5605caf --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Pong.h @@ -0,0 +1,80 @@ +// Pong.h +// Pong class definition (represents a game of Pong). +#ifndef PONG_H +#define PONG_H + +#include // Ogre class definition +using namespace Ogre; // use the Ogre namespace + +#include // OISEvents class definition +#include // OISInputManager class definition +#include // OISKeyboard class definition +#include +#include + +class Ball; // forward declaration of class Ball +class Paddle; // forward declaration of class Paddle + +enum Players { PLAYER1, PLAYER2 }; + +class Pong : public FrameListener, public OIS::KeyListener, public Ogre::WindowEventListener, public OIS::MouseListener +{ +public: + Pong(); // constructor + ~Pong(); // destructor + void run(); // run a game of Pong + + // handle keyPressed and keyReleased events + virtual bool keyPressed( const OIS::KeyEvent &keyEventRef ); + virtual bool keyReleased( const OIS::KeyEvent &keyEventRef ); + + // handle mouseMoved, mousePressed, and mouseReleased events + virtual bool mousePressed(const OIS::MouseEvent &,OIS::MouseButtonID); + virtual bool mouseReleased(const OIS::MouseEvent &,OIS::MouseButtonID); + virtual bool mouseMoved(const OIS::MouseEvent &); + + // move the game objects and control interactions between frames + virtual bool frameStarted( const FrameEvent &frameEvent ); + virtual bool frameEnded( const FrameEvent &frameEvent ); + static void updateScore( Players player); // update the score + +private: + void createScene(); // create the scene to be rendered + static void updateScoreText(); // update the score on the screen + + // Ogre objects + Root *rootPtr; // pointer to Ogre's Root object + SceneManager *sceneManagerPtr; // pointer to the SceneManager + RenderWindow *windowPtr; // pointer to RenderWindow to render scene in + Viewport *viewportPtr; // pointer to Viewport, area that a camera sees + Camera *cameraPtr; // pointer to a Camera in the scene + + // OIS input objects + OIS::InputManager *inputManagerPtr; // pointer to the InputManager + OIS::Keyboard *keyboardPtr; // pointer to the Keyboard + OIS::Mouse *mousePtr; // pointer to the mouse + + // Ogre::WindowEventListener + virtual void windowResized(Ogre::RenderWindow* rw); + virtual void windowClosed(Ogre::RenderWindow* rw); + + // game objects + Ball *ballPtr; // pointer to the Ball + Paddle *leftPaddlePtr; // pointer to player 1's Paddle + Paddle *rightPaddlePtr; // pointer to player 2's Paddle + + // variables to control game states + bool quit, pause; // did user quit or pause the game? + Real time; // used to delay the motion of a new Ball + static bool wait; // should the Ball's movement be delayed? + + static int player1Score; // player 1's score + static int player2Score; // player 2's score + + int paddle[2]; + +}; // end class Pong + +#endif // PONG_H + + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/PongMain.cpp b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/PongMain.cpp new file mode 100644 index 0000000..523f587 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/PongMain.cpp @@ -0,0 +1,37 @@ +// PongMain.cpp +// Driver program for the game of Pong +#include + +#include "Pong.h" // Pong class definition + +// If running on Windows, include windows.h and define WinMain function +#if OGRE_PLATFORM==PLATFORM_WIN32 || OGRE_PLATFORM==OGRE_PLATFORM_WIN32 +#define WIN32_LEAN_AND_MEAN +#include "windows.h" + +int WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT ) + +// If not, define normal main function +#else +int main( int argc, char **argv ) +#endif +{ + try + { + Pong game; // create a Pong object + game.run(); // start the Pong game + } // end try + + catch ( std::runtime_error &error ) + { + #if OGRE_PLATFORM==PLATFORM_WIN32 || OGRE_PLATFORM==OGRE_PLATFORM_WIN32 + MessageBoxA( NULL, error.what(), "Exception Thrown!", + MB_OK | MB_ICONERROR | MB_TASKMODAL ); + #else + std::cerr << "Exception Thrown: " << error.what() << std::endl; + #endif + } // end catch + + return 0; +} // end main + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Resource.rc b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Resource.rc new file mode 100644 index 0000000..2160766 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/Resource.rc @@ -0,0 +1,122 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,3,3,7 + PRODUCTVERSION 1,3,3,7 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x2fL +#else + FILEFLAGS 0x2eL +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Pong! 2014 Edition" + VALUE "CompanyName", "Copyright Amrit Panesar 2014" + VALUE "FileDescription", "Pong - a 2 bit game on a 32 bit computer" + VALUE "FileVersion", "1, 3, 3, 7" + VALUE "InternalName", "Pong" + VALUE "LegalCopyright", "Copyright Amrit Panesar (C) 2014" + VALUE "LegalTrademarks", "Amrit Panesar" + VALUE "OriginalFilename", "Pong.exe" + VALUE "PrivateBuild", "This build is far from private" + VALUE "ProductName", "Pong!" + VALUE "ProductVersion", "1, 3, 3, 7" + VALUE "SpecialBuild", "All my builds are special" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// PNG +// + +IDB_PNG1 PNG "C:\\Users\\77260\\Downloads\\pong.png" + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "C:\\Users\\77260\\Downloads\\pong.ico" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/ogre.cfg b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/ogre.cfg new file mode 100644 index 0000000..cae45f9 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/ogre.cfg @@ -0,0 +1,19 @@ +Render System=OpenGL Rendering Subsystem + +[Direct3D9 Rendering Subsystem] +Allow NVPerfHUD=No +Anti aliasing=None +Floating-point mode=Fastest +Full Screen=Yes +Rendering Device=NVIDIA GeForce GTX 460 +VSync=No +Video Mode=1280 x 1024 @ 32-bit colour + +[OpenGL Rendering Subsystem] +Colour Depth=32 +Display Frequency=N/A +FSAA=16 +Full Screen=No +RTT Preferred Mode=PBuffer +VSync=Yes +Video Mode=1024 x 768 diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resource.h b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resource.h new file mode 100644 index 0000000..2771acf --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Resource.rc +// +#define IDB_PNG1 101 +#define IDI_ICON1 102 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 103 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources.cfg b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources.cfg new file mode 100644 index 0000000..6231bd4 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources.cfg @@ -0,0 +1,24 @@ +# Resource locations to be added to the 'boostrap' path +# This also contains the minimum you need to use the Ogre example framework +[Bootstrap] +FileSystem=resources +Zip=../../media/packs/OgreCore.zip + +# Resource locations to be added to the default path +[General] +FileSystem=../../media +FileSystem=../../media/fonts +FileSystem=../../media/materials/programs +FileSystem=../../media/materials/scripts +FileSystem=../../media/materials/textures +FileSystem=../../media/models +FileSystem=../../media/overlays +FileSystem=../../media/particle +FileSystem=../../media/gui +FileSystem=../../media/DeferredShadingMedia +Zip=../../media/packs/cubemap.zip +Zip=../../media/packs/cubemapsJS.zip +Zip=../../media/packs/dragon.zip +Zip=../../media/packs/fresneldemo.zip +Zip=../../media/packs/ogretestmap.zip +Zip=../../media/packs/skybox.zip \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/BlueBold.fontdef b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/BlueBold.fontdef new file mode 100644 index 0000000..5d4a2a3 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/BlueBold.fontdef @@ -0,0 +1,15 @@ +// define the BlueBold font +BlueBold +{ + // define the font type + type truetype + + // set the source file for the font + source bluebold.ttf + + // set the font size + size 16 + + // set the font resolution (96 is standard) + resolution 96 +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/MenuMaterial.material b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/MenuMaterial.material new file mode 100644 index 0000000..563e419 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/MenuMaterial.material @@ -0,0 +1,12 @@ +// menu material definition +material menu +{ + technique + { + pass + { + ambient 1.0 1.0 1.0 + diffuse 1.0 1.0 1.0 + } + } +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/MenuOverlay.overlay b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/MenuOverlay.overlay new file mode 100644 index 0000000..eb2e7b1 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/MenuOverlay.overlay @@ -0,0 +1,167 @@ +// An Overlay to display an options menu +MenuOverlay +{ + // set a high z-order to display on top of everything + zorder 600 + + // the root container for the menu items + container Panel(rootPanel) + { + material menu + + // text for the root Panel + element TextArea(instructionsText) + { + // position the text toward the bottom center of the screen + top 0.8 + left 0.2 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Press Enter to start or Esc to exit + } + // end of instructionsText + + // container for the Ball options + container Panel(ballPanel) + { + // position the container toward the left side of the screen + top 0.1 + left 0.1 + width 0.3 + height 0.5 + + // TextAreas to display Ball options + + element TextArea(ballOptionsTitle) + { + // position and size the TextArea + height 0.1 + left 0.05 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Ball Options + } + // end of ballOptionsTitle + + element TextArea(ballSlow) + { + // position and size the text + top 0.2 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Slow Ball (Press A) + } + // end of ballSlow + + element TextArea(ballMedium) + { + // position and size the text + top 0.3 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Medium Ball (Press B) + } + // end of ballMedium + + element TextArea(ballFast) + { + // position and size the text + top 0.4 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Fast Ball (Press C) + } + // end of ballFast + } + // end of ballPanel + + // container for the Paddle options + container Panel(paddlePanel) + { + // position the container toward the right side of the screen + top 0.1 + left 0.5 + width 0.3 + height 0.5 + + // TextAreas to display Paddle options + + element TextArea(paddleOptionsTitle) + { + // position and size the text + height 0.1 + left 0.05 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Paddle Options + } + // end of paddleOptionsTitle + + element TextArea(paddleSlow) + { + // position and size the text + top 0.2 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Slow Paddles (Press 1) + } + // end of paddleSlow + + element TextArea(paddleMedium) + { + // position and size the text + top 0.3 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Medium Paddles (Press 2) + } + // end of paddleMedium + + element TextArea(paddleFast) + { + // position and size the text + top 0.4 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1 1 1 + caption Fast Paddles (Press 3) + } + // end of paddleFast + } + // end of paddlePanel + } + // end of rootPanel +} +// end of MenuOverlay \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongMaterials.material b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongMaterials.material new file mode 100644 index 0000000..e8b07be --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongMaterials.material @@ -0,0 +1,51 @@ +// ball material definition +material ball +{ + // define one technique for rendering the Ball + technique + { + // render the Ball in one pass + pass + { + // color the Ball White + ambient 1 1 1 + diffuse 1 1 1 + specular 1 1 1 255 + } + } +} + +// paddle material definition +material paddle +{ + // define one technique for rendering a Paddle + technique + { + // render a Paddle in one pass + pass + { + // color the Paddle white + ambient 1 1 1 + diffuse 1 1 1 + specular 1 1 1 255 + } + } +} + +// wall material definition +material wall +{ + // define one technique for rendering a wall + technique + { + // render a wall in one pass + pass + { + // color the wall cyan + ambient 0 0 0 + diffuse 0 0 0 + specular 0 0 0 255 + } + } +} + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongOverlays.overlay b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongOverlays.overlay new file mode 100644 index 0000000..db29b8d --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongOverlays.overlay @@ -0,0 +1,146 @@ +// An Overlay to display the score +Score +{ + // set a high z-order, displays on top of anything with lower z-order + zorder 500 + + // create a PanelOverlayElement container to hold the text areas + container Panel(ScorePanel) + { + // use relative metrics mode to position this container at the + // top-left corner of the screen + metrics_mode relative + left 0.0 + top 0.0 + + // make it 1/10 the height and the full width of the screen + width 1.0 + height .1 + + // create a TextAreaOverlayElement to display player 1's score + element TextArea(left) + { + // position and size the element relative to the container + metrics_mode relative + + // position it at the top of the container 5% from the left and + // make it the same height and half as long as the container + left 0.05 + top 0.0 + width 0.5 + height 1.0 + + // set font use for caption and set the size and color + font_name PongScore + char_height .05 + colour 1 1 1 + caption P1: 0 + } + // create a TextAreaOverlayElement to display player 2's score + element TextArea(right) + { + // position and size the element relative to the container + metrics_mode relative + + // position it at the top of the container 69% from the left and + // make it the same height as the container, stretch to the end + left 0.69 + top 0.0 + width 0.5 + height 1.0 + + + // set font use for caption and set the size and color + font_name PongScore + char_height 0.05 + colour 1 1 1 + caption P2: 0 + } + } +} + +// An Overlay to display "Game Paused" when the player pauses the game +PauseOverlay +{ + // set a high z-order, displays on top of anything with lower z-order + zorder 500 + + // create a PanelOverlayElement container to hold the text area + container Panel(Pause) + { + // use relative metrics mode to position and size this container + metrics_mode relative + + // place the container at the top-left corner of the window + left 0.0 + top 0.0 + + // make the container the same size as the window + width 1.0 + height 1.0 + + // create a TextAreaOverlayElement to display the text + element TextArea(pauseText) + { + // position and size the element relative to its container + metrics_mode relative + + // center it vertically in the container + vert_align center + + // put the left corner 4/10 from the left of the container and + // make it 2/10 the width of the container and 1/10 the height + left 0.4 + width 0.2 + height 0.1 + + // set font use for caption and set the size and color + font_name PongText + char_height 0.05 + colour 1 1 1 + caption Game Paused (Press R to Continue) + } + } +} + +// An Overlay to display which player won the game +WinnerOverlay +{ + // set a high z-order, displays on top of anything with lower z-order + zorder 500 + + // create a PanelOverlayElement container to hold the text area + container Panel(Winner) + { + // use relative metrics mode to position and size this container + metrics_mode relative + + // place the container at the top-left corner of the window + left 0.0 + top 0.0 + + // make the container the same size as the window + width 1.0 + height 1.0 + + // create a TextAreaOverlayElement to display the text + element TextArea(winnerText) + { + // position and size the element relative to its container + metrics_mode relative + + // put the left corner 4/10 from the left of the container and + // make it 2/10 the width of the container and 1/10 the height + left 0.4 + top 0.3 + width 0.2 + height 0.1 + + // set font use for caption and set the size and color + font_name PongText + char_height 0.05 + colour 1 1 1 + } + } +} + diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongScore.fontdef b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongScore.fontdef new file mode 100644 index 0000000..6f7da16 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongScore.fontdef @@ -0,0 +1,15 @@ +// define the PongScore font +PongScore +{ + // define the font type + type truetype + + // set the source file for the font + source PongScore.ttf + + // set the font size + size 16 + + // set the font resolution (96 is standard) + resolution 96 +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongScore.ttf b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongScore.ttf new file mode 100644 index 0000000..809c6eb Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongScore.ttf differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongText.fontdef b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongText.fontdef new file mode 100644 index 0000000..1c0ae93 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongText.fontdef @@ -0,0 +1,15 @@ +// define the PongText font +PongText +{ + // define the font type + type truetype + + // set the source file for the font + source PongText.ttf + + // set the font size + size 16 + + // set the font resolution (96 is standard) + resolution 96 +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongText.ttf b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongText.ttf new file mode 100644 index 0000000..f8f4b3e Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/PongText.ttf differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/bluebold.ttf b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/bluebold.ttf new file mode 100644 index 0000000..ce5d904 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/bluebold.ttf differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/boing.wav b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/boing.wav new file mode 100644 index 0000000..577d6fd Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/boing.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/boing1.wav b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/boing1.wav new file mode 100644 index 0000000..5706556 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/boing1.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/cheer.wav b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/cheer.wav new file mode 100644 index 0000000..4d75603 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/cheer.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/cube.mesh b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/cube.mesh new file mode 100644 index 0000000..cf7dc84 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/cube.mesh differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/paddleSound.wav b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/paddleSound.wav new file mode 100644 index 0000000..5706556 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/paddleSound.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/sphere.mesh b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/sphere.mesh new file mode 100644 index 0000000..286317e Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/sphere.mesh differ diff --git a/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/wallSound.wav b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/wallSound.wav new file mode 100644 index 0000000..577d6fd Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/Ogre Project/resources/wallSound.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/BlueBold.fontdef b/SDrive/programs/Mod11/Com203/Pong/PongResources/BlueBold.fontdef new file mode 100644 index 0000000..5d4a2a3 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/PongResources/BlueBold.fontdef @@ -0,0 +1,15 @@ +// define the BlueBold font +BlueBold +{ + // define the font type + type truetype + + // set the source file for the font + source bluebold.ttf + + // set the font size + size 16 + + // set the font resolution (96 is standard) + resolution 96 +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/MenuMaterial.material b/SDrive/programs/Mod11/Com203/Pong/PongResources/MenuMaterial.material new file mode 100644 index 0000000..563e419 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/PongResources/MenuMaterial.material @@ -0,0 +1,12 @@ +// menu material definition +material menu +{ + technique + { + pass + { + ambient 1.0 1.0 1.0 + diffuse 1.0 1.0 1.0 + } + } +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/MenuOverlay.overlay b/SDrive/programs/Mod11/Com203/Pong/PongResources/MenuOverlay.overlay new file mode 100644 index 0000000..6d14c34 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/PongResources/MenuOverlay.overlay @@ -0,0 +1,167 @@ +// An Overlay to display an options menu +MenuOverlay +{ + // set a high z-order to display on top of everything + zorder 600 + + // the root container for the menu items + container Panel(rootPanel) + { + material menu + + // text for the root Panel + element TextArea(instructionsText) + { + // position the text toward the bottom center of the screen + top 0.8 + left 0.2 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 0 0 0 + caption Press Enter to start or Esc to exit + } + // end of instructionsText + + // container for the Ball options + container Panel(ballPanel) + { + // position the container toward the left side of the screen + top 0.1 + left 0.1 + width 0.3 + height 0.5 + + // TextAreas to display Ball options + + element TextArea(ballOptionsTitle) + { + // position and size the TextArea + height 0.1 + left 0.05 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 0 0 0 + caption Ball Options + } + // end of ballOptionsTitle + + element TextArea(ballSlow) + { + // position and size the text + top 0.2 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 0 0 0 + caption Slow Ball (Press A) + } + // end of ballSlow + + element TextArea(ballMedium) + { + // position and size the text + top 0.3 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1.0 0 0 + caption Medium Ball (Press B) + } + // end of ballMedium + + element TextArea(ballFast) + { + // position and size the text + top 0.4 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 0 0 0 + caption Fast Ball (Press C) + } + // end of ballFast + } + // end of ballPanel + + // container for the Paddle options + container Panel(paddlePanel) + { + // position the container toward the right side of the screen + top 0.1 + left 0.5 + width 0.3 + height 0.5 + + // TextAreas to display Paddle options + + element TextArea(paddleOptionsTitle) + { + // position and size the text + height 0.1 + left 0.05 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 0 0 0 + caption Paddle Options + } + // end of paddleOptionsTitle + + element TextArea(paddleSlow) + { + // position and size the text + top 0.2 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 0 0 0 + caption Slow Paddles (Press 1) + } + // end of paddleSlow + + element TextArea(paddleMedium) + { + // position and size the text + top 0.3 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 0 0 1.0 + caption Medium Paddles (Press 2) + } + // end of paddleMedium + + element TextArea(paddleFast) + { + // position and size the text + top 0.4 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 0 0 0 + caption Fast Paddles (Press 3) + } + // end of paddleFast + } + // end of paddlePanel + } + // end of rootPanel +} +// end of MenuOverlay \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/PongMaterials.material b/SDrive/programs/Mod11/Com203/Pong/PongResources/PongMaterials.material new file mode 100644 index 0000000..fd154c7 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/PongResources/PongMaterials.material @@ -0,0 +1,51 @@ +// ball material definition +material ball +{ + // define one technique for rendering the Ball + technique + { + // render the Ball in one pass + pass + { + // color the Ball violet + ambient 0.58 0 0.827 + diffuse 0.58 0 0.827 + specular 0.58 0 0.827 120 + } + } +} + +// paddle material definition +material paddle +{ + // define one technique for rendering a Paddle + technique + { + // render a Paddle in one pass + pass + { + // color the Paddle dark orange + ambient 1 0.549 0 + diffuse 1 0.549 0 + specular 1 0.549 0 120 + } + } +} + +// wall material definition +material wall +{ + // define one technique for rendering a wall + technique + { + // render a wall in one pass + pass + { + // color the wall cyan + ambient 0 0.545 0.545 + diffuse 0 0.545 0.545 + specular 0 0.545 0.545 120 + } + } +} + diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/PongOverlays.overlay b/SDrive/programs/Mod11/Com203/Pong/PongResources/PongOverlays.overlay new file mode 100644 index 0000000..d81d70a --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Pong/PongResources/PongOverlays.overlay @@ -0,0 +1,146 @@ +// An Overlay to display the score +Score +{ + // set a high z-order, displays on top of anything with lower z-order + zorder 500 + + // create a PanelOverlayElement container to hold the text areas + container Panel(ScorePanel) + { + // use relative metrics mode to position this container at the + // top-left corner of the screen + metrics_mode relative + left 0.0 + top 0.0 + + // make it 1/10 the height and the full width of the screen + width 1.0 + height .1 + + // create a TextAreaOverlayElement to display player 1's score + element TextArea(left) + { + // position and size the element relative to the container + metrics_mode relative + + // position it at the top of the container 5% from the left and + // make it the same height and half as long as the container + left 0.05 + top 0.0 + width 0.5 + height 1.0 + + // set font use for caption and set the size and color + font_name BlueBold + char_height .05 + colour 1.0 0 0 + caption Player 1 Score: 0 + } + // create a TextAreaOverlayElement to display player 2's score + element TextArea(right) + { + // position and size the element relative to the container + metrics_mode relative + + // position it at the top of the container 69% from the left and + // make it the same height as the container, stretch to the end + left 0.69 + top 0.0 + width 0.5 + height 1.0 + + + // set font use for caption and set the size and color + font_name BlueBold + char_height 0.05 + colour 1.0 0 0 + caption Player 2 Score: 0 + } + } +} + +// An Overlay to display "Game Paused" when the player pauses the game +PauseOverlay +{ + // set a high z-order, displays on top of anything with lower z-order + zorder 500 + + // create a PanelOverlayElement container to hold the text area + container Panel(Pause) + { + // use relative metrics mode to position and size this container + metrics_mode relative + + // place the container at the top-left corner of the window + left 0.0 + top 0.0 + + // make the container the same size as the window + width 1.0 + height 1.0 + + // create a TextAreaOverlayElement to display the text + element TextArea(pauseText) + { + // position and size the element relative to its container + metrics_mode relative + + // center it vertically in the container + vert_align center + + // put the left corner 4/10 from the left of the container and + // make it 2/10 the width of the container and 1/10 the height + left 0.4 + width 0.2 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height 0.05 + colour 0 0 0 + caption Game Paused + } + } +} + +// An Overlay to display which player won the game +WinnerOverlay +{ + // set a high z-order, displays on top of anything with lower z-order + zorder 500 + + // create a PanelOverlayElement container to hold the text area + container Panel(Winner) + { + // use relative metrics mode to position and size this container + metrics_mode relative + + // place the container at the top-left corner of the window + left 0.0 + top 0.0 + + // make the container the same size as the window + width 1.0 + height 1.0 + + // create a TextAreaOverlayElement to display the text + element TextArea(winnerText) + { + // position and size the element relative to its container + metrics_mode relative + + // put the left corner 4/10 from the left of the container and + // make it 2/10 the width of the container and 1/10 the height + left 0.4 + top 0.3 + width 0.2 + height 0.1 + + // set font use for caption and set the size and color + font_name BlueBold + char_height 0.05 + colour 0 0 0 + } + } +} + diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/bluebold.ttf b/SDrive/programs/Mod11/Com203/Pong/PongResources/bluebold.ttf new file mode 100644 index 0000000..ce5d904 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/PongResources/bluebold.ttf differ diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/boing.wav b/SDrive/programs/Mod11/Com203/Pong/PongResources/boing.wav new file mode 100644 index 0000000..577d6fd Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/PongResources/boing.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/boing1.wav b/SDrive/programs/Mod11/Com203/Pong/PongResources/boing1.wav new file mode 100644 index 0000000..5706556 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/PongResources/boing1.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/cheer.wav b/SDrive/programs/Mod11/Com203/Pong/PongResources/cheer.wav new file mode 100644 index 0000000..4d75603 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/PongResources/cheer.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/cube.mesh b/SDrive/programs/Mod11/Com203/Pong/PongResources/cube.mesh new file mode 100644 index 0000000..cf7dc84 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/PongResources/cube.mesh differ diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/paddleSound.wav b/SDrive/programs/Mod11/Com203/Pong/PongResources/paddleSound.wav new file mode 100644 index 0000000..5706556 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/PongResources/paddleSound.wav differ diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/sphere.mesh b/SDrive/programs/Mod11/Com203/Pong/PongResources/sphere.mesh new file mode 100644 index 0000000..286317e Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/PongResources/sphere.mesh differ diff --git a/SDrive/programs/Mod11/Com203/Pong/PongResources/wallSound.wav b/SDrive/programs/Mod11/Com203/Pong/PongResources/wallSound.wav new file mode 100644 index 0000000..577d6fd Binary files /dev/null and b/SDrive/programs/Mod11/Com203/Pong/PongResources/wallSound.wav differ diff --git a/SDrive/programs/Mod11/Com203/Project1/Project1.sln b/SDrive/programs/Mod11/Com203/Project1/Project1.sln new file mode 100644 index 0000000..43df569 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Project1/Project1.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project1", "Project1\Project1.vcxproj", "{28F4A708-4627-43EF-B148-DDA0ACBDBBC9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {28F4A708-4627-43EF-B148-DDA0ACBDBBC9}.Debug|Win32.ActiveCfg = Debug|Win32 + {28F4A708-4627-43EF-B148-DDA0ACBDBBC9}.Debug|Win32.Build.0 = Debug|Win32 + {28F4A708-4627-43EF-B148-DDA0ACBDBBC9}.Release|Win32.ActiveCfg = Release|Win32 + {28F4A708-4627-43EF-B148-DDA0ACBDBBC9}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/programs/Mod11/Com203/Project1/Project1/Player.cpp b/SDrive/programs/Mod11/Com203/Project1/Project1/Player.cpp new file mode 100644 index 0000000..41f89d1 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Project1/Project1/Player.cpp @@ -0,0 +1,67 @@ +#include +#include +#include "Player.h" + +using namespace std; + +Player::Player(int score, int health, string name) +{ + setScore(score); + setHealth(health); + setName(name); +} + +void Player::setScore(int score) +{ + if ( score <= 0 ) + { + score = 0; + } + iScore = score; +} + +int Player::getScore() +{ + if ( iScore <= 0 ) + { + iScore = 0; + } + return iScore; +} + +void Player::setHealth(int health) +{ + if ( health >= 0 && health <= 100 ) + { + iHealth = health; + } +} + +int Player::getHealth() +{ + if ( iHealth <= 0 ) + { + iHealth = 0; + } + if ( iHealth >= 100 ) + { + iHealth = 100; + } + return iHealth; +} + +void Player::setName(string name) +{ + sName = name; +} + +string Player::getName() +{ + return sName; +} + +void Player::display() +{ + cout << "\tScore: " << getScore() << endl; + cout << "\tHealth: " << getHealth() << endl; +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Project1/Project1/Player.h b/SDrive/programs/Mod11/Com203/Project1/Project1/Player.h new file mode 100644 index 0000000..6a71e4a --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Project1/Project1/Player.h @@ -0,0 +1,23 @@ +#include + +using namespace std; + +class Player { + +private: + int iScore; + int iHealth; + string sName; +public: + Player(int score, int health, string name); + void setScore(int score); + int getScore(); + + void setHealth(int health); + int getHealth(); + + string getName(); + void setName(string Name); + + void display(); +}; diff --git a/SDrive/programs/Mod11/Com203/Project1/Project1/Project1.vcxproj b/SDrive/programs/Mod11/Com203/Project1/Project1/Project1.vcxproj new file mode 100644 index 0000000..2002666 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Project1/Project1/Project1.vcxproj @@ -0,0 +1,72 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {28F4A708-4627-43EF-B148-DDA0ACBDBBC9} + Project1 + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + + + true + + + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Project1/Project1/Project1.vcxproj.filters b/SDrive/programs/Mod11/Com203/Project1/Project1/Project1.vcxproj.filters new file mode 100644 index 0000000..462d8c6 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Project1/Project1/Project1.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/Project1/Project1/main.cpp b/SDrive/programs/Mod11/Com203/Project1/Project1/main.cpp new file mode 100644 index 0000000..aa3d66e --- /dev/null +++ b/SDrive/programs/Mod11/Com203/Project1/Project1/main.cpp @@ -0,0 +1,87 @@ +/***************************************************************************** + * Program: player * + * Author: Amrit Panesar * + * Date: 08/04/2014 * + * Description: Setup, instantiate, and access player functions * + *****************************************************************************/ + +#include +#include +#include +#include +#include "Player.h" + +using namespace std; + +bool pause(); + +int main(const char* argv, int argc) +{ + + srand((unsigned int) time(NULL)); + + string in; + char choice; + + while (true) + { + cout << "What would you like your player to be named?" << endl << ":"; + cin >> in; + + while (true) { + cout << "You want to name your player " << in << ". Is that correct?" << endl << ":[Y/n] "; + int i = getch(); + if ((char)i == 'y' || (char)i == 'Y' || (char)i == 'n' || (char)i == 'N' ) + { + choice = i; + break; + } + cout << "Please enter either Y or N" << endl << ":[Y/n] "; + } + if (choice == 'Y' || choice == 'y' || choice == 'n' || choice == 'N') + break; + } + + while (choice == 'Y' || choice == 'y') + { + Player p1((((rand()%509)*(rand()%349))%101), (((rand()%509)*(rand()%349))%101), in); + cout << p1.getName() << " recieved " << p1.getScore() << " points with " << p1.getHealth() << " points of health!" << endl << endl; + + while (true) + { + while (true) { + cout << "Would you like to play again? " << endl << ":[Y/n] "; + int i = getch(); + if ((char)i == 'y' || (char)i == 'Y' || (char)i == 'n' || (char)i == 'N' ) + { + choice = i; + break; + } + cout << "Please enter either Y or N" << endl; + } + if (choice == 'Y' || choice == 'y' || choice == 'n' || choice == 'N') + break; + } + cout << endl; + if (choice == 'n' || choice == 'N') + { + break; + } + } + pause(); +} + +bool pause() +{ + enum { NUL = 0, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, + LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, + SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, DEL = 127 }; + + cout << "Press any key to continue..." << endl << endl; + int i = getch(); + if ( i == ETX || i == ESC ) // control + c || escape + { + return true; + } + return false; +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe.sln b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe.sln new file mode 100644 index 0000000..443d019 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TicTacToe", "TicTacToe\TicTacToe.vcxproj", "{24EA466B-50AD-4F6D-85B6-FE99AA7ADC3E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {24EA466B-50AD-4F6D-85B6-FE99AA7ADC3E}.Debug|Win32.ActiveCfg = Debug|Win32 + {24EA466B-50AD-4F6D-85B6-FE99AA7ADC3E}.Debug|Win32.Build.0 = Debug|Win32 + {24EA466B-50AD-4F6D-85B6-FE99AA7ADC3E}.Release|Win32.ActiveCfg = Release|Win32 + {24EA466B-50AD-4F6D-85B6-FE99AA7ADC3E}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.ico b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.ico new file mode 100644 index 0000000..d84f642 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.ico differ diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.png b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.png new file mode 100644 index 0000000..996d780 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.png differ diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.xcf b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.xcf new file mode 100644 index 0000000..86122ed Binary files /dev/null and b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Icon.xcf differ diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Main.cpp b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Main.cpp new file mode 100644 index 0000000..f67be94 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Main.cpp @@ -0,0 +1,148 @@ +/****************************************************************************** + * Project Two: Tic-Tac-Toe * + * Author: Amrit Panesar * + * Date: 08/20/2014 * + * License: Released into the Public Domain * + *****************************************************************************/ + +#include "includes.h" +#include "main.h" + +int _tmain(int argc, _TCHAR* argv[]) +{ + ConsoleSetup("Tic-Tac-Toe"); + + string name = ""; + while (name.length() == 0) + { + cout << "Please enter your name" << endl << ": "; + cin >> name; + bool breakin = false; + while (!breakin) + { + cout << "Your name is: "<< name << endl << "Is this correct? " << endl << "[Y/n]: "; + int in = _getch(); + cout << (char)in << endl; + switch (toupper(in)) + { + case 'Y': + breakin = true; + break; + + case 'N': + breakin = true; + name = ""; + break; + } + system("cls"); + } + } + + char player = ' '; + while (player == ' ') + { + cout << "Please enter one character for your board marker" << endl << ": "; + player = _getch(); + cout << player << endl; + bool breakin = false; + while (!breakin) + { + cout << "Your marker is: "<< player << endl << "Is this correct? " << endl << "[Y/n]: "; + int in = _getch(); + cout << (char)in << endl; + switch (toupper(in)) + { + case 'Y': + breakin = true; + break; + + case 'N': + breakin = true; + player = ' '; + break; + } + system("cls"); + } + } + + char computer = ' '; + if (player == 'X') + computer = 'O'; + else + computer = 'X'; + + TicTacToe t = TicTacToe(name, player, computer); + + while (true) + { + t.run(); + cout << "Would you like to play again?" << endl << "[Y/n]: "; + char hold = toupper(_getch()); + cout << hold << endl; + if (hold == 'Y' || hold == 'N' || hold == LF || hold == ESC) + { + if (hold == 'N' || hold == ESC) + break; + } + else + { + cout << "Please enter either Y or N." << endl; + continue; + } + } + + cout << "Game Over." << endl << endl; + cout << "Press any key to continue..." << endl; + _getch(); + +} + +void ConsoleSetup(char* input) +{ + system("color 1e"); + + ChangeConsoleIcon(IDI_ICON1); + ChangeConsoleTitle(input); + cout << string(80,'*') << "Welcome to " << input << " " << GetYear() << " Edition!" << endl << string(80,'*') << endl << endl; +} + +void ChangeConsoleTitle (const char* input) +{ + time_t t = time(NULL); + tm* timePtr = localtime(&t); + TCHAR szNewTitle[MAX_PATH]; + + StringCchPrintf(szNewTitle, MAX_PATH, TEXT("%s %d"), input, GetYear()); + SetConsoleTitle(szNewTitle); +} + +void ChangeConsoleIcon (const int resource_number) +{ + HMODULE hMainMod = GetModuleHandle(0); + assert (hMainMod); + + HICON hMainIcon = ::LoadIcon(hMainMod, MAKEINTRESOURCE(resource_number)); + assert (hMainIcon); + + // Load kernel 32 library + HMODULE hMod = LoadLibrary( _T( "Kernel32.dll" )); + assert (hMod); + + // Load console icon changing procedure + typedef DWORD (__stdcall *SCI)(HICON); + SCI pfnSetConsoleIcon = reinterpret_cast(GetProcAddress(hMod, "SetConsoleIcon")); + assert (pfnSetConsoleIcon); + + // Call function to change icon + pfnSetConsoleIcon (hMainIcon); + + FreeLibrary (hMod); +}// End ChangeIcon + +int GetYear() +{ + time_t t = time(NULL); + tm* timePtr = localtime(&t); + + return timePtr->tm_year + 1900; +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Resource.rc b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Resource.rc new file mode 100644 index 0000000..e6584ec Binary files /dev/null and b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/Resource.rc differ diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.cpp b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.cpp new file mode 100644 index 0000000..da48728 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.cpp @@ -0,0 +1,522 @@ + +#include "includes.h" + +int TicTacToe::easyMoves[] = { 4, 0, 2, 6, 8, 1, 3, 5, 7 }; + +enum { NUL = 0, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, + LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, + SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, DEL = 127 }; + +TicTacToe::TicTacToe(string playername, char playerchar, char computerchar) +{ + setplayername(playername); + sethuman(playerchar); + setcomputer(computerchar); + + initboard(); + initwins(); + instructionsdisplayed = false; +} + +void TicTacToe::initwins() +{ + wins = vector< vector >(8, vector(3)); + // diagonal + wins[0][0] = 0; + wins[0][1] = 4; + wins[0][2] = 8; + + wins[1][0] = 2; + wins[1][1] = 4; + wins[1][2] = 6; + + // down + wins[2][0] = 0; + wins[2][1] = 3; + wins[2][2] = 6; + + wins[3][0] = 1; + wins[3][1] = 4; + wins[3][2] = 7; + + wins[4][0] = 2; + wins[4][1] = 5; + wins[4][2] = 8; + + // across + wins[5][0] = 0; + wins[5][1] = 1; + wins[5][2] = 2; + + wins[6][0] = 3; + wins[6][1] = 4; + wins[6][2] = 5; + + wins[7][0] = 6; + wins[7][1] = 7; + wins[7][2] = 8; +} + +void TicTacToe::initboard() +{ + memset(board,' ',sizeof(char)*9); +} + +void TicTacToe::displayInstructions() +{ + cout << "Instructions: Use your keyboard to type in coordinates to place a " + << endl << "token on the game board. " << endl << endl; + cout << "You are "<< gethuman() << " - the protagonist in the story - you have been chosen by the high " << endl + << "council of Tic-Toe to defeat the evil lord " << getcomputer() << ", played by the computer. " << endl; + cout << "Being the chosen one you are able to place your '" << gethuman() << "'" << endl + << "token first, in an any open space." << endl; + cout << "The computer then places the " << getcomputer() << " token in a free space until " << endl + << "all spaces are filled" << endl; + cout << "You and the computer continue to place tokens in free spaces until the game" << endl + << "board is filled " << endl; + cout << "If all spaces are filled and no winner has been declared then a rematch is " + << endl << "called and the forces of good and evil spar once again." << endl << endl; + system("pause"); + system("cls"); +} + +void TicTacToe::run() +{ + bool iseasy = true; + if (!instructionsdisplayed) + { + displayInstructions(); + instructionsdisplayed = true; + } + initboard(); + while (true) + { + cout << "Would you like to play in Easy mode or Hard mode ?" << endl << "[E/h]:"; + char input; + input = _getch(); + cout << input << endl; + if (toupper(input) == 'E' || input == LF) + { + iseasy = true; + break; + } + else if (toupper(input) == 'H') + { + iseasy = false; + break; + } + else + { + cout << "Invalid selection, please try again." << endl; + } + } + while (true) + { + displayBoard(); + if (stalemate()) + { + cout << "Stale mate!" << endl; + system("pause"); + break; + } + else + { + setiswin(winner()); + if(getiswin()) + { + cout << "Sorry, the computer wins this round." << endl; + system("pause"); + break; + } + getInput(); + } + displayBoard(); + if (stalemate()) + { + cout << "Stale mate!" << endl; + system("pause"); + break; + } + else + { + setiswin(winner()); + if(getiswin()) + { + cout << "Congratulations! A Winner is You!" << endl; + system("pause"); + break; + } + think(iseasy); + } + } +} + +void TicTacToe::think(bool easy) +{ + if (easy) + { + for (int i = 0; i <= 8; i++) + { + if (board[easyMoves[i]] == ' ') + { + board[easyMoves[i]] = getcomputer(); + break; + } + } + } + else // hard think + { + bool movemade = false; + if ( board[4] == ' ' ) // own this. + { + board[4] = getcomputer(); + movemade = true; + return; + } + else + { + int count = 0; + for (int i = 0; i < 9; i++) + { + if (board[i] == getcomputer()) + count++; + //cout << count; + } + bool closerlook = false; + // do we own the middle square? + if ( board[4] == getcomputer() ) + { + // we have more options + closerlook = true; + } + else + { + // special case for: + // ____________ + //A | X | | | + // ------------ + //B | | O | | + // ------------ + //C | | | O | + // ____________ + // 1 2 3 + + if (board[4] == gethuman() && board[8] == gethuman() && board[6] == ' ') + { + board[6] = getcomputer(); + movemade = true; + } + } + if (count >= 1 && !movemade) + { + for (int i = 0; i <= 7; i++) // win/block in one + { + //cout << "hard think pass: " << i << endl; + // defensive think - block before win + if (!movemade && board[wins[i][0]] == gethuman() && board[wins[i][1]] == gethuman() && board[wins[i][2]] == ' ') + { + board[wins[i][2]] = getcomputer(); + movemade = true; + break; + } + if (!movemade && board[wins[i][1]] == gethuman() && board[wins[i][2]] == gethuman() && board[wins[i][0]] == ' ') + { + board[wins[i][0]] = getcomputer(); + movemade = true; + break; + } + if (!movemade && board[wins[i][2]] == gethuman() && board[wins[i][0]] == gethuman() && board[wins[i][1]] == ' ') + { + board[wins[i][1]] = getcomputer(); + movemade = true; + break; + } + //offensive think - seal the win if no blocks can be made? + if (!movemade && board[wins[i][0]] == getcomputer() && board[wins[i][1]] == getcomputer() && board[wins[i][2]] == ' ') + { + board[wins[i][2]] = getcomputer(); + movemade = true; + break; + } + if (!movemade && board[wins[i][1]] == getcomputer() && board[wins[i][2]] == getcomputer() && board[wins[i][0]] == ' ') + { + board[wins[i][0]] = getcomputer(); + movemade = true; + break; + } + if (!movemade && board[wins[i][2]] == getcomputer() && board[wins[i][0]] == getcomputer() && board[wins[i][1]] == ' ') + { + board[wins[i][1]] = getcomputer(); + movemade = true; + break; + } + } + } + if (!movemade) // we still haven't made a move!? win in two? what are we doing? find first open space + { + for (int i = 0; i < 9; i++) + { + if (board[i] == ' ' ) + { + board [i] = getcomputer(); + movemade = true; + break; + } + } + } + } + } +} + +bool TicTacToe::stalemate() +{ + for (int i = 0; i < 9; i++) + { + if (board[i] == ' ') + { + return false; + } + } + return true; +} + +void TicTacToe::displayBoard() +{ + cout << " ____________" << endl; + cout << "A | " << board[0] << " | " << board[1] << " | " << board[2] << " |" << endl; + cout << " ------------" << endl; + cout << "B | " << board[3] << " | " << board[4] << " | " << board[5] << " |" << endl; + cout << " ------------" << endl; + cout << "C | " << board[6] << " | " << board[7] << " | " << board[8] << " |" << endl; + cout << " ____________" << endl; + cout << " 1 2 3 " << endl << endl; +} + +void TicTacToe::getInput() +{ + while (true) + { + cout << "Coordinates" << endl << ">:"; + string input; + cin >> input; + bool isBad = false; + if (isalpha(input[0]) && isdigit(input[1])) + { + if ( toupper(input[0]) > 'C' || toupper(input[0]) < 'A' || input[1]-'0' > 3 || input[1]-'0' < 1 ) + { + isBad = true; + } + else + { + switch (toupper(input[0])) + { + case 'A': + switch (input[1]) + { + case '1': + if (board[0] == ' ') + { + board[0] = gethuman(); + } + else + { + isBad = true; + } + break; + case '2': + if (board[1] == ' ') + { + board[1] = gethuman(); + } + else + { + isBad = true; + } + break; + case '3': + if (board[2] == ' ') + { + board[2] = gethuman(); + } + else + { + isBad = true; + } + break; + } + break; + case 'B': + switch (input[1]) + { + case '1': + if (board[3] == ' ') + { + board[3] = gethuman(); + } + else + { + isBad = true; + } + break; + case '2': + if (board[4] == ' ') + { + board[4] = gethuman(); + } + else + { + isBad = true; + } + break; + case '3': + if (board[5] == ' ') + { + board[5] = gethuman(); + } + else + { + isBad = true; + } + break; + } + break; + case 'C': + switch (input[1]) + { + case '1': + if (board[6] == ' ') + { + board[6] = gethuman(); + } + else + { + isBad = true; + } + break; + case '2': + if (board[7] == ' ') + { + board[7] = gethuman(); + } + else + { + isBad = true; + } + break; + case '3': + if (board[8] == ' ') + { + board[8] = gethuman(); + } + else + { + isBad = true; + } + break; + } + break; + default: + isBad = true; + } + } + if (isBad) + { + cout << "Error: bad coordinates" << endl; + } + else + { + cout << "Input accepted!" << endl; + break; + } + } + else + { + cout << "Error: bad coordinates" << endl; + } + } +} + +bool TicTacToe::winner() +{ + for (int i = 0; i < 2; i++) + { + char whatTest = gethuman(); + if (i == 1) + whatTest = getcomputer(); + for (int j = 0; j < 8; j++) // 8 ways to win + { + int thiswin[3] = { wins[j][0], wins[j][1], wins[j][2] }; + // cout << board[thiswin[0]] << board[thiswin[1]] << board[thiswin[2]] << endl; + if (board[thiswin[0]] == whatTest && board[thiswin[1]] == whatTest && board[thiswin[2]] == whatTest) + return true; + } + } + return false; +} + +bool TicTacToe::isTie() +{ + for (int i = 0; i < boardsize; i++) + { + if (board[i] == ' ') + return true; + } + return false; +} + + +void TicTacToe::setplayername(string playername) +{ + TicTacToe::playername = playername; +} + +string TicTacToe::getplayername() +{ + return TicTacToe::playername; +} + +void TicTacToe::setiswin(bool isWin) +{ + TicTacToe::isWin = isWin; +} +bool TicTacToe::getiswin() +{ + return TicTacToe::isWin; +} + +void TicTacToe::sethuman(char human) +{ + TicTacToe::human = human; +} +char TicTacToe::gethuman() +{ + return TicTacToe::human; +} + +void TicTacToe::setcomputer(char computer) +{ + TicTacToe::computer = computer; +} +char TicTacToe::getcomputer() +{ + return TicTacToe::computer; +} + +void TicTacToe::setboard(char *board) +{ + *TicTacToe::board = *board; +} +char* TicTacToe::getboard() +{ + return board; +} + +void TicTacToe::setposition(int position) +{ + TicTacToe::position = position; +} +int TicTacToe::getposition() +{ + return TicTacToe::position; +} + diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.h b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.h new file mode 100644 index 0000000..adab80c --- /dev/null +++ b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.h @@ -0,0 +1,55 @@ + +#include "includes.h" + +#pragma once +#define boardsize 9 +class TicTacToe +{ +private: + string playername; + bool isWin; + bool instructionsdisplayed; + char human; + char computer; + char board[boardsize]; + int position; + + /* + 0 | 1 | 2 + 3 | 4 | 5 + 6 | 7 | 8 + */ + vector< vector > wins; + static int easyMoves[]; + +public: + TicTacToe(string playername, char playerchar, char computerchar); + void displayInstructions(); + void run(); + void displayBoard(); + bool winner(); + bool isTie(); + void getInput(); + void initboard(); + bool stalemate(); + void think(bool iseasy); + + void setplayername(string playername); + string getplayername(); + + void setiswin(bool isWin); + bool getiswin(); + + void sethuman(char human); + char gethuman(); + + void setcomputer(char computer); + char getcomputer(); + + void setboard(char* board); + char* getboard(); + + void setposition(int position); + int getposition(); + void initwins(); +}; \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.vcxproj b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.vcxproj new file mode 100644 index 0000000..e214bf2 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.vcxproj @@ -0,0 +1,84 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {24EA466B-50AD-4F6D-85B6-FE99AA7ADC3E} + TicTacToe + + + + Application + true + v110 + MultiByte + + + Application + false + v110 + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + + + true + + + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.vcxproj.filters b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.vcxproj.filters new file mode 100644 index 0000000..fbe90aa --- /dev/null +++ b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/TicTacToe.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/includes.h b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/includes.h new file mode 100644 index 0000000..5bae432 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/includes.h @@ -0,0 +1,22 @@ +#pragma once + +using namespace std; + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "resource.h" +#include "TicTacToe.h" + + +#define WIN32_LEAN_AND_MEAN \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/main.h b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/main.h new file mode 100644 index 0000000..237a518 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/main.h @@ -0,0 +1,13 @@ + + +void ChangeConsoleTitle (const char* input); + +void ChangeConsoleIcon (int resource_number); + +void ConsoleSetup (char* input); + +int GetYear(); + +enum { NUL = 0, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, + LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, + SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, DEL = 127 }; \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/resource.h b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/resource.h new file mode 100644 index 0000000..f37cc29 Binary files /dev/null and b/SDrive/programs/Mod11/Com203/TicTacToe/TicTacToe/resource.h differ diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project.sln b/SDrive/programs/Mod11/Com203/midterm project/midterm project.sln new file mode 100644 index 0000000..2d6f67e --- /dev/null +++ b/SDrive/programs/Mod11/Com203/midterm project/midterm project.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "midterm project", "midterm project\midterm project.vcxproj", "{6959F7E3-8A71-4526-A093-07AF450CF3B8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6959F7E3-8A71-4526-A093-07AF450CF3B8}.Debug|Win32.ActiveCfg = Debug|Win32 + {6959F7E3-8A71-4526-A093-07AF450CF3B8}.Debug|Win32.Build.0 = Debug|Win32 + {6959F7E3-8A71-4526-A093-07AF450CF3B8}.Release|Win32.ActiveCfg = Release|Win32 + {6959F7E3-8A71-4526-A093-07AF450CF3B8}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/Resource.rc b/SDrive/programs/Mod11/Com203/midterm project/midterm project/Resource.rc new file mode 100644 index 0000000..19eb4bb Binary files /dev/null and b/SDrive/programs/Mod11/Com203/midterm project/midterm project/Resource.rc differ diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/account.cpp b/SDrive/programs/Mod11/Com203/midterm project/midterm project/account.cpp new file mode 100644 index 0000000..6093f2e --- /dev/null +++ b/SDrive/programs/Mod11/Com203/midterm project/midterm project/account.cpp @@ -0,0 +1,260 @@ +/*************************************************************** + * Project: COM 203 Midterm + * Author: Amrit Panesar + * Date: 09/04/2014 + **************************************************************/ + +/***************************************************************** +Account Class (A bank account class with methods to deposit, withdraw, and check the balance.) (5 points) +1. Class contains 3 private data members called accountBalance, accountName and accountNum. + Choose appropriate data types for these variables + +2. Write an overloaded constructor that takes one parameter of the type string. + The constructor initializes the accountName with the parameter specified. + The member variables accountBalance and accountNum are assigned some random value (No need to use rand function). + +3. Write appropriate destructor, set, get and display functions. + +4. The class will also contain member functions named menu, withdraw, and deposit + The withdraw function checks to see if balance is sufficient for withdrawal. + If so, decrements balance by amount; if not, prints an appropriate message indicating insufficient funds and displays the current balance. + The deposit function adds deposit amount to balance and displays new balance + The menu function will contain the following menu options: 1. Check Balance, 2. Deposit Amount, 3. Withdraw Amount, 4. Exit. + Use appropriate messages for each option selected and then call the correct function to perform the task. +*****************************************************************/ + +#include "includes.h" +#include "account.h" +#include "main.h" + +account::account(string input) // constructor +{ + setaccountName(input); // use the setter to set the input + //use rand function + setaccountBalance(10000 + rand () % 90000); // use a random total for the account balance + setaccountNum(1000000 + rand () % 9000000); // use a random number for the account number +} + +account::~account() +{ + cout << "destructor called" << endl; + //delete &accountNum; + //delete &accountName; + //delete &accountBalance; +} + +void account::setaccountNum(int input) // setter +{ + accountNum = input; +} +int account::getaccountNum() // getter +{ + return accountNum; +} +string account::getPaddedAccountNum() //utility function +{ + //use the space pad function defined in global scope + //to return a nicely formatted account number + return spacePad(getaccountNum()); +} + +void account::setaccountName(string input) // setter +{ + accountName = input; +} +string account::getaccountName() // getter +{ + return accountName; +} + +void account::setaccountBalance(float input) // setter +{ + accountBalance = input; +} +float account::getaccountBalance() // getter +{ + return accountBalance; +} + +void account::menu() // utility function +{ + // main function that gets called after object initialization + // loop does not end until option 4 is entered. + bool cont = true; + while (cont) + { + cls(); + cout << "Welcome, " << getaccountName() << ". Account Number: " << getaccountNum() << ". Balance: $" << getaccountBalance() << endl << endl; + cout << string(80,'*'); + cout << "| Main Menu |"; + cout << string(80,'*'); + cout << "| 1. Check account balance |"; + cout << "| 2. Deposit amount |"; + cout << "| 3. Withdraw amount |"; + cout << "| 4. Exit |"; + cout << string(80,'*'); + cout << "Please make a selection" << endl << ":"; + char input = 0; + while (input == 0) + { + input = _getch(); + cout << input; + switch (input) + { + case '1': + doAccountBalance(); + break; + case '2': + doDeposit(); + break; + case '3': + doWithdraw(); + break; + case '4': + cont = false; + break; + default: + input = 0; + } + } + } +} + +void account:: balanceform() // utility function +{ + // nicely formats account number and current balance + // is called by all menu options, except quit + cout << endl << endl << endl << endl; + cout << string(8,' ') << "+-----------------------------------------+" << endl; + cout << string(8,' ') << "| Account: " << getPaddedAccountNum() << " |" << endl; + cout << string(8,' ') << "| Current balance: $" << spacePad(getaccountBalance(), 10) << " |" << endl; + cout << string(8,' ') << "+-----------------------------------------+" << endl; + cout << endl << endl << endl << endl << endl; +} +void account::doAccountBalance() // utility function, menu option 1 +{ + // simply displays the account number and balance using balanceform() + cls(); + cout << "Welcome, " << getaccountName() << ". Account Number: " << getaccountNum() << ". Balance: $" << getaccountBalance() << endl << endl; + cout << "Viewing: Account balance" << endl; + balanceform(); + pause(); +} +void account::doWithdraw() // utility function, menu option 2 +{ + // perform a withdrawal + cls(); + cout << "Welcome, " << getaccountName() << ". Account Number: " << getaccountNum() << ". Balance: $" << getaccountBalance() << endl << endl; + cout << "Withdrawal slip" << endl; + balanceform(); + bool valid = false; + char perform = 0; + while (!valid) + { + // ask the user how much they wish to withdraw + cout << "How much would you like to withdraw today?" << endl << ":$"; + float input; + cin >> input; + if (input > getaccountBalance()) // check condition, do we have enough money to make the withdrawal? + { + // not enough + cout << "$" << input << " is more than you have in your account."; + cout << "Please enter a different amount." << endl << endl; + } + else + { + // good amount + cout << "About to withdraw $" << input << " from account number: " << getaccountNum() << endl; + cout << "Continue? [y/N]" << endl << ":"; + while (perform == 0) + { + perform = _getch(); + cout << perform; + switch(toupper(perform)) + { + case 'Y': + case 'N': + case CR: + case ESC: + valid = true; + break; + default: + perform = 0; + break; + } + } + + cout << endl << endl; + if (toupper(perform) == 'Y') + { + // make it so + float balance = getaccountBalance(); + balance -= input; + setaccountBalance(balance); + cout << "Withdrew $" << input << " from account number: " << getaccountNum() << endl; + cout << "New balance: $" << getaccountBalance() << endl << endl; + } + else + { + cout << "Aborted." << endl; + } + } + } + cout << endl << endl; + pause(); +} +void account::doDeposit() // utility function, menu option 3 +{ + cls(); + cout << "Welcome, " << getaccountName() << ". Account Number: " << getaccountNum() << ". Balance: $" << getaccountBalance() << endl << endl; + cout << "Deposit slip" << endl; + balanceform(); + bool valid = false; + char perform = 0; + while (!valid) + { + // ask the user how much they wish to deposit + cout << "How much would you like to deposit today?" << endl << ":$"; + float input; + cin >> input; + cout << "About to deposit $" << input << " into account number: " << getaccountNum() << endl; + cout << "Continue? [y/N]" << endl << ":"; + while (perform == 0) + { + perform = _getch(); + cout << perform << endl; + switch(toupper(perform)) + { + case 'Y': + case 'N': + case CR: + case ESC: + valid = true; + break; + default: + perform = 0; + break; + } + } + + cout << endl << endl; + if (toupper(perform) == 'Y') + { + // make it so + float balance = getaccountBalance(); + balance += input; + setaccountBalance(balance); + cout << "Deposited $" << input << " into account number: " << getaccountNum() << endl; + cout << "New balance: $" << getaccountBalance() << endl << endl; + } + else + { + cout << "Aborted." << endl; + } + + } + pause(); +} + + +// hope you've enjoyed the show! \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/account.h b/SDrive/programs/Mod11/Com203/midterm project/midterm project/account.h new file mode 100644 index 0000000..4111641 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/midterm project/midterm project/account.h @@ -0,0 +1,58 @@ +/*************************************************************** + * Project: COM 203 Midterm + * Author: Amrit Panesar + * Date: 09/04/2014 + **************************************************************/ + + +/***************************************************************** +Account Class (A bank account class with methods to deposit, withdraw, and check the balance.) (5 points) +1. Class contains 3 private data members called accountBalance, accountName and accountNum. + Choose appropriate data types for these variables + +2. Write an overloaded constructor that takes one parameter of the type string. + The constructor initializes the accountName with the parameter specified. + The member variables accountBalance and accountNum are assigned some random value (No need to use rand function). + +3. Write appropriate destructor, set, get and display functions. + +4. The class will also contain member functions named menu, withdraw, and deposit + The withdraw function checks to see if balance is sufficient for withdrawal. + If so, decrements balance by amount; if not, prints an appropriate message indicating insufficient funds and displays the current balance. + The deposit function adds deposit amount to balance and displays new balance + The menu function will contain the following menu options: 1. Check Balance, 2. Deposit Amount, 3. Withdraw Amount, 4. Exit. + Use appropriate messages for each option selected and then call the correct function to perform the task. +*****************************************************************/ + +#pragma once + +#include "includes.h" + +class account +{ +private: + int accountNum; + string accountName; + float accountBalance; + + void setaccountNum(int input); + int getaccountNum(); + string getPaddedAccountNum(); + + void setaccountName(string input); + string getaccountName(); + + void setaccountBalance(float input); + float getaccountBalance(); + + void doAccountBalance(); + void doDeposit(); + void doWithdraw(); + void balanceform(); + +public: + account(string name); + ~account(); + + void menu(); +}; \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/icon.ico b/SDrive/programs/Mod11/Com203/midterm project/midterm project/icon.ico new file mode 100644 index 0000000..360346c Binary files /dev/null and b/SDrive/programs/Mod11/Com203/midterm project/midterm project/icon.ico differ diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/includes.h b/SDrive/programs/Mod11/Com203/midterm project/midterm project/includes.h new file mode 100644 index 0000000..19847b7 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/midterm project/midterm project/includes.h @@ -0,0 +1,33 @@ +/*************************************************************** + * Project: COM 203 Midterm + * Author: Amrit Panesar + * Date: 09/04/2014 + **************************************************************/ + +#pragma once + +// brilliant, right? +// hope you've been enjoyin this so far + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "atlbase.h" +#include "atlstr.h" +#include "comutil.h" + + +#define WIN32_LEAN_AND_MEAN + +using namespace std; diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/main.cpp b/SDrive/programs/Mod11/Com203/midterm project/midterm project/main.cpp new file mode 100644 index 0000000..48bbd03 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/midterm project/midterm project/main.cpp @@ -0,0 +1,190 @@ + +/*************************************************************** + * Project: COM 203 Midterm + * Author: Amrit Panesar + * Date: 09/04/2014 + **************************************************************/ + +/*************************************************************** +NOTE: Minimum requirement to qualify for grading: + 1) Code must be properly indented, modularized and follows the best practices. + +Account Class (A bank account class with methods to deposit, withdraw, and check the balance.) (5 points) +1. Class contains 3 private data members called accountBalance, accountName and accountNum. + Choose appropriate data types for these variables + +2. Write an overloaded constructor that takes one parameter of the type string. + The constructor initializes the accountName with the parameter specified. + The member variables accountBalance and accountNum are assigned some random value (No need to use rand function). + +3. Write appropriate destructor, set, get and display functions. + +4. The class will also contain member functions named menu, withdraw, and deposit + The withdraw function checks to see if balance is sufficient for withdrawal. + If so, decrements balance by amount; if not, prints an appropriate message indicating insufficient funds and displays the current balance. + The deposit function adds deposit amount to balance and displays new balance + The menu function will contain the following menu options: 1. Check Balance, 2. Deposit Amount, 3. Withdraw Amount, 4. Exit. + Use appropriate messages for each option selected and then call the correct function to perform the task. +*****************************************************************/ + + +#include "includes.h" +#include "account.h" +#include "main.h" +#include "resource.h" + + +int _tmain(int argc, _TCHAR* argv[]) // _tmain you say? yes. its windows. +{ + ConsoleSetup("COM203 Midterm"); + pause(); + cls(); + + /*--------------------------------------------------- lets begin ----------------------------*/ + + string name = ""; + bool named = false; + while (!named) + { + cout << string(80, '*') << endl; + // lets ask for the user's name + cout << "Welcome to the Bank Account program" << endl << endl; + cout << string(10, ' ') << string (15, '-') << endl; + cout << "Please enter your name" << endl << ":"; + cin >> name; + cout << name << endl << endl; + if (!name.empty()) // ensure they didn't just hit enter (although cin doesn't allow for that by default) + { + cout << "Your name is: " << name << ". Is this correct?" << endl << "[Y/n]: "; + char charin = 0; + while (charin == 0) // yes, no, esc, or enter are acceptable + { + charin = _getch(); + cout << charin; + if (charin != CR && charin != ESC) + { + switch (toupper(charin)) + { + case 'Y': + named = true; + break; + case 'N': + named = false; + break; + default: + charin = 0; + break; + } + } + else if (charin == ESC) // special case for escape, just quit + { + return 0; + } + else // continue on + { + named = true; + } + + } + } + cls(); + } + + randSeed(); // seeeeeeed + account a = account(name); // make a new account object + a.menu(); // start the menu + + + // endings + cls(); + cout << endl << endl << endl << endl << endl << endl << endl << endl << endl << endl; + cout << "Thank you for using Banking program, " << name << ", please come again!" << endl; + cout << endl << endl << endl << endl << endl << endl << endl << endl; + pause(); +} + + + +/******************************* Just some fancy windows stuff below here *****************************/ + +void ConsoleSetup(char* input) +{ + system("color 1e"); // change the background color to yellow on blue + + ChangeConsoleIcon(IDI_ICON1); // change the console icon to the icon defined in resources.h + ChangeConsoleTitle(input); // change the console title + cout << string(80,'*') << "Welcome to " << input << " " << GetYear() << " Edition!" << endl << string(80,'*') << endl << endl; // display the title screen. +} + +void ChangeConsoleTitle (const char* input) +{ + time_t t = time(NULL); // get current timestamp + tm* timePtr = localtime(&t); // using the timezone the system is in + TCHAR szNewTitle[MAX_PATH]; // console title can only be as long as the maximum path length defined in windows + + size_t newsize = strlen(input) + 1; // input plus null char + wchar_t * wcstring = new wchar_t[newsize]; // make a new pointer on the heap for storing the title + size_t convertedChars = 0; // number of characters converted to the above structure + mbstowcs_s(&convertedChars, wcstring, newsize, input, _TRUNCATE); // make it happen + + StringCchPrintf(szNewTitle, MAX_PATH, TEXT("%s %d %s"), wcstring, GetYear(), TEXT("edition")); // move the texts into the TCHAR field + SetConsoleTitle(szNewTitle); // set the console title +} + +void ChangeConsoleIcon (const int resource_number) +{ + HMODULE hMainMod = GetModuleHandle(0); + assert (hMainMod); + + HICON hMainIcon = ::LoadIcon(hMainMod, MAKEINTRESOURCE(resource_number)); + assert (hMainIcon); + + // Load kernel 32 library + HMODULE hMod = LoadLibrary( _T( "Kernel32.dll" )); + assert (hMod); + + // Load console icon changing procedure + typedef DWORD (__stdcall *SCI)(HICON); + SCI pfnSetConsoleIcon = reinterpret_cast(GetProcAddress(hMod, "SetConsoleIcon")); + assert (pfnSetConsoleIcon); + + // Call function to change icon + pfnSetConsoleIcon (hMainIcon); + + FreeLibrary (hMod); +}// End ChangeIcon + +int GetYear() +{ + time_t t = time(NULL); + tm* timePtr = localtime(&t); + + return timePtr->tm_year + 1900; +} + +void pause() +{ + cout << "Press any key to continue. . ." << endl; + _getch(); +} + +void cls() +{ + system("cls"); +} + +void randSeed() +{ + time_t t = time(NULL); + srand(t); +} + +string spacePad(int input, int length, bool right) +{ + ostringstream ss; + if (!right) + ss << left << setw( length ) << setfill( ' ' ) << input; + else + ss << right << setw( length ) << setfill( ' ' ) << input; + return ss.str(); +} \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/main.h b/SDrive/programs/Mod11/Com203/midterm project/midterm project/main.h new file mode 100644 index 0000000..5c05684 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/midterm project/midterm project/main.h @@ -0,0 +1,26 @@ +/*************************************************************** + * Project: COM 203 Midterm + * Author: Amrit Panesar + * Date: 09/04/2014 + **************************************************************/ + +#pragma once + +#include "includes.h" + +// not a whole lot going on here +// just enough to be called from the account class + +void ChangeConsoleTitle (const char* input); +void ChangeConsoleIcon (int resource_number); +void ConsoleSetup (char* input); +int GetYear(); + +void pause(); +void cls(); +void randSeed(); +string spacePad(int input, int length = 7, bool right = false); // ah thank god for default arguments + +enum { NUL = 0, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, + LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, + SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, DEL = 127 }; \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/midterm project.vcxproj b/SDrive/programs/Mod11/Com203/midterm project/midterm project/midterm project.vcxproj new file mode 100644 index 0000000..0da1e1b --- /dev/null +++ b/SDrive/programs/Mod11/Com203/midterm project/midterm project/midterm project.vcxproj @@ -0,0 +1,97 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + + + + + + + + + + + + + {6959F7E3-8A71-4526-A093-07AF450CF3B8} + Win32Proj + midtermproject + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/midterm project.vcxproj.filters b/SDrive/programs/Mod11/Com203/midterm project/midterm project/midterm project.vcxproj.filters new file mode 100644 index 0000000..d86dfb2 --- /dev/null +++ b/SDrive/programs/Mod11/Com203/midterm project/midterm project/midterm project.vcxproj.filters @@ -0,0 +1,49 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/SDrive/programs/Mod11/Com203/midterm project/midterm project/resource.h b/SDrive/programs/Mod11/Com203/midterm project/midterm project/resource.h new file mode 100644 index 0000000..661a5ba Binary files /dev/null and b/SDrive/programs/Mod11/Com203/midterm project/midterm project/resource.h differ diff --git a/SDrive/programs/Mod15/COM330-77260-01.pl b/SDrive/programs/Mod15/COM330-77260-01.pl new file mode 100644 index 0000000..2ab3b04 --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-01.pl @@ -0,0 +1,233 @@ +#!/usr/bin/env perl +################################################ +# Name: Amrit Panesar +# Student Number: 77260 +# Program: 01 +################################################ + +#initialization +use Win32::Console::ANSI; +use Term::ANSIColor; +use Term::ReadKey; +use Data::Dumper qw(Dumper); +use strict; +use warnings; + +$\ = "\n"; +$| = 1; + +#variables +my ($input, $choice, $temp, $hold); +my $debug = 0; +############################lets begin########## +system("cls"); +system("color 1e"); +&doMenu(); +system("cls"); +system("color 07"); +print "\n"x5; +&again(); +print "\n\nThanks for playing!"; +exit; + +##########################begin subroutines##### +sub _getKey +{ + my $key = undef; + while (not defined($key = ReadKey(-1))) { }; + print $key; + return $key; +} +sub _anyKey +{ + print "\n"; + print "Press any key to continue..."; + _getKey(); +} + +sub again +{ + printf "Run again?\n[Y/n] :"; + my $key = undef; + while(1) { + $key = lc(_getKey()); + #print ord($key); + if ($key eq 'y' || $key eq 'n' || ord($key) == 13) { + last; + } + } + if ($key eq 'y' || ord($key) == 13) { + print "\n"x2; + system ("pause"); + do __FILE__; + } +} + +sub doInput +{ + my $prompt = shift; + my $input = ""; + printf(">%s\n: ", $prompt); + chomp($input = <>); + print "\n"; + return $input; +} + +sub AUTOLOAD +{ + use vars qw($AUTOLOAD); + print "Could not find subroutine ".$AUTOLOAD; + _anyKey(); +} + +sub doMenuLine +{ + my $line = shift; + my $spaces = " "x((78 - length($line))/2); + print "|".$spaces.$line.$spaces."|"; +} + +sub doMenu +{ + my $input = ""; + while ($input eq "") + { + system("cls"); + print " "."_"x(75); + print " /"." "x(75)."\\ "; + if ($debug) { + doMenuLine("Main menu - debug"); + } else { + doMenuLine("Main menu"); + } + doMenuLine("-"x(15)); + doMenuLine("E - Extract and Process string "); + doMenuLine("P - Perform a mathematical operation "); + doMenuLine("R - Read a directory of files "); + doMenuLine("F - Find a pattern in a list of files "); + doMenuLine("L - Determine if a word is a palidrome "); + doMenuLine("-"x(19)); + doMenuLine("Q - Quit "); + print "|"." "x(77)."|"; + print " \\"."_"x(75)."/"; + print $\.$\.$\; + + printf "Please enter a menu option: "; + chomp($input = lc(<>)); + print "\n"; + + if (defined($input)) { + if ($input eq 'e') { + $input = ""; + &doExtract(); + } elsif ($input eq 'p') { + $input = ""; + &doMath(); + } elsif ($input eq 'r') { + $input = ""; + &doRead(); + } elsif ($input eq 'f') { + $input = ""; + &doPattern(); + } elsif ($input eq 'l') { + $input = ""; + &doPalindrome(); + } elsif ($input eq 'q') { + last; + } else { + $input = undef; + print "Error, please enter a valid menu option: e, p, r, f, l, or q"; + _anyKey(); + } + } + } +} +sub doExtract { + my $input = doInput("Please enter a string"); + my @chars = split(//, $input); + print "The string: " .$input . " has " .($#chars + 1). " characters."; + _anyKey(); +} + +sub doMath { + my $input = doInput("Please enter a matematical expression"); + if ($input =~ /[0-9]/) { + my $output = eval($input); + if (!$@) { + print "Result: " .$output; + } else { + print "Invalid Expression"; + } + } else { + print "Please include at least one number in your expression"; + } + _anyKey(); +} + +sub doRead { + my $input = doInput("Please enter a valid directory"); + if (opendir(my $dh, $input)) { + print "Here are all the files in: ". $input; + while (readdir $dh) { + print; + } + } else { + print "Unable to open directory: ".$input; + } + _anyKey(); +} + +sub doPattern { + my $input = doInput("Please enter a valid directory"); + my $grep = doInput("Please enter a filtering expression"); + if (opendir(my $dh, $input)) { + print "Here are all the files in: ". $input ." that match \"" .$grep. "\""; + my @filtered; + $grep = lc($grep); + foreach my $element (readdir($dh)) { + $element = lc($element); + my $index = index($element, $grep); + if ($debug) { + print($element . ", " . $grep . ", " . ($index > -1)); + } + if ($index > -1) { + push(@filtered, $element); + } + } + if ($debug) { + print "\n"; + unshift(@filtered, "Elements in the filtered list: "); + print "Total elements: " . scalar(@filtered); + } + if (scalar(@filtered) > 0) { + foreach (@filtered) { + print; + } + } else { + print "No matches found"; + } + } else { + print "Unable to open directory: ".$input; + } + _anyKey(); +} + +sub doPalindrome { + my $input = doInput("Please enter a palindrome"); + my @chars = split(//, $input); + my @rev = (); + for (my $j = 0, my $i = $#chars; $i > -1; $i--, $j++) { + $rev[$j] = $chars[$i]; + } + my $output = join('', @rev); + if ($debug) { + print "Input: ". $input; + print "Output: ". $output; + } + if ($input eq $output) { + print "the word or phrase: ". $input ." IS a palindrome."; + } else { + print "the word or phrase: ". $input ." is NOT a palindrome."; + } + _anyKey(); +} diff --git a/SDrive/programs/Mod15/COM330-77260-02.pl b/SDrive/programs/Mod15/COM330-77260-02.pl new file mode 100644 index 0000000..5ec867b --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-02.pl @@ -0,0 +1,215 @@ +#!/usr/bin/env perl +################################################ +# Name: Amrit Panesar +# Student Number: 77260 +# Program: 02 +################################################ + +use Win32::Console::ANSI; +use Term::ANSIColor; +use Term::ReadKey; +use Data::Dumper qw(Dumper); +use strict; +#use warnings; + +$\ = "\n"; +$| = 1; + +#variables +my ($input, $choice, $temp, $hold); +my $debug = 0; +my @states = ("Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"); +my %callsigns = (); +my %callstates = (); + +############################lets begin########## +system("cls"); +system("color 1e"); +&doInit; +&doMenu(); +system("cls"); +system("color 07"); +print "\n"x5; +&again(); +print "\n\nThanks for playing!"; +exit; + +##########################begin subroutines##### +sub _getKey +{ + my $key = undef; + while (not defined($key = ReadKey(-1))) { }; + print $key; + return $key; +} +sub _anyKey +{ + print "\n"; + print "Press any key to continue..."; + _getKey(); +} + +sub again +{ + printf "Run again?\n[Y/n] :"; + my $key = undef; + while(1) { + $key = lc(_getKey()); + #print ord($key); + if ($key eq 'y' || $key eq 'n' || ord($key) == 13) { + last; + } + } + if ($key eq 'y' || ord($key) == 13) { + print "\n"x2; + system ("pause"); + do __FILE__; + } +} + +sub doInput +{ + my $prompt = shift; + my $input = ""; + printf(">%s\n: ", $prompt); + chomp($input = <>); + print "\n"; + return $input; +} + +sub AUTOLOAD +{ + use vars qw($AUTOLOAD); + print "Could not find subroutine ".$AUTOLOAD; + _anyKey(); +} + +sub doMenuLine +{ + my $line = shift; + my $spaces = " "x((78 - length($line))/2); + print "|".$spaces.$line.$spaces."|"; +} + +sub doMenu +{ + my $input = ""; + while ($input eq "") + { + system("cls"); + print " "."_"x(75); + print " /"." "x(75)."\\ "; + if ($debug) { + doMenuLine("Main menu - debug"); + } else { + doMenuLine("Main menu"); + } + doMenuLine("-"x(15)); + doMenuLine("C - Enter a call letter to search "); + doMenuLine("S - Enter a state to list stations "); + doMenuLine("I - Statistical information "); + doMenuLine("-"x(19)); + doMenuLine("Q - Quit "); + print "|"." "x(77)."|"; + print " \\"."_"x(75)."/"; + print $\; + &stats(); + print $\.$\; + + printf "Please enter a menu option: "; + chomp($input = lc(<>)); + print "\n"; + + if (defined($input)) { + if ($input eq 'c') { + $input = ""; + &callSigns(); + &_anyKey(); + } elsif ($input eq 's') { + $input = ""; + &stateSearch(); + &_anyKey(); + } elsif ($input eq 'i') { + $input = ""; + &stats(); + &_anyKey(); + } elsif ($input eq 'q') { + last; + } else { + $input = undef; + print "Error, please enter a valid menu option: c, s, i, or q"; + _anyKey(); + } + } + } +} + +sub doInit +{ + open FH, "<", "CallLetters.txt", or die $!; + while () { + my ($q, $w, $e) = split(/^(W|K[A-Z]{2,3}(-TV)?(-DT)?)(.+)/, $_); # should give me callcode in $q, metadata in $w + my ($e, $r, $t) = split(/,/, $_, 2); # gives me last word of city in $e, state name and beyond in $r + my ($z, $x, $c) = split(/ /, $r, 3); # $z and $x should have two words of statename + my $state = join(' ', $z, $x, $c); + my $stateout = ""; + + foreach (@states) { + if (index($state, $_) != -1) { + $stateout = $_; + } + } + my @data= ($stateout, $e); + + $callsigns{$w} = \@data; + $callstates{$stateout} = $callstates{$stateout} .";". $w; + } + close FH; +} + +sub stats +{ + print "Total number of call signs loaded: ". keys(%callsigns); + print "Total number of states loaded: ". keys(%callstates); +} + +sub callSigns +{ + my $sign = doInput("Please enter a callsign"); + my $sent = 0; + + foreach (keys %callsigns) { + if ($_ eq $sign) { + print "Information for ". $_; + my @data = $callsigns{$_}; + print $data[0][1]; + print ""; + print $_ ." is located in ". $data[0][0]; + my @count = split(/;/,$callstates{$data[0][0]}); + print "There are ". (scalar(@count)-1) ." call signs in " .$data[0][0]; + $sent = 1; + } + } + + if ($sent == 0) { + print "Error, callsign: ". $sign ." not found"; + } +} + +sub stateSearch +{ + my $state = doInput("Please enter a state"); + my $sent = 0; + + foreach (keys %callstates) { + if ($_ eq $state) { + my @signs = split(/;/,$callstates{$_}); + print "Total number of call signs in ". $_ .": ". (scalar(@signs)-1)."\n\n"; + print $callstates{$_}; + $sent = 1; + } + } + if ($sent == 0) { + print "Error, state: ". $state ." not found"; + } +} diff --git a/SDrive/programs/Mod15/COM330-77260-03/cgi-bin/COM330-77260-03.pl b/SDrive/programs/Mod15/COM330-77260-03/cgi-bin/COM330-77260-03.pl new file mode 100644 index 0000000..47c362b --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/cgi-bin/COM330-77260-03.pl @@ -0,0 +1,140 @@ +#!/usr/bin/env perl +################################################ +# Name: Amrit Panesar +# Student Number: 77260 +# Program: 03 +################################################ + +use strict; +use warnings; +use Data::Dumper qw(Dumper); + +use DBI; +use DBD::mysql; +my $dsn = "DBI:mysql:database=ad77260"; +my $dbh = DBI->connect($dsn, "ad77260", "90dd0e54"); +my $drh = DBI->install_driver("mysql"); + +use CGI; +use CGI::Carp qw(fatalsToBrowser warningsToBrowser); +my $cgi = new CGI(); +my $file = $cgi->param('file'); + +my %config = do './constraints.pl'; + +print $config{"head"}; + + +if (!defined($ENV{"QUERY_STRING"})) { + $ENV{"QUERY_STRING"} = ""; # for debugging purposes +} +if ($ENV{"QUERY_STRING"} eq "env") { + print "

Linux Sandbox Enviroment

"; + print "
";
+	print "\$0 = $0\n";
+	print "time() = ".time()."\n";
+	foreach my $key (sort keys(%ENV)) {
+		print "$key = $ENV{$key}\n";
+	}
+	print "
"; +} elsif ($ENV{"QUERY_STRING"} eq "form") { + if ($ENV{"REQUEST_METHOD"} eq "POST" || $ENV{"REQUEST_METHOD"} eq "PUT") { + my $tempfiletime = time(); + my $tempfile = $config{"uploads_directory"}.$tempfiletime; + print "
";
+		if ($file ne "") {
+			my $fh = $cgi->upload('file');
+
+			if (! open(OUTFILE, ">", $tempfile) ) {
+				print "Can't open ". $tempfile ." for writing - $!";
+			} else {
+				print "Saving the file to $tempfile\n";
+				my $bytes = 0;
+				my $total = 0;
+				my $hold = "";
+				binmode($fh);
+				while ($bytes = read($fh, $hold, 1024)) {
+					print OUTFILE $hold;
+					$total += $bytes;
+				}
+				print "Saved $total bytes of file $file to $tempfile successfully.\n";
+			}
+		}
+		#print "\n";
+		#print "\$0 = $0\n";
+		#print $cgi->Dump;
+		
+		my $sth = $dbh->prepare($config{'sql_insert'}) or die $dbh->errstr;
+
+		my @sports = $cgi->param("favoritesport");
+		my $sportsList = join("|", @sports);
+
+		my @cities = $cgi->param("citiesToVisit");
+		my $citiesList = join("|", @cities);
+
+		$dbh->{RaiseError} = 1;  
+		$sth->bind_param(1, "".$cgi->param("firstname"), {});
+		$sth->bind_param(2, "".$cgi->param("lastname"), {});
+		$sth->bind_param(3, "".$cgi->param("address1"), {});
+		$sth->bind_param(4, "".$cgi->param("address2"), {});
+		$sth->bind_param(5, "".$cgi->param("city"), {});
+		$sth->bind_param(6, "".$cgi->param("state"), {});
+		$sth->bind_param(7, "".$cgi->param("email"), {});
+		$sth->bind_param(8, "".$cgi->param("password"), {});
+		$sth->bind_param(9, "".$cgi->param("colors"), {});
+		$sth->bind_param(10, "".$sportsList, {});
+		$sth->bind_param(11, "".$citiesList, {});
+		$sth->bind_param(12, "".$cgi->param("file"), {});
+		$sth->bind_param(13, "".$tempfiletime, {});
+		$sth->execute;
+
+		print $dbh->{'mysql_error'}."\n";
+		$sth->finish;
+
+		#print "\n\n\n\n";
+		print "Redirecting you to output table in 5 seconds.\n";
+		print "
"; + print $config{"meta_redirect"}; + } elsif ($ENV{"REQUEST_METHOD"} eq "GET") { + print $config{"form"}; + } +} elsif ($ENV{"QUERY_STRING"} eq "view") { + my $sth = $dbh->prepare($config{'sql_select'}); + $sth->execute; + print $config{"table_header"}; + do { + while (my @row = $sth->fetchrow_array()) { + print "\t\t"; + foreach (0..$#row) { + my $hold = ""; + if ($_ eq "7" || $_ eq "8") { + $hold = join(", ", split(/\|/, $row[$_])); + } elsif ($_ eq "10") { + if ($row["9"] ne "") { + my $hf = $config{"uploads_directory"}.$row[$_]; + my $output = `file --mime-type -b $hf`; + if ($output =~ /image/) { + $hold = ""; + } else { + $hold = "Download"; + } + } else { + $hold = "No File Uploaded"; + } + } + else { + $hold = $row[$_]; + } + print "\t\t\t".$hold.""; + } + print "\t\t"; + } + } until !($sth->more_results); + $sth->finish; + print $config{"table_footer"}; +} else { + print $config{"default_message"} +} + + +print $config{"foot"}; diff --git a/SDrive/programs/Mod15/COM330-77260-03/cgi-bin/constraints.pl b/SDrive/programs/Mod15/COM330-77260-03/cgi-bin/constraints.pl new file mode 100644 index 0000000..f024020 --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/cgi-bin/constraints.pl @@ -0,0 +1,273 @@ +#!/usr/bin/env perl + +#constrints.pl + +print "Content-Type: text/html; charset=UTF-8\n\n"; + +uploads_directory => "../uploads/", + +meta_redirect => "", + +head => << "__page", + + + + Project 3 - Amrit Panesar - 77260 + + + + + + + +
+
+
+__page + + +form => << "__page", +
+
+ Welcome! Please enter your information +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
 
+ +
+ +
+ +
+
+ +
 
+ +
+ +
+ + +
+
+ +
 
+ +
+ +
+ +   + +
+
+
+
+__page + +table_header => <<"__thead", + + + + + + + + + + + + + + + + + +__thead + +table_footer => <<"__tfoot", + +
IDFirst NameLast NameAddressEmailPW HashColorSportsVisitFilenameEmbedded
+__tfoot + + +foot => <<"__page", +
+
+
+ + + + + + +__page + + +sql_insert => <<"__SQL", +INSERT INTO `ad77260`.`com330_data` +( `firstName`, `lastName`, `Address1`, + `Address2`, `City`, `State`, + `E-Mail`, `Password`, `Color`, + `Sports`, `Cities`, `uploadfile`, + `renamedfile`) +VALUES (?, ?, ?, + ?, ?, ?, + ?, PASSWORD(?), ?, + ?, ?, ?, + ?); +__SQL + +sql_select => <<"__SQL", +SELECT `id`, `firstName`, `lastName`, + CONCAT(`Address1`, "\\n", `Address2`, "\\n", `City`, ", ", `State`) as Address, + `E-Mail`, `Password`, `Color`, + `Sports`, `Cities`, `uploadfile`, + `renamedfile` +FROM `com330_data` +__SQL + +default_message => <<"__page", +

Welcome!

+

Please use the above navigation to insert and view data

+

-Amrit

+

Student 77260

+__page diff --git a/SDrive/programs/Mod15/COM330-77260-03/css/app.css b/SDrive/programs/Mod15/COM330-77260-03/css/app.css new file mode 100644 index 0000000..8989fc4 --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/css/app.css @@ -0,0 +1,26 @@ +/* This is some supporting css for the upload form */ + +body { + padding-top: 50px; +} + +.btn-file { + position: relative; + overflow: hidden; +} + +.btn-file input[type=file] { + position: absolute; + top: 0; + right: 0; + min-width: 100%; + min-height: 100%; + font-size: 100px; + text-align: right; + filter: alpha(opacity=0); + opacity: 0; + outline: none; + background: white; + cursor: inherit; + display: block; +} \ No newline at end of file diff --git a/SDrive/programs/Mod15/COM330-77260-03/css/bootstrap.min.css b/SDrive/programs/Mod15/COM330-77260-03/css/bootstrap.min.css new file mode 100644 index 0000000..8cba30a --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/css/bootstrap.min.css @@ -0,0 +1,7 @@ +/*! + * bootswatch v3.3.2 + * Homepage: http://bootswatch.com + * Copyright 2012-2015 Thomas Park + * Licensed under MIT + * Based on Bootstrap +*//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;-webkit-box-shadow:none !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff !important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#c8c8c8;background-color:#272b30}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#ffffff;text-decoration:none}a:hover,a:focus{color:#ffffff;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#1c1e22;border:1px solid #0c0d0e;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #1c1e22}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#7a8288}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{background-color:#f89406;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#7a8288}.text-primary{color:#7a8288}a.text-primary:hover{color:#62686d}.text-success{color:#ffffff}a.text-success:hover{color:#e6e6e6}.text-info{color:#ffffff}a.text-info:hover{color:#e6e6e6}.text-warning{color:#ffffff}a.text-warning:hover{color:#e6e6e6}.text-danger{color:#ffffff}a.text-danger:hover{color:#e6e6e6}.bg-primary{color:#fff;background-color:#7a8288}a.bg-primary:hover{background-color:#62686d}.bg-success{background-color:#62c462}a.bg-success:hover{background-color:#42b142}.bg-info{background-color:#5bc0de}a.bg-info:hover{background-color:#31b0d5}.bg-warning{background-color:#f89406}a.bg-warning:hover{background-color:#c67605}.bg-danger{background-color:#ee5f5b}a.bg-danger:hover{background-color:#e9322d}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #1c1e22}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #7a8288}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #7a8288}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#7a8288}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #7a8288;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#ffffff;background-color:#333333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:bold;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#3a3f44;background-color:#f5f5f5;border:1px solid #cccccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0%}}table{background-color:#2e3338}caption{padding-top:8px;padding-bottom:8px;color:#7a8288;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #1c1e22}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #1c1e22}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #1c1e22}.table .table{background-color:#272b30}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #1c1e22}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #1c1e22}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#353a41}.table-hover>tbody>tr:hover{background-color:#49515a}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#49515a}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#3e444c}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#62c462}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#4fbd4f}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#5bc0de}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#46b8da}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#f89406}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#df8505}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#ee5f5b}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ec4844}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #1c1e22}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#c8c8c8;border:0;border-bottom:1px solid #1c1e22}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:9px;font-size:14px;line-height:1.42857143;color:#272b30}.form-control{display:block;width:100%;height:38px;padding:8px 12px;font-size:14px;line-height:1.42857143;color:#272b30;background-color:#ffffff;background-image:none;border:1px solid #cccccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control::-moz-placeholder{color:#7a8288;opacity:1}.form-control:-ms-input-placeholder{color:#7a8288}.form-control::-webkit-input-placeholder{color:#7a8288}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#999999;opacity:1}textarea.form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{line-height:38px}input[type="date"].input-sm,input[type="time"].input-sm,input[type="datetime-local"].input-sm,input[type="month"].input-sm,.input-group-sm input[type="date"],.input-group-sm input[type="time"],.input-group-sm input[type="datetime-local"],.input-group-sm input[type="month"]{line-height:30px}input[type="date"].input-lg,input[type="time"].input-lg,input[type="datetime-local"].input-lg,input[type="month"].input-lg,.input-group-lg input[type="date"],.input-group-lg input[type="time"],.input-group-lg input[type="datetime-local"],.input-group-lg input[type="month"]{line-height:54px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:9px;padding-bottom:9px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}textarea.form-group-sm .form-control,select[multiple].form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:12px;line-height:1.5}.input-lg{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:54px;line-height:54px}textarea.input-lg,select[multiple].input-lg{height:auto}.form-group-lg .form-control{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:54px;line-height:54px}textarea.form-group-lg .form-control,select[multiple].form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:47.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:38px;height:38px;line-height:38px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:54px;height:54px;line-height:54px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#ffffff}.has-success .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-success .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#62c462}.has-success .form-control-feedback{color:#ffffff}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#ffffff}.has-warning .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-warning .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#f89406}.has-warning .form-control-feedback{color:#ffffff}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#ffffff}.has-error .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-error .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#ee5f5b}.has-error .form-control-feedback{color:#ffffff}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#ffffff}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:9px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:29px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:9px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:19.6666662px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:8px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#ffffff;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#ffffff;background-color:#3a3f44;border-color:#3a3f44}.btn-default:hover,.btn-default:focus,.btn-default.focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#ffffff;background-color:#232628;border-color:#1e2023}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#3a3f44;border-color:#3a3f44}.btn-default .badge{color:#3a3f44;background-color:#ffffff}.btn-primary{color:#ffffff;background-color:#7a8288;border-color:#7a8288}.btn-primary:hover,.btn-primary:focus,.btn-primary.focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#62686d;border-color:#5d6368}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#7a8288;border-color:#7a8288}.btn-primary .badge{color:#7a8288;background-color:#ffffff}.btn-success{color:#ffffff;background-color:#62c462;border-color:#62c462}.btn-success:hover,.btn-success:focus,.btn-success.focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#ffffff;background-color:#42b142;border-color:#40a940}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#62c462;border-color:#62c462}.btn-success .badge{color:#62c462;background-color:#ffffff}.btn-info{color:#ffffff;background-color:#5bc0de;border-color:#5bc0de}.btn-info:hover,.btn-info:focus,.btn-info.focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#ffffff;background-color:#31b0d5;border-color:#2aabd2}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#5bc0de}.btn-info .badge{color:#5bc0de;background-color:#ffffff}.btn-warning{color:#ffffff;background-color:#f89406;border-color:#f89406}.btn-warning:hover,.btn-warning:focus,.btn-warning.focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#ffffff;background-color:#c67605;border-color:#bc7005}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f89406;border-color:#f89406}.btn-warning .badge{color:#f89406;background-color:#ffffff}.btn-danger{color:#ffffff;background-color:#ee5f5b;border-color:#ee5f5b}.btn-danger:hover,.btn-danger:focus,.btn-danger.focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#e9322d;border-color:#e82924}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#ee5f5b;border-color:#ee5f5b}.btn-danger .badge{color:#ee5f5b;background-color:#ffffff}.btn-link{color:#ffffff;font-weight:normal;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#ffffff;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#7a8288;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;-o-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:0.35s;-o-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#3a3f44;border:1px solid #272b30;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);-webkit-background-clip:padding-box;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#272b30}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#c8c8c8;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#ffffff;background-color:#272b30}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#272b30}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#7a8288}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#7a8288;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:54px;line-height:54px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:8px 12px;font-size:14px;font-weight:normal;line-height:1;color:#272b30;text-align:center;background-color:#999999;border:1px solid #cccccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:14px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#3e444c}.nav>li.disabled>a{color:#7a8288}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#7a8288;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#3e444c;border-color:#ffffff}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #1c1e22}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#1c1e22 #1c1e22 #1c1e22}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#ffffff;background-color:#3e444c;border:1px solid #1c1e22;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #1c1e22}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #1c1e22;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#272b30}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#ffffff;background-color:transparent}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #1c1e22}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #1c1e22;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#272b30}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block !important;visibility:visible !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:6px;margin-bottom:6px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:6px;margin-bottom:6px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left !important}.navbar-right{float:right !important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#3a3f44;border-color:#2b2e32}.navbar-default .navbar-brand{color:#c8c8c8}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#ffffff;background-color:none}.navbar-default .navbar-text{color:#c8c8c8}.navbar-default .navbar-nav>li>a{color:#c8c8c8}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#ffffff;background-color:#272b2e}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#ffffff;background-color:#272b2e}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#272b2e}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#272b2e}.navbar-default .navbar-toggle .icon-bar{background-color:#c8c8c8}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#2b2e32}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#272b2e;color:#ffffff}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#c8c8c8}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#ffffff;background-color:#272b2e}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#272b2e}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-default .navbar-link{color:#c8c8c8}.navbar-default .navbar-link:hover{color:#ffffff}.navbar-default .btn-link{color:#c8c8c8}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#ffffff}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#cccccc}.navbar-inverse{background-color:#7a8288;border-color:#62686d}.navbar-inverse .navbar-brand{color:#cccccc}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#ffffff;background-color:none}.navbar-inverse .navbar-text{color:#cccccc}.navbar-inverse .navbar-nav>li>a{color:#cccccc}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#ffffff;background-color:#5d6368}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#ffffff;background-color:#5d6368}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#5d6368}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#5d6368}.navbar-inverse .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#697075}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#5d6368;color:#ffffff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#62686d}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#62686d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#cccccc}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#ffffff;background-color:#5d6368}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#5d6368}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-inverse .navbar-link{color:#cccccc}.navbar-inverse .navbar-link:hover{color:#ffffff}.navbar-inverse .btn-link{color:#cccccc}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#ffffff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#cccccc}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:transparent;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#cccccc}.breadcrumb>.active{color:#7a8288}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:8px 12px;line-height:1.42857143;text-decoration:none;color:#ffffff;background-color:#3a3f44;border:1px solid rgba(0,0,0,0.6);margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#ffffff;background-color:transparent;border-color:rgba(0,0,0,0.6)}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#ffffff;background-color:#232628;border-color:rgba(0,0,0,0.6);cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#7a8288;background-color:#ffffff;border-color:rgba(0,0,0,0.6);cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:14px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#3a3f44;border:1px solid rgba(0,0,0,0.6);border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:transparent}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#7a8288;background-color:#3a3f44;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#ffffff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#ffffff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#3a3f44}.label-default[href]:hover,.label-default[href]:focus{background-color:#232628}.label-primary{background-color:#7a8288}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#62686d}.label-success{background-color:#62c462}.label-success[href]:hover,.label-success[href]:focus{background-color:#42b142}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f89406}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#c67605}.label-danger{background-color:#ee5f5b}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#e9322d}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;color:#ffffff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#7a8288;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#ffffff;background-color:#7a8288}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#1c1e22}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#050506}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#1c1e22;border:1px solid #0c0d0e;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#ffffff}.thumbnail .caption{padding:9px;color:#c8c8c8}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#62c462;border-color:#62bd4f;color:#ffffff}.alert-success hr{border-top-color:#55b142}.alert-success .alert-link{color:#e6e6e6}.alert-info{background-color:#5bc0de;border-color:#3dced8;color:#ffffff}.alert-info hr{border-top-color:#2ac7d2}.alert-info .alert-link{color:#e6e6e6}.alert-warning{background-color:#f89406;border-color:#e96506;color:#ffffff}.alert-warning hr{border-top-color:#d05a05}.alert-warning .alert-link{color:#e6e6e6}.alert-danger{background-color:#ee5f5b;border-color:#ed4d63;color:#ffffff}.alert-danger hr{border-top-color:#ea364f}.alert-danger .alert-link{color:#e6e6e6}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#1c1e22;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:12px;line-height:20px;color:#ffffff;text-align:center;background-color:#7a8288;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#62c462}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#f89406}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#ee5f5b}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#32383e;border:1px solid rgba(0,0,0,0.6)}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#c8c8c8}a.list-group-item .list-group-item-heading{color:#ffffff}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;color:#c8c8c8;background-color:#3e444c}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{background-color:#999999;color:#7a8288;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#7a8288}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#ffffff;background-color:#3e444c;border-color:rgba(0,0,0,0.6)}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#a2aab4}.list-group-item-success{color:#ffffff;background-color:#62c462}a.list-group-item-success{color:#ffffff}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#ffffff;background-color:#4fbd4f}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-info{color:#ffffff;background-color:#5bc0de}a.list-group-item-info{color:#ffffff}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#ffffff;background-color:#46b8da}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-warning{color:#ffffff;background-color:#f89406}a.list-group-item-warning{color:#ffffff}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#ffffff;background-color:#df8505}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-danger{color:#ffffff;background-color:#ee5f5b}a.list-group-item-danger{color:#ffffff}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#ffffff;background-color:#ec4844}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#2e3338;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#3e444c;border-top:1px solid rgba(0,0,0,0.6);border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-left:15px;padding-right:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #1c1e22}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid rgba(0,0,0,0.6)}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid rgba(0,0,0,0.6)}.panel-default{border-color:rgba(0,0,0,0.6)}.panel-default>.panel-heading{color:#c8c8c8;background-color:#3e444c;border-color:rgba(0,0,0,0.6)}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-default>.panel-heading .badge{color:#3e444c;background-color:#c8c8c8}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-primary{border-color:rgba(0,0,0,0.6)}.panel-primary>.panel-heading{color:#ffffff;background-color:#7a8288;border-color:rgba(0,0,0,0.6)}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-primary>.panel-heading .badge{color:#7a8288;background-color:#ffffff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-success{border-color:rgba(0,0,0,0.6)}.panel-success>.panel-heading{color:#ffffff;background-color:#62c462;border-color:rgba(0,0,0,0.6)}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-success>.panel-heading .badge{color:#62c462;background-color:#ffffff}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-info{border-color:rgba(0,0,0,0.6)}.panel-info>.panel-heading{color:#ffffff;background-color:#5bc0de;border-color:rgba(0,0,0,0.6)}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-info>.panel-heading .badge{color:#5bc0de;background-color:#ffffff}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-warning{border-color:rgba(0,0,0,0.6)}.panel-warning>.panel-heading{color:#ffffff;background-color:#f89406;border-color:rgba(0,0,0,0.6)}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-warning>.panel-heading .badge{color:#f89406;background-color:#ffffff}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-danger{border-color:rgba(0,0,0,0.6)}.panel-danger>.panel-heading{color:#ffffff;background-color:#ee5f5b;border-color:rgba(0,0,0,0.6)}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-danger>.panel-heading .badge{color:#ee5f5b;background-color:#ffffff}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#1c1e22;border:1px solid #0c0d0e;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#2e3338;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0}.modal-backdrop{position:absolute;top:0;right:0;left:0;background-color:#000000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:0.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #1c1e22;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{padding:20px;text-align:right;border-top:1px solid #1c1e22}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;visibility:visible;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:normal;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:0.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:rgba(0,0,0,0.9);border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:rgba(0,0,0,0.9)}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:rgba(0,0,0,0.9)}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:rgba(0,0,0,0.9)}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:rgba(0,0,0,0.9)}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:rgba(0,0,0,0.9)}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:rgba(0,0,0,0.9)}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:rgba(0,0,0,0.9)}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:rgba(0,0,0,0.9)}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:normal;line-height:1.42857143;text-align:left;background-color:#2e3338;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#2e3338;border-bottom:1px solid #22262a;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#666666;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#2e3338}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#666666;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#2e3338}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#666666;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#2e3338}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#666666;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#2e3338;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.next,.carousel-inner>.item.active.right{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);left:0}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);left:0}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:0.5;filter:alpha(opacity=50);font-size:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0.0001)));background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.0001)), to(rgba(0,0,0,0.5)));background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #ffffff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#ffffff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important;visibility:hidden !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:767px){.visible-xs-block{display:block !important}}@media (max-width:767px){.visible-xs-inline{display:inline !important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}}.navbar{background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none;border:1px solid rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3)}.navbar-inverse{background-image:-webkit-linear-gradient(#8a9196, #7a8288 60%, #70787d);background-image:-o-linear-gradient(#8a9196, #7a8288 60%, #70787d);background-image:-webkit-gradient(linear, left top, left bottom, from(#8a9196), color-stop(60%, #7a8288), to(#70787d));background-image:linear-gradient(#8a9196, #7a8288 60%, #70787d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff8a9196', endColorstr='#ff70787d', GradientType=0);-webkit-filter:none;filter:none}.navbar-inverse .badge{background-color:#5d6368}.navbar-nav>li>a{border-right:1px solid rgba(0,0,0,0.2);border-left:1px solid rgba(255,255,255,0.1)}.navbar-nav>li>a:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-o-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#191b1d));background-image:linear-gradient(#020202, #101112 40%, #191b1d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff191b1d', GradientType=0);-webkit-filter:none;filter:none;border-left-color:transparent}.navbar .nav .open>a{border-color:transparent}.navbar-nav>li.active>a{border-left-color:transparent}.navbar-form{margin-left:5px;margin-right:5px}.btn,.btn:hover{border-color:rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3)}.btn-default{background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.btn-default:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-o-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#191b1d));background-image:linear-gradient(#020202, #101112 40%, #191b1d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff191b1d', GradientType=0);-webkit-filter:none;filter:none}.btn-primary{background-image:-webkit-linear-gradient(#8a9196, #7a8288 60%, #70787d);background-image:-o-linear-gradient(#8a9196, #7a8288 60%, #70787d);background-image:-webkit-gradient(linear, left top, left bottom, from(#8a9196), color-stop(60%, #7a8288), to(#70787d));background-image:linear-gradient(#8a9196, #7a8288 60%, #70787d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff8a9196', endColorstr='#ff70787d', GradientType=0);-webkit-filter:none;filter:none}.btn-primary:hover{background-image:-webkit-linear-gradient(#404448, #4e5458 40%, #585e62);background-image:-o-linear-gradient(#404448, #4e5458 40%, #585e62);background-image:-webkit-gradient(linear, left top, left bottom, from(#404448), color-stop(40%, #4e5458), to(#585e62));background-image:linear-gradient(#404448, #4e5458 40%, #585e62);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff404448', endColorstr='#ff585e62', GradientType=0);-webkit-filter:none;filter:none}.btn-success{background-image:-webkit-linear-gradient(#78cc78, #62c462 60%, #53be53);background-image:-o-linear-gradient(#78cc78, #62c462 60%, #53be53);background-image:-webkit-gradient(linear, left top, left bottom, from(#78cc78), color-stop(60%, #62c462), to(#53be53));background-image:linear-gradient(#78cc78, #62c462 60%, #53be53);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff78cc78', endColorstr='#ff53be53', GradientType=0);-webkit-filter:none;filter:none}.btn-success:hover{background-image:-webkit-linear-gradient(#2f7d2f, #379337 40%, #3da23d);background-image:-o-linear-gradient(#2f7d2f, #379337 40%, #3da23d);background-image:-webkit-gradient(linear, left top, left bottom, from(#2f7d2f), color-stop(40%, #379337), to(#3da23d));background-image:linear-gradient(#2f7d2f, #379337 40%, #3da23d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f7d2f', endColorstr='#ff3da23d', GradientType=0);-webkit-filter:none;filter:none}.btn-info{background-image:-webkit-linear-gradient(#74cae3, #5bc0de 60%, #4ab9db);background-image:-o-linear-gradient(#74cae3, #5bc0de 60%, #4ab9db);background-image:-webkit-gradient(linear, left top, left bottom, from(#74cae3), color-stop(60%, #5bc0de), to(#4ab9db));background-image:linear-gradient(#74cae3, #5bc0de 60%, #4ab9db);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff74cae3', endColorstr='#ff4ab9db', GradientType=0);-webkit-filter:none;filter:none}.btn-info:hover{background-image:-webkit-linear-gradient(#20829f, #2596b8 40%, #28a4c9);background-image:-o-linear-gradient(#20829f, #2596b8 40%, #28a4c9);background-image:-webkit-gradient(linear, left top, left bottom, from(#20829f), color-stop(40%, #2596b8), to(#28a4c9));background-image:linear-gradient(#20829f, #2596b8 40%, #28a4c9);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff20829f', endColorstr='#ff28a4c9', GradientType=0);-webkit-filter:none;filter:none}.btn-warning{background-image:-webkit-linear-gradient(#faa123, #f89406 60%, #e48806);background-image:-o-linear-gradient(#faa123, #f89406 60%, #e48806);background-image:-webkit-gradient(linear, left top, left bottom, from(#faa123), color-stop(60%, #f89406), to(#e48806));background-image:linear-gradient(#faa123, #f89406 60%, #e48806);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffaa123', endColorstr='#ffe48806', GradientType=0);-webkit-filter:none;filter:none}.btn-warning:hover{background-image:-webkit-linear-gradient(#804d03, #9e5f04 40%, #b26a04);background-image:-o-linear-gradient(#804d03, #9e5f04 40%, #b26a04);background-image:-webkit-gradient(linear, left top, left bottom, from(#804d03), color-stop(40%, #9e5f04), to(#b26a04));background-image:linear-gradient(#804d03, #9e5f04 40%, #b26a04);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff804d03', endColorstr='#ffb26a04', GradientType=0);-webkit-filter:none;filter:none}.btn-danger{background-image:-webkit-linear-gradient(#f17a77, #ee5f5b 60%, #ec4d49);background-image:-o-linear-gradient(#f17a77, #ee5f5b 60%, #ec4d49);background-image:-webkit-gradient(linear, left top, left bottom, from(#f17a77), color-stop(60%, #ee5f5b), to(#ec4d49));background-image:linear-gradient(#f17a77, #ee5f5b 60%, #ec4d49);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff17a77', endColorstr='#ffec4d49', GradientType=0);-webkit-filter:none;filter:none}.btn-danger:hover{background-image:-webkit-linear-gradient(#bb1813, #d71c16 40%, #e7201a);background-image:-o-linear-gradient(#bb1813, #d71c16 40%, #e7201a);background-image:-webkit-gradient(linear, left top, left bottom, from(#bb1813), color-stop(40%, #d71c16), to(#e7201a));background-image:linear-gradient(#bb1813, #d71c16 40%, #e7201a);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbb1813', endColorstr='#ffe7201a', GradientType=0);-webkit-filter:none;filter:none}.btn-link,.btn-link:hover{border-color:transparent}h1,h2,h3,h4,h5,h6{text-shadow:-1px -1px 0 rgba(0,0,0,0.3)}.text-primary,.text-primary:hover{color:#7a8288}.text-success,.text-success:hover{color:#62c462}.text-danger,.text-danger:hover{color:#ee5f5b}.text-warning,.text-warning:hover{color:#f89406}.text-info,.text-info:hover{color:#5bc0de}.table .success,.table .warning,.table .danger,.table .info{color:#fff}.table-bordered tbody tr.success td,.table-bordered tbody tr.warning td,.table-bordered tbody tr.danger td,.table-bordered tbody tr.success:hover td,.table-bordered tbody tr.warning:hover td,.table-bordered tbody tr.danger:hover td{border-color:#1c1e22}.table-responsive>.table{background-color:#2e3338}input,textarea{color:#272b30}.has-warning .help-block,.has-warning .control-label,.has-warning .form-control-feedback{color:#f89406}.has-warning .form-control,.has-warning .form-control:focus{border-color:#f89406}.has-warning .input-group-addon{background-color:#272b30;border:none}.has-error .help-block,.has-error .control-label,.has-error .form-control-feedback{color:#ee5f5b}.has-error .form-control,.has-error .form-control:focus{border-color:#ee5f5b}.has-error .input-group-addon{background-color:#272b30;border:none}.has-success .help-block,.has-success .control-label,.has-success .form-control-feedback{color:#62c462}.has-success .form-control,.has-success .form-control:focus{border-color:#62c462}.has-success .input-group-addon{background-color:#272b30;border:none}legend{color:#fff}.input-group-addon{border-color:rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3);background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none;color:#ffffff}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{border-color:rgba(0,0,0,0.6)}.nav-pills>li>a{background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none;border:1px solid rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3)}.nav-pills>li>a:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-o-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#191b1d));background-image:linear-gradient(#020202, #101112 40%, #191b1d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff191b1d', GradientType=0);-webkit-filter:none;filter:none;border:1px solid rgba(0,0,0,0.6)}.nav-pills>li.active>a,.nav-pills>li.active>a:hover{background-color:none;background-image:-webkit-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-o-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#191b1d));background-image:linear-gradient(#020202, #101112 40%, #191b1d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff191b1d', GradientType=0);-webkit-filter:none;filter:none;border:1px solid rgba(0,0,0,0.6)}.nav-pills>li.disabled>a,.nav-pills>li.disabled>a:hover{background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.pagination>li>a,.pagination>li>span{text-shadow:1px 1px 1px rgba(0,0,0,0.3);background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.pagination>li>a:hover,.pagination>li>span:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-o-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#191b1d));background-image:linear-gradient(#020202, #101112 40%, #191b1d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff191b1d', GradientType=0);-webkit-filter:none;filter:none}.pagination>li.active>a,.pagination>li.active>span{background-image:-webkit-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-o-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#191b1d));background-image:linear-gradient(#020202, #101112 40%, #191b1d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff191b1d', GradientType=0);-webkit-filter:none;filter:none}.pagination>li.disabled>a,.pagination>li.disabled>a:hover,.pagination>li.disabled>span,.pagination>li.disabled>span:hover{background-color:transparent;background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.pager>li>a{background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none;text-shadow:1px 1px 1px rgba(0,0,0,0.3)}.pager>li>a:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-o-linear-gradient(#020202, #101112 40%, #191b1d);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#191b1d));background-image:linear-gradient(#020202, #101112 40%, #191b1d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff191b1d', GradientType=0);-webkit-filter:none;filter:none}.pager>li.disabled>a,.pager>li.disabled>a:hover{background-color:transparent;background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.breadcrumb{border:1px solid rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3);background-image:-webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-o-linear-gradient(#484e55, #3a3f44 60%, #313539);background-image:-webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));background-image:linear-gradient(#484e55, #3a3f44 60%, #313539);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.alert .alert-link,.alert a{color:#fff;text-decoration:underline}.alert .close{color:#000000;text-decoration:none}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#0c0d0e}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{border-color:rgba(0,0,0,0.6)}a.list-group-item-success.active{background-color:#62c462}a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{background-color:#4fbd4f}a.list-group-item-warning.active{background-color:#f89406}a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{background-color:#df8505}a.list-group-item-danger.active{background-color:#ee5f5b}a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{background-color:#ec4844}.jumbotron{border:1px solid rgba(0,0,0,0.6)}.panel-primary .panel-heading,.panel-success .panel-heading,.panel-danger .panel-heading,.panel-warning .panel-heading,.panel-info .panel-heading{border-color:#000} \ No newline at end of file diff --git a/SDrive/programs/Mod15/COM330-77260-03/css/bootswatch.min.css b/SDrive/programs/Mod15/COM330-77260-03/css/bootswatch.min.css new file mode 100644 index 0000000..32e755c --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/css/bootswatch.min.css @@ -0,0 +1 @@ +body{padding-top:50px}body>.navbar{-webkit-transition:background-color 300ms ease-in;transition:background-color 300ms ease-in}@media (min-width:768px){body>.navbar-transparent{background-color:transparent}body>.navbar-transparent .navbar-nav>.open>a{background-color:transparent!important}}#home{padding-top:0}#home .navbar-brand{padding:13.5px 15px 12.5px}#home .navbar-brand>img{display:inline;margin:0 10px;height:100%}#banner{min-height:300px;border-bottom:none}.page-header h1{font-size:4em}.bs-docs-section{margin-top:8em}.bs-component{position:relative}.bs-component .modal{position:relative;top:auto;right:auto;left:auto;bottom:auto;z-index:1;display:block}.bs-component .modal-dialog{width:90%}.bs-component .popover{position:relative;display:inline-block;width:220px;margin:20px}#source-button{position:absolute;top:0;right:0;z-index:100;font-weight:700}.nav-tabs{margin-bottom:15px}.progress{margin-bottom:10px}footer{margin:5em 0}footer li{float:left;margin-right:1.5em;margin-bottom:1.5em}footer p{clear:left;margin-bottom:0}.splash{padding:9em 0 2em;background-color:#141d27;background-image:url(../img/bg.jpg);background-size:cover;background-attachment:fixed;color:#fff;text-align:center}.splash .logo{width:160px}.splash h1{font-size:3em}.splash #social{margin:2em 0}.splash .alert{margin:2em 0}.section-tout{padding:4em 0 3em;border-bottom:1px solid rgba(0,0,0,.05);background-color:#eaf1f1}.section-tout .fa{margin-right:.5em}.section-tout p{margin-bottom:3em}.section-preview{padding:4em 0 4em}.section-preview .preview{margin-bottom:4em;background-color:#eaf1f1}.section-preview .preview .image{position:relative}.section-preview .preview .image:before{box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);position:absolute;top:0;left:0;width:100%;height:100%;content:"";pointer-events:none}.section-preview .preview .options{padding:1em 2em 2em;border:1px solid rgba(0,0,0,.05);border-top:none;text-align:center}.section-preview .preview .options p{margin-bottom:2em}.section-preview .dropdown-menu{text-align:left}.section-preview .lead{margin-bottom:2em}@media (max-width:767px){.section-preview .image img{width:100%}}.sponsor{text-align:center}.sponsor a:hover{text-decoration:none}@media (max-width:767px){.splash{padding-top:4em}.splash .logo{width:100px}.splash h1{font-size:2em}#banner{margin-bottom:2em;text-align:center}} \ No newline at end of file diff --git a/SDrive/programs/Mod15/COM330-77260-03/css/jquery-ui.css b/SDrive/programs/Mod15/COM330-77260-03/css/jquery-ui.css new file mode 100644 index 0000000..238bf9a --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/css/jquery-ui.css @@ -0,0 +1,1225 @@ +/*! jQuery UI - v1.11.3 - 2015-02-12 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x; + color: #222222; +} +.ui-widget-content a { + color: #222222; +} +.ui-widget-header { + border: 1px solid #aaaaaa; + background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x; + color: #222222; + font-weight: bold; +} +.ui-widget-header a { + color: #222222; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #d3d3d3; + background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x; + font-weight: normal; + color: #555555; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #555555; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #999999; + background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #212121; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #aaaaaa; + background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #212121; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fcefa1; + background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x; + color: #cd0a0a; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #cd0a0a; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #cd0a0a; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_222222_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("images/ui-icons_222222_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("images/ui-icons_888888_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("images/ui-icons_454545_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("images/ui-icons_2e83ff_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_cd0a0a_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -8px 0 0 -8px; + padding: 8px; + background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); /* support: IE8 */ + border-radius: 8px; +} diff --git a/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.eot b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.eot differ diff --git a/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.svg b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..94fb549 --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.ttf b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.ttf differ diff --git a/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.woff b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.woff differ diff --git a/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.woff2 b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/SDrive/programs/Mod15/COM330-77260-03/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/SDrive/programs/Mod15/COM330-77260-03/index.php b/SDrive/programs/Mod15/COM330-77260-03/index.php new file mode 100644 index 0000000..8c0ffb4 --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/index.php @@ -0,0 +1,2 @@ +' + value.stateName + ''); + }); + + var numbers = ["London", "Tokyo", "New York", "Honolulu", "Sydney", "Paris", + "Rome", "Barcelona", "Copenhagen"]; + var option = ''; + for (var i = 0; i < numbers.length; i++){ + option += ''; + } + $('#citiesToVisit').append(option); + $('#citiesToVisit').attr({ + 'multiple': 'multiple', + 'width': '200px', + 'height': '100px' + }); +}); \ No newline at end of file diff --git a/SDrive/programs/Mod15/COM330-77260-03/js/bootstrap.min.js b/SDrive/programs/Mod15/COM330-77260-03/js/bootstrap.min.js new file mode 100644 index 0000000..c6d3692 --- /dev/null +++ b/SDrive/programs/Mod15/COM330-77260-03/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.2 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.2",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.2",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.2",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.2",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.2",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('