Mobilize America event API documentation:
- https://github.com/mobilizeamerica/api
- Important Note: Endpoint URL in the documentation is incorrect/outdated, see API endpoint below.
Mobilize America event API documentation:
I hereby claim:
To claim this, I am signing this object:
var randomNumber = Math.floor(Math.random()*101); | |
var userName = prompt("What is your name?"); | |
var guess = prompt("Please guess a number 1 - 100:"); | |
if (guess == randomNumber) { | |
alert(userName + ", you guessed correctly! You win!"); | |
} else { | |
alert(userName + ", that is the wrong number! You lose!"); | |
} |
class Card | |
attr_reader :suit, :numeral, :card | |
def initialize | |
@numeral = %w[1 2 3 4 5 6 7 8 9 10 J Q K A].sample | |
@suit = %w[♦ ♠ ♥ ♣].sample | |
@card = "#{@numeral}#{@suit}" | |
return @card | |
end |
class Whiteboard | |
attr_accessor :contents | |
def initialize(contents = []) | |
@contents = contents | |
end | |
def clean | |
@contents = [] | |
end |
class Whiteboard | |
attr_accessor :contents | |
def initialize(contents = []) | |
@contents = contents | |
end | |
def clean | |
@contents = [] | |
end |
class Car | |
def initialize(color, owner, cylinders) | |
@color = color | |
@owner = owner | |
@cylinders = cylinders | |
end | |
def color | |
@color | |
end |
class TV | |
def initialize(model = nil, size = nil, resolution = nil) | |
if model.nil? | |
@model = ["Sony", "LG", "Samsung", "Vizio"].sample | |
else | |
@model = model | |
end | |
if size.nil? | |
@size = [19, 28, 30, 32, 36, 38, 42, 52].sample |
class Card | |
def initialize(rank = nil, suit = nil) | |
if suit.nil? | |
@suit = ['♠', '♣', '♥', '♦'].sample | |
else | |
@suit = suit | |
end | |
if rank.nil? | |
@rank = ((2..10).to_a + ["A", "J", "Q", "K"]).sample |
CREATE TABLE recipes (id serial, name varchar(255) NOT NULL, directions TEXT); | |
CREATE TABLE ingredients (id serial, items TEXT); | |
INSERT INTO recipes (name, directions) | |
VALUES ('Green Eggs & Ham', '1. Cook the eggs. | |
2. Cook the ham. | |
3. Combine.'); | |
INSERT INTO recipes (name, directions) | |
VALUES ('Fried Green Tomatoes', '1. Slice the tomatoes 1/2 inch thick. |