-
Describe, in as much detail as you can, what happens when you open up Google Chrome, type "marcylabschool.org" into the address bar, and press enter.
-
HTTP is a "stateless" protocol - what does this mean?
-
Given that HTTP is a stateless protocol, how do we build "stateful" web applications.
-
What is the difference between HTTP and HTTPS?
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 Person | |
attr_accessor :name | |
end |
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 Players < ActiveRecord::Base | |
end |
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 CreatePlayers ActiveRecord::Migration | |
def change | |
create_table :players do |p| | |
p.string :name | |
p.string :team | |
p.string :position | |
p.timestamps null: false #the timestamp simply keeps track of when our database was updated. | |
end | |
end |
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
def an_awesome_method | |
puts "This method is not awesome" | |
end |
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
check_a_random_number(make_a_random_number) | |
The random number is 61 | |
That's a big number! | |
=> nil |
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
def make_a_random_number | |
number = rand(1..100) | |
puts "The random number is #{number}" | |
number | |
end |
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
check_a_random_number(make_a_random_number) | |
The random number is 4 | |
NoMethodError: undefined method `>' for nil:NilClass | |
from (irb):23:in `check_a_random_number' | |
from (irb):27 |
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
def check_a_random_number(number) | |
puts "That's a big number!" if number > 50 | |
puts "That number's not that big!" if number <= 50 | |
end |
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
def make_a_random_number | |
number = rand(1..100) | |
puts "The random number is #{number}" | |
end |
NewerOlder