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
-- Put ContactParameter table into Account Schema | |
alter schema Account transfer ContactParameter |
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
-- Create a new schema called API | |
CREATE SCHEMA API |
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
// List IIS Applications | |
%systemroot%\system32\inetsrv\appcmd list app | |
// Rename IIS Application Virtual Path | |
%systemroot%\system32\inetsrv\appcmd set app "Default Web Site/OldApplicationName" -path:/NewApplicationName |
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 HTTP | |
{ | |
public enum Method | |
{ | |
GET = 3, | |
POST = 0, | |
PUT = 1, | |
DELETE = 2 | |
} |
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
node-debug --no-preload -d 5888 -b false app.js |
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
// Extension method to interrogate a collection for a particular property and value | |
// If it does not exist create a new object | |
// return object found or created | |
public static T GetOrAdd<T>(this IList<T> list, Func<T, bool> predicate, Func<T> constructor) | |
{ | |
var match = list.FirstOrDefault(predicate); | |
if (match == null) | |
{ | |
match = constructor(); | |
list.Add(match); |
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 Permission | |
{ | |
public class Access | |
{ | |
public Permission.View.Customer Customer { get; set; } | |
public Permission.View.Inventory Inventory { get; set; } | |
public Permission.View.Order Order { get; set; } | |
} |
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
insert into register | |
( | |
fName,lName,sex,bDay,grade,activity,fee,cityRes,tFee,rel,rel_fName,rel_lName,rel_add1,rel_ad2,rel_city,rel_state,rel_zip,rel_phone,rel_altPhone,rel_email | |
) | |
select | |
'Chris' as fName, /* Hardcodes Chris as First Name for new records created */ | |
'Brown' as lName, /* Hardcodes Brown as Last Name for new records created */ |
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
DECLARE @aid char(11) | |
SELECT @aid = min(AccountID) from [Security].[Role] | |
WHILE @aid is not null | |
BEGIN | |
exec dbo.FillRoleControlsByAccount @aid | |
print 'AccountID: ' + @aid + ' has been inflated!' | |
select @aid = min(AccountID) from [Security].[Role] where AccountID > @aid | |
END |
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 static IEnumerable<T> Flatten<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> childrenSelector) | |
{ | |
foreach (var item in source) | |
{ | |
yield return item; | |
foreach (var child in childrenSelector(item).Flatten(childrenSelector)) | |
{ | |
yield return child; | |
} | |
} |