This file contains hidden or 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> | |
<title>DOM manipulation with jQuery</title> | |
<!-- Add a link to jQuery CDN here script here --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript" src="jquery_example.js"></script> | |
</head> |
This file contains hidden or 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
356 cd desktop | |
357 ls | |
358 cd CLI-Obstacle-Course | |
359 ls | |
360 find Gemfile | |
361 find ls | |
362 find Gemfile -ls | |
363 ls -a | |
364 cd images | |
365 ls |
This file contains hidden or 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 BoggleBoard | |
def initialize(dice_grid) | |
@dice_grid=dice_grid | |
end | |
def create_word(dice_grid, *coords) | |
coords.map { |coord| @dice_grid[coord.first][coord.last]}.join("") | |
end | |
This file contains hidden or 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
#calc = RPNCalculator.new | |
#calc.evaluate('1 2 +') # => 3 | |
#calc.evaluate('2 5 *') # => 10 | |
#calc.evaluate('50 20 -') # => 30 | |
# The general rule is that 'A B op' is the same as 'A op B' | |
# i.e., 5 4 - is 5 - 4. | |
#calc.evaluate('70 10 4 + 5 * -') # => 0 |
This file contains hidden or 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
# Your Names: | |
# 1) Pablo | |
# 2) Luis | |
# For each solution below: | |
# 1. Read each line of code. Write a comment above each method that explains what | |
# it's doing and how. | |
# 2. Is this an iterative or recursive solution? How can you tell? | |
# 3. Consider the variable and method names. What do you think about them? | |
# Could they be more clear? |
This file contains hidden or 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 super_fizzbuzz(array) | |
array.each do |i| | |
if array[i] % 15 == 0 then array[i]="FizzBuzz" | |
elsif array[i] % 5 == 0 then array[i]="Buzz" | |
elsif array[i] % 3 == 0 then array[i]="Fizz" | |
else | |
array[i] | |
end | |
end | |
array |
This file contains hidden or 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
# longest_string is a method that takes an array of strings as its input | |
# and returns the longest string | |
# | |
# +array+ is an array of strings | |
# longest_string(array) should return the longest string in +array+ | |
# | |
# If +array+ is empty the method should return nil | |
def longest_string(array) | |
# Your code goes here! | |
end |