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
| DIRECTIONS | |
| PRE-REQUISITES | |
| LEARNING OBJECTIVES | |
| The following lesson prompt is an excerpt from Prototypes and | |
| Inheritance in JavaScript. |
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
| using BirdfolioSPA.Models; | |
| using BirdfolioSPA.Providers; | |
| using BirdfolioSPA.Results; | |
| using Microsoft.AspNet.Identity; | |
| using Microsoft.AspNet.Identity.EntityFramework; | |
| using Microsoft.AspNet.Identity.Owin; | |
| using Microsoft.Owin.Security; | |
| using Microsoft.Owin.Security.Cookies; | |
| using Microsoft.Owin.Security.OAuth; | |
| using System; |
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
| public class Bird | |
| { | |
| [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)] | |
| public int BirdId { get; set; } | |
| public int? ParentId { get; set; } | |
| [ForeignKey("ParentId")] | |
| public virtual Bird Parent { get; set; } |
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
| using System.Collections.Generic; | |
| using System.ComponentModel.DataAnnotations; | |
| using System.ComponentModel.DataAnnotations.Schema; | |
| namespace Birdfolio.Models | |
| { | |
| public class Bird | |
| { | |
| [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)] | |
| public int BirdId { get; set; } |
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
| [TestClass] | |
| public class TreeTest | |
| { | |
| /// <summary> | |
| /// Inserts a bunch of numbers into a tree and prints it out in-order. | |
| /// </summary> | |
| [TestMethod] | |
| public void TestTreeWithInts() | |
| { | |
| Tree<int> t = new Tree<int>(); |
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
| public class Node<T> : IComparable<T> | |
| { | |
| public T Data { get; private set; } | |
| public Node<T> Right { get; set; } | |
| public Node<T> Left { get; set; } | |
| public Node<T> Center { get; set; } | |
| public Node(T data) | |
| { | |
| this.Data = data; |
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
| private int getRow(char[][] board) | |
| { | |
| int playerRow = 0; | |
| System.out.println("Enter the row of your move " | |
| + "(needs to be >= 0 and <= " + board.length + ":"); | |
| try | |
| { | |
| playerRow = key.nextInt(); | |
| if(playerRow < 0 || playerRow > board.length) | |
| { |