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 @tableName NVARCHAR(MAX), @schemaName NVARCHAR(MAX), @className NVARCHAR(MAX) | |
--------------- Input arguments --------------- | |
SET @tableName = 'Incidents' | |
SET @schemaName = 'dbo' | |
SET @className = 'IncidentDto' | |
--------------- Input arguments end ----------- | |
DECLARE tableColumns CURSOR LOCAL FOR | |
SELECT cols.name, cols.system_type_id, cols.is_nullable FROM sys.columns cols |
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
/* ============================================ | |
* bootstrap-infiniteScroll.js | |
* ============================================ */ | |
!function ($) { | |
'use strict'; | |
var InfiniteScroll = function (el, options) { | |
this.$element = $(el); | |
this.$data = $(el).data(); | |
this.$options = options; |
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
/// <summary> | |
/// Serializes an object. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="serializableObject"></param> | |
/// <param name="fileName"></param> | |
public void SerializeObject<T>(T serializableObject, string fileName) | |
{ | |
if (serializableObject == null) { return; } |
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
// Source: http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Xml.Serialization; | |
[XmlRoot("dictionary")] | |
public class SerializableDictionary<TKey, TValue> | |
: Dictionary<TKey, TValue>, IXmlSerializable |
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
// Source: http://stackoverflow.com/a/4944547/325521 | |
public static class ObjectExtensions | |
{ | |
public static T ToObject<T>(this IDictionary<string, object> source) | |
where T : class, new() | |
{ | |
T someObject = new T(); | |
Type someObjectType = someObject.GetType(); |
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
MSDN: Service Oriented Architecture (SOA): http://msdn.microsoft.com/en-us/library/bb833022.aspx | |
Microsoft Application Architecture Guide: http://msdn.microsoft.com/en-us/library/ff650706.aspx |
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
Devote Yourself To Your Idea: http://sallysbakingaddiction.com/wp-content/uploads/2013/11/3dd80d241a162a94b311378f2bebf477.jpg |
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
REST Design | |
=========== | |
Richardson Maturity Model: Steps toward the glory of REST http://martinfowler.com/articles/richardsonMaturityModel.html | |
PowerShell | |
========== | |
Invoke REST Endpoint: Invoke-RestMethod: http://technet.microsoft.com/en-us/library/hh849971(v=wps.620).aspx | |
ASP.Net MVC Web 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
To replace the first 4 characters in every line, use the find Expression below. | |
^.{4} | |
If the Editor does not honor the {3} i.e. the Regex find fails, use actual number of . like the following | |
^.... | |
Leave Replace Expression Blank |
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
use Northwind | |
go | |
-- SQL run against Northwind sample database to find all tables | |
-- that have CustomerID in their column / field names. | |
-- replace CustomerID in between % % with whatever it is you are searching for | |
select distinct tab.name + '.' + col.name as 'Table.ColumnName' | |
from sys.tables tab |