This file contains hidden or 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
{ | |
"VehicleInformation": { | |
"ID": "1", | |
"GLASSCODE": "ABA124SL--14VAW2016J", | |
"MANUFACTURER": "ABARTH", | |
"FAMILY": "124", | |
"VARIANT": "SPIDER LAUNCH EDITION", | |
"SERIES": null, | |
"ENGINE": "TURBO MPFI", | |
"CCap": "1368", |
This file contains hidden or 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
# == Schema Information | |
# | |
# Table name: users | |
# | |
# id :bigint(8) not null, primary key | |
# username :text | |
# email :text | |
# image :text | |
# created_at :datetime not null | |
# updated_at :datetime not null |
This file contains hidden or 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
#user sseds | |
User.destroy_all | |
user1 = User.create :username => 'elli_jayne', :email => '[email protected]' | |
#album seed info | |
Album.destroy_all | |
album1 = Album.create :title => 'Take Off Your Pants And Jacket', :date => '2001-12-06', :tracks => 'Anthem Part, Two Online Songs, First Date, Happy Holidays You Bastard, Story of a Lonely Guy, The Rock Show, Stay Together for the Kids, Roller Coaster, Reckless Abandon, Every Time I Look for You, Give Me One Good Reason, Shut Up, Please Take Me Home, Time to Break Up' |
This file contains hidden or 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
class SessionController < ApplicationController | |
def new | |
end | |
def create | |
user = User.find_by :username => params[:username] | |
if user.present? && user.authenticate(params[:password]) | |
This file contains hidden or 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
require 'pry' | |
require 'rainbow' | |
def plan_trip (line, start_stop, end_stop) | |
n_line = ["times square", "n_34th", "n_28th", "n_23rd", "union square", "n_8th"] | |
puts Rainbow(n_line).green | |
l_line = ["l_8th", "l_6th", "union square", "l_3rd", "l_1st"] | |
puts Rainbow(l_line).red |
This file contains hidden or 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
# Calculate a trip time and cost given inputs for | |
# | |
# distance | |
# miles per gallon | |
# price per gallon | |
# speed in miles per hour | |
require 'rainbow' | |
def calc_option | |
puts "Trip Calculator" |
This file contains hidden or 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
$(document).ready(function() { | |
const balance = { | |
savings: 0, | |
checking: 0 | |
}; | |
//trying to use function for both accs to go red when on $0 | |
$(".balance").each(function(account) { | |
if $(balance[account] === 0) { |
This file contains hidden or 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
$(document).ready(function() { | |
const balance = { | |
savings: 0, | |
checking: 0 | |
}; | |
//CHANGING COLOR ON $0... | |
const zeroBalance = function() { | |
if (balance[0] === '0') { |
This file contains hidden or 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
const bank = { | |
//empty array of accounts | |
accounts: [], | |
}; | |
//add account function pushing into the empty accounts array. | |
const addAccount = function (name, balance) { | |
let newAccount = { | |
accountName: name, | |
balance: balance, |
This file contains hidden or 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
//create bank // | |
const bank = [ | |
{name: 'Melanie Sills', | |
currentBalance: 500 | |
}, | |
{name: 'Susan Oram', | |
currentBalance: 100 | |
}, |
NewerOlder