👷♂️
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
$(document).ready(function () { | |
var contentsViewModel = function () { | |
this.contents = handbuch.contents; | |
}; | |
var menu = $("#menu"); | |
ko.applyBindings(new contentsViewModel, menu); | |
}) |
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
$(document).ready(function () { | |
var contentsViewModel = function () { | |
this.contents = handbuch.contents; | |
}; | |
var menu = document.getElementById("menu"); | |
ko.applyBindings(new contentsViewModel, menu); | |
}) |
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
$("#menu").get(); //get all DOM objects in the jQuery collection | |
var menu = $("#menu").get(0); //get the DOM object in the jQuery collection at index 0 | |
var menu = $("#menu")[0]; //get the DOM object in the jQuery collection at index 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
[Test] | |
public void CanHasHash1() { | |
var hash1 = "123".GetHashCode(); | |
var hash2 = "234".GetHashCode(); | |
var actual = (hash1 - hash2); | |
Assert.AreEqual(actual, 1566083913); | |
} |
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
routes.MapRoute( | |
name: "MVC Default", | |
url: "{controller}/{action}/{id}", | |
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } | |
); |
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
routes.MapRoute( | |
name: "MVC Default", | |
url: "{controller}/{action}/{id}", | |
defaults: new { action = "Index", id = UrlParameter.Optional } | |
); |
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
[WebGet(UriTemplate = "")] | |
public List<Customer> Get() { | |
return new List<Customer>() | |
{ | |
new Customer() { Id = 1, Name = "ALFKI"}, | |
new Customer() { Id = 2, Name = "WELLI"} | |
}; | |
} |
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
public class CustomersController : ApiController { | |
// Get /api/customers | |
public List<Customer> Get() { | |
return new List<Customer>() | |
{ | |
new Customer() {Id = 1, Name = "ALFKI"}, | |
new Customer() {Id = 2, Name = "WELLI"} | |
}; | |
} |
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
routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); |
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
routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); |