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
puts "Welcome to Rock, paper or scissors... I actually tried to do a blackjack but i got stuck on arrays... i believe ill get to that with a bit more of knowledge.\n\n" | |
puts "Alright... give me 'rock', 'paper' or 'scissors'." | |
puts "You can also choose to 'quit' the game.\n\n" | |
answer = gets.chomp | |
case answer.downcase | |
when "quit" | |
puts "Alright... game will quit. Bye.\n\n" | |
return | |
when "rock", "paper", "scissors" |
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
// PHOTO PLANT ################################################################################################################ | |
function photoPlant($pID){ | |
// db | |
include "includes/dbConfig.php"; | |
// init | |
$out = null; | |
// gen hash | |
$varA = microtime(); | |
$varB = time(); | |
$varC = $varA . $varB; |
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 Pet | |
#attr handler | |
attr_reader :color, :breed | |
attr_accessor :name | |
#init method | |
def initialize(color, breed) | |
@color = color | |
@breed = breed | |
@hungry = true |
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 handler | |
attr_reader :color, :breed | |
attr_accessor :name | |
#init method | |
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
#methods | |
def favFoods(runs) | |
food_array = [] | |
runs.times do | |
# get info > store > hash | |
# get food name | |
puts "Name a favourite food." | |
f_name = gets.chomp | |
# food_array[:food_name] << gets.chomp |
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
# METHODS | |
def greeting #greeting to the user | |
puts "\n\n" | |
puts "Welcome to my first Ruby program." | |
puts "--" * 25 | |
end | |
def userName #user identification | |
puts "Please enter your name:" | |
name = gets.chomp |
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
# METHODS | |
def greeting #greeting to the user | |
puts "\n\n" | |
puts "Welcome to my first Ruby program." | |
puts "--" * 25 | |
end | |
def userName #user identification | |
puts "Please enter your name:" | |
name = gets.chomp |
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> | |
<!-- <link rel="stylesheet" href="../css/styles.css"> --> | |
<!-- NOTE: | |
All i needed was to disable this line. let me explain why. | |
you are calling ../css/styles.css | |
the term `..` referrs to the folder 1 level above in the tree. | |
your tree looks like this: |
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> | |
<head> | |
<!-- header content here --> | |
</head> | |
<body> | |
<section class="jumbotron"> | |
<!-- jumbotron content --> | |
</section> | |
<section class="someOtherSection"> |
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
// BEFORE LOAD | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : '345613179594716', | |
autoLogAppEvents : true, | |
xfbml : true, | |
version : 'v3.0' | |
}); | |
}; |