Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions RichardLin_RichardLin3/Me.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello my name is Richard Lin and I'm pretty awesome. My most secret secret is still a secret so you cant know. I dont know what to say. So goodbye...
16 changes: 16 additions & 0 deletions RichardLin_RichardLin3/exercises/d1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/home/richard/ixperience/projects/profile/stylesheets/style.css">
<title>Richard Lin</title>
</head>
<body>
<img src="https://scontent-lhr3-1.xx.fbcdn.net/hphotos-xpa1/v/t1.0-9/p206x206/10255373_10153439848560127_550189313629077084_n.jpg?oh=58b16cbab2d4595b693710a698560e6a&oe=55E82D5D">
<h1>Hi! My name is Richard Lin</h1>
<h2>I am currently a Computer Science major at Wayne State University</h3>
<p>WSU is located in the center of Midtown Detroit</p>
<p>I was born on February 4th, 1993 in Detroit.</p>
<p>I wanted to learn how to code because I disliked marketing.(Very random I know)</p>
<p>What I'm really looking forward to do while I'm in South Africa is shark cage diving</p>
</body>
</html>
18 changes: 18 additions & 0 deletions RichardLin_RichardLin3/exercises/d1/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
body {
background-image: center;
background-image: url(http://www.zastavki.com/pictures/originals/2015/Cities_Cape_Town_South_Africa_095018_.jpg);
text-align: center;
}
h1 {
color: white;
}
h2 {
color: white;
}
p {
background: linear-gradient(bottom, rgba(0,0,0,1), rgba(0,0,0,.4));
background: -webkit-linear-gradient(bottom, rgba(0,0,0,1), rgba(0,0,0,.4));
background: -moz-linear-gradient(bottom, rgba(0,0,0,1), rgba(0,0,0,.4));
color: white;
font-size: 22px;
}
21 changes: 21 additions & 0 deletions RichardLin_RichardLin3/exercises/d2/99bottles.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#99 Bottles song

botLeft = 99
while (botLeft != 0 && botLeft != 2 && botLeft != 1)
puts "#{botLeft} bottles of beer on the wall."
puts "#{botLeft} bottles of beer."
botLeft = botLeft - 1
puts "Take one down pass it around, #{botLeft} bottles of beer on the wall."
if botLeft == 2
puts "2 bottles of beer on the wall."
puts "2 bottles of beer."
botLeft = botLeft - 1
puts "Take one down pass it around, 1 bottle of beer on the wall."
end
if botLeft == 1
puts "1 bottles of beer on the wall."
puts "1 bottles of beer."
botLeft = botLeft - 1
puts "Take one down pass it around, no more bottles of beer on the wall."
end
end
6 changes: 6 additions & 0 deletions RichardLin_RichardLin3/exercises/d2/angryBoss.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Angry Boss

puts "What do you want you little punk!?!?"
answer = gets.chomp.to_s
puts "What do you mean, #{answer}!?!?! "
puts "You should be happy with what you get you punk."
12 changes: 12 additions & 0 deletions RichardLin_RichardLin3/exercises/d2/answers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
x#ANSWERs

= 5
Matt is a string data type
no
YOLO
Coolio
ERROR
Batwoman
Miley
rapper[0]
rapper[0..2]
18 changes: 18 additions & 0 deletions RichardLin_RichardLin3/exercises/d2/day2B.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
puts "Howzit bru, how old are you?"
age = gets.chomp.to_i
puts "What's your gender? Please type F or M"
gender = gets.chomp

# if age.to_i >= 21
# puts "Come on in bru!"
# else
# puts "Sorry bru but youre too young."
# end

if age >= 23
puts "You in"
elsif (age >= 21) && (gender == 'F')
puts "You in"
else
puts "Get out of here you punk"
end
6 changes: 6 additions & 0 deletions RichardLin_RichardLin3/exercises/d2/favNumber.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Favorite Number

puts "Hey my favorite person man, what dis your favorite number bro?"
favNum = gets.chomp.to_i
betterFavNum = favNum + 1
puts "Hey man, you know what tis a bigger and better number man? #{betterFavNum} Dis should totally be your fav number man!"
9 changes: 9 additions & 0 deletions RichardLin_RichardLin3/exercises/d2/fullNameGreeting.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Full Name Greeting

puts "Hey Bru! What's your name?"
fName = gets.chomp
puts "and your last?"
lName = gets.chomp
puts "and sense I'm super nosy, whats your middle name?"
mName = gets.chomp
puts "Ahh bru, its nice to meet you #{fName} #{mName} #{lName}!"
15 changes: 15 additions & 0 deletions RichardLin_RichardLin3/exercises/d2/grandma.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#Deaf Grandma

puts "Please say something to your grandma."
answer = gets.chomp.to_s
year = rand(1930..1950)

if answer != answer.upcase
puts "HUH?! SPEAK UP, SONNY!"
elsif ((answer == answer.upcase) && (answer != "BYE BYE BYE"))
puts "NO, NOT SINCE #{year}!"
elsif answer == "BYE BYE BYE"
puts "You made it out of the house!"
end


15 changes: 15 additions & 0 deletions RichardLin_RichardLin3/exercises/d2/leapYears.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#Leap Years

puts "Please enter two different years, and this program will output all the
leap years between those years."

year1 = gets.chomp.to_i
year2 = gets.chomp.to_i

puts "The two years that you entered are #{year1} and #{year2}."

for year in (year1..year2)
if ((year % 4 == 0 && year % 100 != 0) || (year % 4 == 0 || year % 400 == 0))
puts year
end
end
39 changes: 39 additions & 0 deletions RichardLin_RichardLin3/exercises/d3/3A/better_bouncer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#A Better Bouncer

def lenient_bouncer
puts "You in."
end

def bouncer(age, country)
puts "How old are you?"
age = gets.chomp.to_i
puts "What country are you from?"
country = gets.chomp.to_s
if age < 18
puts "You out."
elsif ((age >= 18) && (age < 21))
if country == 'usa'
puts "You out."
else
puts "You in."
end
else
puts "You in."
end
end

def strick_bouncer (people, letter)
accepted_people = []
people.each do |people|
if people[0][0] != letter && people[1] >= 21
accepted_people.push people[0]
end
end
accepted_people
end
print lenient_bouncer
print bouncer(21, 'south africa')
print bouncer(18, 'South Africa')
print bouncer(17, 'usa')
print strick_bouncer([['erica' , 22],['ian' , 24],['brian' , 34],['seth' , 18]], 'i')

15 changes: 15 additions & 0 deletions RichardLin_RichardLin3/exercises/d3/3A/mumble_jumble.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#Mumble Jumble

puts "Please enter a sentece that you would like this program to jumble up."
response = gets.chomp.to_s

def jumble(sentence)
sentence.split(//).shuffle.join
end
puts jumble ("#{response}")

def mumble(sentence)
sentence.downcase
end
puts mumble("#{response}")

12 changes: 12 additions & 0 deletions RichardLin_RichardLin3/exercises/d3/3A/scope_it_out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#scope it out

get_louder returns
IT'S SO LOUD
20
get_louder method
1.)Sets loudness to 20
2.)Out puts "IT'S SO LOUD"
3.)Retuns loudness as 20
The Value Of Loudness
is still 10 because the method doesn't touch the initial loudness variable of 10
and the value of loudness that the method sets disapperars as soon the method is called
1 change: 1 addition & 0 deletions RichardLin_RichardLin3/exercises/d3/calculator_app/add.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The sum of <%= @add_first %> and <%= @add_second %> is <%= @add_first.to_i + @add_second.to_i %> </h1>
35 changes: 35 additions & 0 deletions RichardLin_RichardLin3/exercises/d3/calculator_app/app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require 'sinatra'

get '/' do
erb :index
end

get '/add/:first_num/:second_num' do |first_num, second_num|
@add_first=first_num
@add_second=second_num
erb :add
end

get '/subtract/:first_num/:second_num' do |first_num, second_num|
@sub_first=first_num
@sub_second=second_num
erb :sub
end

get '/multiply/:first_num/:second_num' do |first_num, second_num|
@mult_first=first_num
@mult_second=second_num
erb :mult
end

get '/divide/:first_num/:second_num' do |first_num, second_num|
@div_first=first_num
@div_second=second_num
erb :div
end

get '/exponent/:first_num/:second_num' do|first_num, second_num|
@exp_first=first_num
@exp_second=second_num
erb :exp
end
1 change: 1 addition & 0 deletions RichardLin_RichardLin3/exercises/d3/calculator_app/div.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The sum of <%= @div_first %> and <%= @div_second %> is <%= @div_first.to_f / @div_second.to_f %> </h1>
1 change: 1 addition & 0 deletions RichardLin_RichardLin3/exercises/d3/calculator_app/exp.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The exponent of @exp_first and @exp_second is </h1><h1> The sum of <%= @add_first %> and <%= @add_second %> is <%= @add_first.to_i + @add_second.to_i %> </h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The sum of <%= @mult_first %> and <%= @mult_second %> is <%= @mult_first.to_i * @mult_second.to_i %> </h1>
1 change: 1 addition & 0 deletions RichardLin_RichardLin3/exercises/d3/calculator_app/sub.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The sum of <%= @sub_first %> and <%= @sub_second %> is <%= @sub_first.to_i - @sub_second.to_i %> </h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The sum of <%= @add_first %> and <%= @add_second %> is <%= @add_first.to_i + @add_second.to_i %> </h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The sum of <%= @div_first %> and <%= @div_second %> is <%= @div_first.to_f / @div_second.to_f %> </h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The exponent of @exp_first and @exp_second is </h1><h1> The sum of <%= @add_first %> and <%= @add_second %> is <%= @add_first.to_i + @add_second.to_i %> </h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Welcome to a very simple online calculator app. Use the url to do your math!</h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The sum of <%= @mult_first %> and <%= @mult_second %> is <%= @mult_first.to_i * @mult_second.to_i %> </h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1> The sum of <%= @sub_first %> and <%= @sub_second %> is <%= @sub_first.to_i - @sub_second.to_i %> </h1>
14 changes: 14 additions & 0 deletions RichardLin_RichardLin3/exercises/d3/personal_app/app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ~/ixperience/apps/hello_world/app.rb
require "sinatra"

get "/" do
erb :index
end

get "/contacts" do
erb :contacts
end

get "/about_me" do
erb :about_me
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<head>
<title>About Me</title>
<style>
body {
background :url("http://www.epa.gov/greatlakes/image/vbig/444.jpg");
background-size :cover;
text-align: center;
color: white;
}
h1{
padding-top: 50px;
font-size: 50px;
}
img {
width: 40%;
height: auto;
display: center;
padding: 0 0 50px 0;
}
p {
text-align: center;
color: white;
font-size: 30px;
border: rgba(0,0,0,.38);
}
li {
display: inline;
padding: 0 10px 0 0;
}
a {
color: white;
font-size: 30px;
}
.transparent {
background-color: rgba(0,0,0,.5);
display :center;
width: 50%;
margin: auto;
}
</style>
</head>
<div class="transparent">
<body>
<h1>This is a little about me</h1>
<img src="http://www.hotelroomsearch.net/im/2015/02/detroit-michigan-1.jpg">
<p>I was born on February 4th, 1993 in Detroit, MI,</p>
<p>where I grew up in the local city of Troy</p>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/16miletroy.jpg/250px-16miletroy.jpg">
<p>I currently attend Wayne State University</p>
<img src ="http://www.cs.wayne.edu/~zaki/LetterLogo.jpg">
<ul>
<li><a href="http://localhost:9393/">Home</a></li>
<li><a href="http://localhost:9393/contacts">Contacts</a></li>
</body>
</div>

Loading