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
def calculate_product(arr) | |
# your code here | |
end | |
# define a method that takes an array of positive integers, | |
# and returns a new array that for each element | |
# contains the product of all other elements | |
# except the element in the original array |
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
# This file should contain all the record creation needed to seed the database with its default values. | |
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). | |
# | |
# Examples: | |
# | |
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) | |
# Character.create(name: 'Luke', movie: movies.first) | |
require 'faker' | |
Comment.destroy_all |
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
.main { | |
display: grid; | |
grid-template-columns: 1fr 1fr; | |
grid-column-gap: 36px; | |
margin: 200px; | |
} | |
.list { | |
margin-bottom: 10px; |
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
# This is a script for setting up the front end of Rails App | |
# run this file from your root folder with ruby right after doing rails new | |
`yarn add bootstrap` | |
`yarn add jquery popper.js` | |
`echo "gem 'simple_form'" >> Gemfile` | |
`bundle install` | |
`rails generate simple_form:install --bootstrap` | |
`rm app/assets/stylesheets/application.css` |