Skip to content

Instantly share code, notes, and snippets.

View chrisdel101's full-sized avatar

Chris Del chrisdel101

  • University of Regina
View GitHub Profile
@chrisdel101
chrisdel101 / .cpp
Last active March 29, 2021 21:16
Class template problem
// DOCTOR.h
template <class T>
class Doctor
{
private:
int id;
string name;
int favoriteRoom;
string specialty;
vector<Patient> waitlist;
;The semicolon is used to lead an inline documentation
;When you write your program, you could have your info at the top document lock
;For Example: Your Name, Student Number, what the program is for, and what it does etc.
;;; Directives
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
@chrisdel101
chrisdel101 / sector.txt
Last active March 21, 2021 22:37
Get sector access time
basic: Access Time = Seek time + Rotational latency + Transfer time (https://superuser.com/a/841680/855619)
Solution: tsector = Ts + L + T
Ts = seek time; average time to position head over track
r = rotation speed of the disk, in revolutions per second
n = bits per sector (capacity of sector)
N = bits per track (capacity of track)
tsector = time to access a sector
FOR L
Get Rotational latency in ms. Multiple by 60, then by 10,000
@chrisdel101
chrisdel101 / converter.s
Last active March 13, 2021 03:13
Converter ARM
;The semicolon is used to lead an inline documentation
;When you write your program, you could have your info at the top document block
;For Example: Your Name, Student Number, what the program is for, and what it does etc.
;
; See if you can figure out what this program does
;
;;; Directives
PRESERVE8
#include <iostream>
#include <vector>
using namespace std;
int adder(vector<int> &myElements, int &sum)
{
if (myElements.size() == 0)
{
cout << "sum " << sum << endl;
return sum;
#include <iostream>
#include <vector>
using namespace std;
int add(vector<int> myElements, int sum)
{
if (myElements.size() == 0)
{
cout << "sum " << sum << endl;
return sum;
@chrisdel101
chrisdel101 / n.conf
Created August 30, 2020 23:11
Nginx Ex
server {
listen 80 default_server;
root /var/www/wisdompetmed.local;
server_name wisdompetmed.local www.wisdompetmed.local;
index index.html index.htm index.php;
access_log /var/log/nginx/wisdompetmed.local.access.log;
error_log /var/log/nginx/wisdompetmed.local.error.log;
Last login: Sun Aug 30 12:18:59 on ttys003
➜ 01_09 vagrant ssh
-------------------------------------------------
Demo URL : http://192.168.0.3
-------------------------------------------------
==> vagrant: A new version of Vagrant is available: 2.2.10 (installed version: 2.2.7)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-111-generic x86_64)
Last login: Sun Aug 30 12:18:59 on ttys003
➜ 01_09 vagrant ssh
-------------------------------------------------
Demo URL : http://192.168.0.3
-------------------------------------------------
==> vagrant: A new version of Vagrant is available: 2.2.10 (installed version: 2.2.7)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-111-generic x86_64)
<body class="templateC subcategory spring-mesa page-personal breakpoint-lg" id="page-top" data-is-modal-opened="false" data-is-video-modal-opened="false" style="">
<div class="app-container stretch-content-Auto" id="js-app-container" style="position: relative;">