Skip to content

Instantly share code, notes, and snippets.

View jerrycoe's full-sized avatar

Jerry Coe jerrycoe

  • Southern California
View GitHub Profile
@jerrycoe
jerrycoe / layout.cshtml
Created July 21, 2018 04:32
Bootstrap 4.1 Asp.Net Layout Template
@inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
<title>@ViewData["Title"] - Application</title>
@jerrycoe
jerrycoe / layout.html
Created July 21, 2018 04:11
Bootstrap 4.1 Layout Template
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
<title>Application</title>
@jerrycoe
jerrycoe / wp-template.php
Last active May 28, 2018 20:35
Custom Page or Post Template for Wordpress
<?php
/**
* Template Name: Template Name
* Template Post Type: post, page
*
* @package Wordpress
* @subpackage Theme Name
*/
?>
<?php get_header(); ?>
@jerrycoe
jerrycoe / class.cpp
Last active June 20, 2018 08:32
Program that lists students in alpha order
int studentAmount, i = 1;
string first, last, temp;
cout << "How many students" << endl;
cin >> studentAmount;
while(i <= studentAmount)
{
cout << "Student #" << i << ": ";
cin >> temp;
@jerrycoe
jerrycoe / salesbarchart.cpp
Last active July 4, 2018 07:20
c++ rounding and bar chart example
/*
Chapter No. 5 - Exercise No. 24
File Name: Ch5Ex24.cpp
Programmer: Jerry Coe
Date Last Modified: October 10, 2017
Problem Statement: Write a program that asks the user to enter today's sales rounded to the nearest $100 for each of three stores. The program should then produce a bar graph displaying each store's sales. Create each bar in the graph by displaying a row of asterisks. Each asterisk should represent $100 of sales.
*/
@jerrycoe
jerrycoe / hotelsuites.cpp
Last active June 26, 2020 13:35
c++ - occupancy rate calculation example
/*
Chapter No. 5 - Exercise No. 19
File Name: Ch5Ex19.cpp
Programmer: Jerry Coe
Date Last Modified: October 10, 2017
Problem Statement: Write a program that calculates the occupancy rate of the 120 suites (20 per floor) located on the top six floors of a 15-story luxury hotel. These are floors 10-12 and 14-16 because, like many hotels , there is no 13th floor. Solve the problem by using a single loop that iterates once for each floor between 10 and 16 and, on each iteration, asks the user to input the number of suites occupied on that floor. Use a nested loop to validate that the value entered is between O and 20 . After all the iterations, the program should display how many suites the hotel has, how many of them are occupied, and what percentage of them are occupied .
Overall Plan:
1. Create variables for floor, totalSuites, occupantCount, occupantRate