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
| /// <summary> | |
| /// Easily get access to embedded resources | |
| /// </summary> | |
| internal static class EmbeddedResource | |
| { | |
| /// <summary> | |
| /// Return a resource stream | |
| /// </summary> | |
| /// <param name="assembly">The assembly the resource is embedded in</param> | |
| /// <param name="name">FQDN or the resource</param> |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| CREATE FUNCTION [dbo].[GetWellingtonHolidays] | |
| ( | |
| @startdate DATE, | |
| @enddate DATE | |
| ) | |
| RETURNS TABLE | |
| WITH SCHEMABINDING | |
| AS RETURN | |
| ( | |
| WITH alldates ([date]) AS ( |
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
| CREATE FUNCTION [dbo].[GetIntegerSequence] | |
| ( | |
| @count INT | |
| ) | |
| RETURNS TABLE | |
| WITH SCHEMABINDING | |
| AS RETURN | |
| ( | |
| WITH C0 (c) AS (SELECT 1 UNION ALL SELECT 1) | |
| ,C1 (c) AS (SELECT 1 FROM C0 AS A CROSS JOIN C0 AS B) |
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
| CREATE FUNCTION [dbo].[GetAge] ( | |
| @DOB AS DATE | |
| ,@EndDate AS DATE = NULL | |
| ) | |
| RETURNS TINYINT | |
| AS | |
| BEGIN | |
| DECLARE @Result AS TINYINT | |
| IF (@EndDate IS NULL) |
NewerOlder