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
<!DOCTYPE html> | |
<html lang=“en”> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!--[if lt IE 9]> | |
<script src="dist/html5shiv.js"></script> | |
<![endif]--> | |
<title>Jen Vo - About Me</title> | |
</head> |
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
.container { | |
width: 80%; | |
margin: 0 auto; | |
} | |
.header h1 { | |
text-align: center; | |
} | |
.image { | |
display: inline-block; | |
float: left; |
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
<!DOCTYPE html> | |
<html lang=“en”> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="css/normalize.css"> | |
<link rel="stylesheet" href="css/about_styles.css"> | |
<!--[if lt IE 9]> | |
<script src="dist/html5shiv.js"></script> |
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 flattify(array) | |
array.each_with_object([]) do |element, flattened| | |
flattened.push *(element.is_a?(Array) ? flattify(element) : element) | |
end | |
end |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Kervin Vasquez!</title> |
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 greeting | |
puts "Your name:" | |
name = gets.chomp | |
puts "Hello" + " " + name | |
end | |
greeting | |
variable is used to store values in the memory, method is a function, argument is variable that we give a method | |
"2" + "2" doesn't give you 4 in Ruby because they are strings |
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
if (5==5) && (1!=2) | |
puts "You are wonderful" | |
else | |
3.times do | |
puts "You Suck!" | |
end | |
end |
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 fav_foods | |
food_array = [] | |
3.times do | |
puts "Name a favorite food." | |
food_array << gets.chomp | |
puts "Your favorite foods are #{food_array.join(", ")}." | |
food_array.each { |food| puts "Seriously? I really love #{food} too!"} | |
array.push("Mango") | |
array.pop | |
array.reverse! |
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
class Cat | |
attr_reader :color, :breed | |
attr_accessor :name | |
def initialize(color, breed) | |
@color = color | |
@breed = breed | |
@hungry = true | |
end |
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
require_relative './pet' | |
class Cat < Pet | |
def speak | |
puts "Meow!" | |
end | |
end | |
kitty = Cat.new("beige", "Persian") |
OlderNewer