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].[fn_ParseDelimitedStrings] | |
| ( | |
| @String nvarchar(max), | |
| @Delimiter char(1) | |
| ) | |
| Returns @Values Table | |
| ( | |
| RowId int Not Null Identity(1,1) Primary Key, | |
| Value nvarchar(3000) Not Null | |
| ) |
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> | |
| /// Compares two comma delimited strings in order to find at least one matching element | |
| /// </summary> | |
| /// <param name="sourceElements">The first comma delimited string</param> | |
| /// <param name="searchElements">The second comma delimited string</param> | |
| /// <returns>True if there is at least one match</returns> | |
| public static bool MatchesAtLeastOne(this string sourceElements, string searchElements) | |
| { | |
| if (string.IsNullOrEmpty(sourceElements) || string.IsNullOrEmpty(searchElements)) return false; |
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> | |
| /// Updates a querystring parameter with a new value | |
| /// </summary> | |
| /// <param name="req">The HTTPRequest object</param> | |
| /// <param name="parameterName">The parameter name to update</param> | |
| /// <param name="parameterValue">The new value for the parameter</param> | |
| /// <returns></returns> | |
| public static string UpdateQueryString(HttpRequest req, string parameterName, string parameterValue) | |
| { |
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
| var storedVal = content.Aggregate<IPublishedContent, StringBuilder, string>( | |
| new StringBuilder() | |
| , (sb, x) => sb.Append(x.Id).Append((content.Last().Id==x.Id) ? "" : ",") | |
| , (sb) => sb.ToString() | |
| ); |
NewerOlder