This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| \begin{document} | |
| \begin{center} | |
| {\small{} Early American History Lecture Notes} \\[0.6cm] | |
| {\small{} Cameron Carroll -- October 30, 2013} \\[0.6cm] | |
| {\small{} Cuyamaca College}\\[1cm] | |
| {\small{} Manifest Destiny}\\[1cm] | |
| \end{center} | |
| \tableofcontents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def parse_day_argument(day) | |
| case day | |
| when 'su', 'sun', 'sunday', '0' | |
| return :sunday | |
| when 'm', 'mo', 'mon', 'monday', '1' | |
| return :monday | |
| when 'tu', 'tue', 'tues', 'tuesday', '2' | |
| return :tuesday | |
| when 'w', 'we', 'wed', 'wednesday', '3' | |
| return :wednesday |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| volumes = [8.0 17.9 28.75 37.70 47.70]; | |
| masses = [96.015 105.895 116.529 125.625 135.757]; | |
| tare = 88.543; | |
| masses = masses - tare | |
| average_volume = mean(volumes) | |
| average_mass = mean(masses) | |
| m = sum((masses - average_mass) .* (volumes - average_volume)) / sum((masses - average_mass).^2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //db.js | |
| createUserContainer: function(username, password, callback) { | |
| if (username && password) { | |
| var raw_message = 'BLG' + username; | |
| var fileString = __dirname + '/../user_data/' + username + '.blg'; | |
| applib.hashMessage(raw_message, password, function(message) { | |
| fs.writeFile(fileString, message, function(err) { | |
| callback(err); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: node app.js | |
| worker: node consumer.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include "boost/variant.hpp" | |
| using namespace std; | |
| // employee_data[0] holds employee IDs (int) | |
| // employee_data[1] holds hours worked (int) | |
| // employee_data[2] holds pay rate (double) | |
| // employee_data[3] holds wages (double) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File: Project_1A_CCarroll.cpp | |
| // Author: Cameron Carroll | |
| // Date: September 11, 2012 | |
| // CSIS 138, Project 1 Part A | |
| #include "Project_1A_CCarroll.hpp" | |
| #include <cmath> | |
| double convert_f_to_c(double fahrenheit_temperature) { | |
| double celsius_temperature = (5.0/9.0) * (fahrenheit_temperature - 32.0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo yum install postgresql-server postgresql-libs postgresql-contrib postgresql-devel | |
| sudo systemctl enable postgresql.service | |
| sudo postgresql-setup initdb | |
| sudo systemctl start postgresql.service | |
| su -l postgres | |
| createuser --no-superuser --no-createroles --pwprompt [username] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [3] pry(main)> db.execute "select * from Users" | |
| => [["sanarothe2", | |
| "f82e77528ed1a1cc7fe33fcf751d90b11cd77d45", | |
| "3eec25493d63be0ad6fc3e196d9b0e472babddb7", | |
| "cccb6c91-c722-44cd-adce-51504e717bdb"], | |
| ["sanarothe", | |
| "6dc00946d373b7eeffff8b2a09535bd3105eb201", | |
| "0d01e5810b361c02731a8c178014ccbe86ca6f07", | |
| "b315763b-d234-4e2c-908a-7c403987785d"]] | |
| [4] pry(main)> db.execute "select * from Users where Username=?", 'sanarothe' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (continues to list that most (if not absolutely) every package on the system "will be erased.") | |
| ... | |
| ... | |
| ---> Package hyphen-en.noarch 0:2.8.3-1.fc17 will be erased | |
| ---> Package mythes-en.noarch 0:3.0-9.fc17 will be erased | |
| ---> Package mythes-en.noarch 0:3.0-9.fc17 will be erased | |
| ---> Package mythes-en.noarch 0:3.0-9.fc17 will be erased | |
| --> Processing Dependency: /sbin/new-kernel-pkg for package: kernel-3.4.4-5.fc17.x86_64 | |
| Skipping the running kernel: kernel-3.4.4-5.fc17.x86_64 | |
| --> Processing Dependency: /bin/sh for package: kernel-3.4.4-5.fc17.x86_64 |