Skip to content

Instantly share code, notes, and snippets.

View spaghettiSyntax's full-sized avatar
🏠
Working from home

spaghettiSyntax spaghettiSyntax

🏠
Working from home
View GitHub Profile
@spaghettiSyntax
spaghettiSyntax / ch4_classNotes.sql
Created December 7, 2017 07:02
murach's SQL SERVER 2016: Ch4 Class Notes
--10/10/17
--All invoices for vendors in CA
SELECT Invoices.InvoiceNumber --Invoices.InvoiceNumber isn't necessary to put, InvoiceNumber is fine. Less syntax is better, though.
, Invoices.VendorID --Asking which VendorID column are you referencing? Vendors? Or Invoices?
, Vendors.VendorName
FROM AP.dbo.Invoices INNER --INNER Not necessary, but always use the keyword for now until we get used to it.
JOIN AP.dbo.Vendors ON Invoices.VendorID = Vendors.VendorID --using AP.dbo. isn't necessary, but will select DB automatically if still on Master DB
WHERE VendorState = 'CA';
@spaghettiSyntax
spaghettiSyntax / cardDeal.py
Created December 7, 2017 06:36
Tony Gaddis Python: Card Deal Excercise
# This program deals a random 5 card draw.
# Edit program further to allow user to discard and pull new cards, as well.
import random
values = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A']
suits = ['Heart', 'Spade', 'Clubs', 'Diamonds']
HAND_SIZE = 5
@spaghettiSyntax
spaghettiSyntax / tempConversion.py
Created December 6, 2017 08:37
Tony Gaddis Python: Temperature Conversion Table
# ch_4_jrn8_ex6.py
# Celsius to Fahrenheit Table
# Print the table headings.
print('Farenheit\t Celsius')
print('------------------------')
# Print the degree comparisons 0-20 Celsius to Farenheit
for celsius in range(0, 21):
farenheit = 9 / 5 * celsius + 32
@spaghettiSyntax
spaghettiSyntax / fractions.py
Created December 6, 2017 08:31
Tony Gaddis Python: Fractions
# Anthony McCann
# 11/13/17
# CPW 101 Programming Assignment 6
# The primary purpose of this assignment is to apply a for loop, a range,
# and a variable to generate a sequence of values. The secondary purpose
# of this assignment is to use a running total.
user_value = int(input('Input a positive integer: '))
@spaghettiSyntax
spaghettiSyntax / sentinel.py
Created December 6, 2017 08:26
Tony Gaddis Python: Sentinel
# Extra Credit sentinel loop to promp user for numbers.
# Any number less than zero, method should display all
# non-negative numbers typed.
total = 0
print()
print('Now we will add up some integers\n'
'Input numbers, one at a time,\n'
'entering a negative integer to\n'
'stop the process.')
@spaghettiSyntax
spaghettiSyntax / coinConverter.py
Created December 6, 2017 08:25
Tony Gaddis Python: Coin Converter
# 11/6/17
# This file contains starter code for the following:
# Modify a previous program so that the user
# can use its code as many times as they wish.
CENTS_PER_QUARTER = 25 # a quarter is 25 cents
CENTS_PER_DIME = 10 # a dime is 10 cents
CENTS_PER_NICKEL = 5 # a nickel is 5 cents
@spaghettiSyntax
spaghettiSyntax / windChill.py
Created December 6, 2017 08:18
Tony Gaddis Python: Wind Chill Table
# 11/13/17
# Wind chill values. Rows should represent windspeed from 10 to
# 60 mph inclusive in 5 mph increments. Columns should
# represent temperatures from -20 to 60 inclusive in
# 10-degree increments.
# Print x values of table.
print()
print('Wind Chill Table')
@spaghettiSyntax
spaghettiSyntax / bonSucreBistro.html
Created December 6, 2017 08:09
HTML/CSS: Bon Sucre Bistro
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Bon Sucre Bistro Home</title>
<link rel="stylesheet" href="css/site.css" />
<style>
#introText {
font: italic bold 1.1em Arial;
/*
font-style: italic;
@spaghettiSyntax
spaghettiSyntax / basicSiteStyled.html
Created December 6, 2017 08:08
HTML/CSS: Basic Site Styled
<!DOCTYPE html>
<html lang="en">
<head>
<title>Computer Programming</title>
<link rel="stylesheet" href="css/normalize.css" />
<style>
body{
font-size: 100%;
/* margin-top: 15px; */
margin-left: 1.5em;
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>AM Test Site</title>
</head>
<body style="text-align:center;" style="background-color:black;">
<h1 style="color:White;">AM Test Site</h1>
<p style="color:White;">This line intentionally left blank.</p>
<br>
<h2 style="color:White;">Visit My GitHub</h2>