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
@page "{currentpage=1}/{sortby=Id}" | |
@model PaginationModel | |
<h2>Pagination Example</h2> | |
<table class="table table-striped"> | |
<thead> | |
<tr> | |
<th><a asp-page="pagination" class="sort-link" asp-route-sortby="Id">Id</a></th> | |
<th><a asp-page="pagination" class="sort-link" asp-route-sortby="FullName">Full Name</a></th> |
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
# escape=` | |
# Image with NET CORE installation to extract executables for final image | |
FROM microsoft/aspnetcore:2.0.0-nanoserver As CoreBuild | |
# Middleware image used to extract ASP.NET core module | |
From microsoft/iis as WindowsBuild | |
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'Continue'; $verbosePreference='Continue';"] | |
# Installing NET CORE webhosting in middleware image so latest module and configuration schema is extracted for final image | |
ADD https://download.microsoft.com/download/B/1/D/B1D7D5BF-3920-47AA-94BD-7A6E48822F18/DotNetCore.2.0.0-WindowsHosting.exe ".\hosting.exe" |
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
#!/bin/sh | |
# Redirect output to stderr. | |
exec 1>&2 | |
# enable user input | |
exec < /dev/tty | |
consoleregexp='console.log' | |
# CHECK | |
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0 | |
then |
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
// Validate a Canadian postal code with JQuery Validation | |
// Use with http://docs.jquery.com/Plugins/Validation | |
// Adding the method | |
jQuery.validator.addMethod("cdnPostal", function(postal, element) { | |
return this.optional(element) || | |
postal.match(/[a-zA-Z][0-9][a-zA-Z](-| |)[0-9][a-zA-Z][0-9]/); | |
}, "Please specify a valid postal code."); | |
// Using the new rule |