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 BoggleBoard | |
#your code here | |
end | |
dice_grid = [["b", "r", "a", "e"], | |
["i", "o", "d", "t"], | |
["e", "c", "l", "r"], |
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 BoggleBoard | |
def initialize(grid) | |
@grid = grid | |
end | |
def create_word(*coords) | |
coords.map { |coord| @grid[coord.first][coord.last]}.join("") | |
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> | |
<head> | |
<title>DOM manipulation with jQuery</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript" src="jquery_intro.js"></script> | |
</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
#box1 { | |
background-color: blue; | |
height: 100px; | |
margin: 0; | |
width: 100px; | |
} | |
#box2 { | |
background-color: yellow; | |
height: 100px; |
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
#box1 { | |
background-color: blue; | |
height: 100px; | |
margin: 0; | |
width: 100px; | |
position: absolute; | |
top: 0; | |
left: 0; | |
} |
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
.7 | |
. .M | |
. . .N | |
M. ..O | |
=. .. .M | |
N . . .N | |
O.. . . O | |
MN:. . M | |
OM...N | |
N .OM .NM8MMMMMM |
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
// This is the controller definition | |
// my-controller.js | |
var myApp = angular.module('myApp', []); | |
myApp.controller('MyController', ['$scope', '$http', function($scope, $http) { | |
$scope.grades = ['first', 'second', 'third'] | |
$scope.selectedGrade = null; | |
$scope.selectedStudents = []; | |
$scope.allStudents = []; |
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
describe.only('selecting a grade', function() { | |
beforeEach(function() { | |
$scope.selectGrade("third"); | |
}); | |
... | |
}); |
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
describe.only('MyController', function() { | |
// define some variables | |
var scope, httpBackend, myController; | |
// load in our app | |
beforeEach(module('MyApp')); | |
// code to execute before each of our tests | |
beforeEach(inject(function($rootScope, $httpBackend, $controller) { |
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
describe('deselecting a grade', function() { | |
beforeEach(function() { | |
$scope.deselectGrade(); | |
}); | |
it('resets selectedGrade to null', function() { | |
expect($scope.selectedGrade).to.be(null); | |
}); | |
it('resets selectedStudents to empty array', function() { |
OlderNewer