Skip to content

Instantly share code, notes, and snippets.

<?php
for ($i = 1; $i <= 20; $i++)
{
if($i % 3 == 0 && $i % 5 ==0){
echo "WhizzBang\n";
}
else if($i % 3 == 0){
echo "Whizz\n";
}
else if($i % 5 == 0){
@CasonBarnhill
CasonBarnhill / gist:6d4606b29ca5ca7e2956
Created December 4, 2015 20:33
week-5-day-3 Assignment
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace week5day3
{
class LibraryManager
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PetaPoco;
namespace week5day1
{
public class Return
--Import the librarybooks.xlsx (librarybooks.xlsx) file into your database.
--Analyze the data and draw out a diagram of the table structures that you will need.
--Create the tables in sql to match your diagram
--Create queries to populate your tables from the librarybooks.xlsx table that you imported
--Answer the following questions:
--How many books are there total in the library?
--How many books are currently checked out?
--How many students are there?
--How many books are there in each category?
--How many books are checked out by category?
create table Cities
(
ID int identity (1,1),
PlaceName varchar(50) not null,
Estimate2013 int not null,
Census2010 int not null,
Change decimal (10,2) not null
);
using System;
namespace Week3Day4.Controllers
{
public class Post
{
public string Author;
public string Body { get; set; }
public int Id { get; set; }
public int NumberOfComments { get; set; }
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Week3day2
{
class Program
{
public class Bob
{
internal string hey(string remark)
{
if (NotSayingAnything(remark))
{
return "Fine. Be that way!";
}
namespace Week2Lab
{
public class Card
{
public Rank Rank { get; set; }
public Suit Suit { get; set; }
public int Value
{
get
{
namespace week_2_day_2.cs
{
// Mechanic Shop
//We are going to design an application for a local mechanic shop.
//They service 3 types of vehicles: Trucks, Race Cars, and Family Sedans.All vehicles can have their tires and oil changed.
//When filling up gas for the vehicles, we have to be careful what type of gas we put in: Regular, High Performance, and Diesel.
//Create a 'Shop' class, using generics, that can handle these 3 types of cars.
//This 'Shop' class will perform the following functions: ChangeOil and FillUp()
//The 'ChangeTire' function should be tacked on using an extension method of the Shop Class.
//Demonstrate what your Shop Class can do by creating instances of all 3 car types, the shop and call the ChangeTire, FillUp, and ChangeOil functions for each type.