This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- I clearly copied and pasted some of this...check for over complexity please!--> | |
<style> | |
html, body{ | |
min-height: 100%; | |
} | |
body{ |
This file contains 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
//The purpose of this assignment was to create a program that would | |
//allow teachers to input three test scores, and get the average of | |
//those three. It specifically required the use of two functions | |
//(getTestScore and calcAverage)in the way I use them below. I | |
//added functionality to make it so that if the teacher put in a | |
//wrong value, such as a letter in place of a number for a number | |
//only variable (double or int) it would simply ask for input again | |
//until such a time as valid input is given. Also ensured that the | |
// >> operator would not freeze with invalid input. I also enabled | |
//teachers to do this for a certain number of students, and assign |
This file contains 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
//I got a tiny bit further in the book and realized I was | |
//coding pretty inefficiently in the switch/case area. | |
//These are the updates I made to that. | |
// | |
#include <iostream> | |
#include <iomanip> | |
#include <typeinfo> | |
#include <limits> |
This file contains 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
//The purpose of the original assignment was to create a program that would | |
//allow teachers to input three test scores, and get the average of | |
//those three. I've altered it quite a bit, and the current version includes | |
//my first attempt at vectors (just taught myself how to use them today.) | |
//Planning on eventually making the averages be stored/retreivable. | |
//Also note that I follow the whitespace convention of indenting | |
//loops and if statements in entirety, and again for the body. | |
#include <iostream> |
This file contains 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
import Foundation | |
struct ScopedPrintableStack: CustomStringConvertible | |
{ | |
var items = [String]() | |
var description: String | |
{ | |
var tabbedStackString:String = "" | |
for (index, string) in items.enumerated() |
This file contains 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
import Foundation | |
infix operator =!& : AssignmentPrecedence | |
func =!&<T:NSCopying>(lhs: inout T, rhs: T) | |
{ | |
lhs = rhs.copy(with: nil) as! T | |
} |
This file contains 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
import Foundation | |
import CoreData | |
class CopyingCodable : Encodable, Decodable, NSCopying | |
{ | |
func copy(with zone: NSZone? = nil) -> Any | |
{ //this is like...the ugliest code I've ever written | |
return try! JSONDecoder().decode( | |
type(of: self), | |
from: try! JSONEncoder().encode(self) |
This file contains 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
// AppManagedDataController.swift | |
// Yah-El | |
// | |
// Created by Austen Strine on 5/20/19. | |
// Copyright © 2019 GoGreen. All rights reserved. | |
// | |
import CoreData |
This file contains 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
import 'package:json_annotation/json_annotation.dart'; | |
import 'package:gogreen_utility_belt/interface_class/JSONSerializable.dart'; | |
part 'Product.g.dart'; //flutter pub run build_runner build | |
@JsonSerializable() | |
class Product extends JSONSerializable { | |
static final Product example = Product(//comment out on build_runner build | |
upc: '10000000000', | |
inventory: 0, | |
categories: ['Rum'], |
This file contains 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
import Foundation | |
protocol PropertyLoopable { | |
func allProperties() -> [String: Any?] | |
} | |
extension Optional { | |
func unwrappedDebugString() -> String { | |
switch self { |
OlderNewer