Skip to content

Instantly share code, notes, and snippets.

http://www.monica-cho.com/cheat/cheat.html
@MonicaDev
MonicaDev / jquery_example.html
Created April 7, 2014 01:44 — forked from dbc-challenges/jquery_example.html
Intro to jQuery for Phase 0
<!DOCTYPE html>
<html>
<head>
<title>DOM manipulation with jQuery</title>
<!-- Add a link to jQuery CDN here script here -->
<script type="text/javascript" src="jquery_example.js"></script>
</head>
<body>
class House
attr_accessor :current_temp, :min_temp, :max_temp, :ac_on, :heater_on
def initialize(current_temp, min_temp, max_temp)
@heater_on = false
@ac_on = false
@current_temp = current_temp
@min_temp = min_temp
@max_temp = max_temp
end
@MonicaDev
MonicaDev / answers
Last active August 29, 2015 13:57
phase0_week8_judge_html_css.txt
Steps:
Add the HTML and CSS files to your gist. The HTML and CSS files should be reformatted so they are more readable.
Answer the following questions in this file:
(Remember, this should be useful for others in your cohort,
so write for an audience that does not know anything about your website.)
Which website did you evaluate?
http://marc.info/?l=full-disclosure&m=139522698431442&w=2
@MonicaDev
MonicaDev / HTML and CSS: Building a Website from Scratch.md
Last active August 29, 2015 13:57
HTML and CSS: Building a Website from Scratch

Your lnline image of your Treehouse points here:

Image and video hosting by TinyPic ###file:///Users/monicacho/Desktop/Web/index.html

###Quiz (Please write 1-2 sentences each. Keep in mind, your explanations can help your fellow students!)

  1. What is a “normalize.css” file? What does it do?
    ~the normalize file helps us make sure that the website looks close or the same in every browser. It is layered before the style and grid files.
  2. What are Bootstrap, Html5 Boilerplate and Zurb examples of? Why would you use them?
# When you are finished with this challenge you should be able to:
# Explain what "require_relative" does and why you would use it
# Demonstrate how to iterate through a hash
# Easily recognize and refactor repetitive code
# Objectives
# 1) Run the code. Look at the output. Look at the input (it's in the other file). Explain what the program is doing.
# 2) Write a comment explaining the require_relative statement below
# 3) Comment each method and define it's responsibility
@MonicaDev
MonicaDev / 0.2.1-boggle_class_from_methods.rb
Created March 4, 2014 20:44 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
#your code here
end
dice_grid = [["b", "r", "a", "e"],
["i", "o", "d", "t"],
["e", "c", "l", "r"],
def assert
raise "Assertion failed!" unless yield
end
name = "bettysue"
assert { name == "bettysue" }
assert {name == "kary"} #this is the yield. This is true.
def is_fibonacci?(i)
require 'sqlite3'
$db = SQLite3::Database.open "congress_poll_results.db" #This is telling how to open the db file. It's in SQlite3 gem. .open command.
def print_arizona_reps
puts "AZ REPRESENTATIVES"
az_reps = $db.execute("SELECT name FROM congress_members WHERE location = 'AZ'") #This is querying the db.
az_reps.each { |rep| puts rep } #looping and putsing each AZ rep.
# When you are finished with this challenge you should be able to:
# Explain what "require_relative" does and why you would use it
# Demonstrate how to iterate through a hash
# Easily recognize and refactor repetitive code
# Objectives
# 1) Run the code. Look at the output. Look at the input (it's in the other file). Explain what the program is doing.
# 2) Write a comment explaining the require_relative statement below
# 3) Comment each method and define it's responsibility