- A recent version of Node.js
npm install -g create-react-app
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk | |
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these | |
> steps thoroughly. | |
Reset Steps: | |
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds. | |
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass. | |
3. Release both buttons. | |
4. Press the down buttons until the desk beeps one more time or 20 seconds pass. |
# #!/bin/bash | |
# # | |
# # provision.sh | |
# # | |
# # This file is specified in Vagrantfile and is loaded by Vagrant as the primary | |
# # provisioning script whenever the commands `vagrant up`, `vagrant provision`, | |
# # or `vagrant reload` are used. It provides all of the default packages and | |
# # configurations included with Varying Vagrant Vagrants. | |
# # By storing the date now, we can calculate the duration of provisioning at the |
First, Create a folder inside of lib
called seeds
Put your CSV file example.csv
into the lib/seeds
folder. In the example below, the file is called real_estate_transactions.csv
Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.
Rails' use of strict naming conventions means a lot of core code SHOULD be in the same format whoever writes it? It could be written by a friend, colleague or a computer... it shouldn't matter because the same Rails rules apply to everyone.
This means that Rails can actually do some tasks for you! It can actually build things and write code on your behalf...
Coming from another language like PHP, this can seem like magic.
::States = { AK: "Alaska", | |
AL: "Alabama", | |
AR: "Arkansas", | |
AS: "American Samoa", | |
AZ: "Arizona", | |
CA: "California", | |
CO: "Colorado", | |
CT: "Connecticut", | |
DC: "District of Columbia", | |
DE: "Delaware", |
The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.
- Single Responsibility Principle: a class should have only a single responsibility
- Open-Closed Principle: Software entities should be open for extension, but closed for modification (inherit instead of modifying existing classes).
- Liskov Substitution: Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
- Interface Segregation: Many client-specific interfaces are better than one general-purpose interface.
class Budget < ActiveRecord::Base | |
belongs_to :user | |
has_many :categories, dependent: :destroy | |
end |