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 PROCEDURE spNextStudySequence | |
@StudyID int | |
AS | |
DECLARE @temp table | |
( | |
ID bigint | |
); | |
UPDATE tStudy_Sequences | |
SET Sequence = Sequence + 1 |
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
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/> | |
<PropertyGroup> | |
<VersionMajor>1</VersionMajor> | |
<VersionMinor>0</VersionMinor> | |
<VersionPatch>0</VersionPatch> | |
<ChangesetNumber>0</ChangesetNumber> | |
<NugetFileShare>\\itsmanv01\Releases</NugetFileShare> | |
<SolutionPath>RequisitioningSolution.sln</SolutionPath> |
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
Write-Host "Looking for " $OctopusPackageDirectoryPath "app_offline*.htm*" | |
if(Test-Path $OctopusPackageDirectoryPath\app_offline*.htm*) | |
{ | |
ren $OctopusPackageDirectoryPath\app_offline*.htm* app_offline.htm | |
} |
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
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/> | |
<PropertyGroup> | |
<DeployFiles>$(MSBuildStartupDirectory)\DeployFiles.msbuild</DeployFiles> | |
<VersionMajor>1</VersionMajor> | |
<VersionMinor>0</VersionMinor> | |
<VersionPatch>0</VersionPatch> | |
<ChangesetNumber>0</ChangesetNumber> | |
<NugetFileShare>\\itsmanv01\Releases</NugetFileShare> |
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
(function () { | |
var scriptName = "embed.js"; //name of this script, used to get reference to own tag | |
var jQuery; //noconflict reference to jquery | |
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"; | |
var jqueryVersion = "1.8.3"; | |
var scriptTag; //reference to the html script tag | |
/******** Get reference to self (scriptTag) *********/ | |
var allScripts = document.getElementsByTagName('script'); |
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 static class Hierarchyize | |
{ | |
public static List<Nested<T>> Transform<T>(IEnumerable<T> items, Func<T, T, bool> isParentFunction, Func<T, bool> isRootFunction) | |
{ | |
Action<Nested<T>> setChildren = null; | |
setChildren = parent => | |
{ | |
parent.Children = items | |
.Where(childItem => isParentFunction(childItem, parent.Item)) |
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 static class ListDiff | |
{ | |
public static List<ListDiffItem<T>> GetDiff<T>(List<T> oldList, List<T> newList, Func<T, T, bool> equalsFunction = null) | |
{ | |
var combined = new List<ListDiffItem<T>>(); | |
foreach(var i in newList) | |
{ | |
var diff = new ListDiffItem<T>(); | |
diff.Item = i; |
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 NameFiller : IPropertyFiller<string> | |
{ | |
private Random _rand; | |
private static Regex _combinedRegex = new Regex("name|fullname|firstname|lastname|surname|middlename|maidenname", RegexOptions.IgnoreCase); | |
private static Regex _fullNameRegex = new Regex("name|fullname", RegexOptions.IgnoreCase); | |
private static Regex _firstNameRegex = new Regex("firstname|middlename", RegexOptions.IgnoreCase); | |
private static Regex _surnameRegex = new Regex("lastname|surname|maidenname", RegexOptions.IgnoreCase); | |
private static List<string> _firstNames = new List<string> { "Luke", "John", "Mary" }; |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace NSpark | |
{ | |
public static class SparkExtensions | |
{ | |
public static String Spark(this string input) |
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 static class CacheExtensions | |
{ | |
static object sync = new object(); | |
/// <summary> | |
/// Executes a method and stores the result in cache using the given cache key. If the data already exists in cache, it returns the data | |
/// and doesn't execute the method. Thread safe, although the method parametersn't guaranteed to be thread safe. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="cache"></param> |