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 @Object AS INT; | |
DECLARE @ResponseText AS VARCHAR(8000); | |
DECLARE @Body AS VARCHAR(8000) = | |
'{ | |
"what": 1, | |
"ever": "you", | |
"need": "to send as the body" | |
}' | |
EXEC sp_OACreate 'MSXML2.XMLHTTP', @Object OUT; |
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
{ | |
"$schema": "http://json-schema.org/draft-03/schema#", | |
"type": "object", | |
"properties": { | |
"orderDate": { | |
"type": "string", | |
"format": "date" | |
} | |
} |
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
void Main() | |
{ | |
var numberOfDice = 2; | |
var numberOfRolls = 2; | |
Console.WriteLine("Roll the Dice"); | |
Console.WriteLine("============="); | |
Console.WriteLine("How many dice do you want to roll?"); | |
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
MERGE INTO Lookups AS Target | |
USING (VALUES | |
(0, N'Lookup Number 0'), | |
(1, N'Lookup Number 1'), | |
(2, N'Lookup Number 2'), | |
(3, N'Lookup Number 3'), | |
(4, N'Lookup Number 4'), | |
(5, N'Lookup Number 5'), | |
(6, N'Lookup Number 6') | |
) |
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
<# | |
.SYNOPSIS | |
Updates the Cloudfront distribution origin path with the supplied version number | |
.DESCRIPTION | |
Given a version number this script will retrieve the current distribution, extract the ETAG value, update the current-distribution.json file with the version number (for the OriginPath), | |
save the JSON and then update the distribution using the new file. A CloudFront invalidation is then created to expire all edge caches. | |
.PARAMETER version | |
A value indicating the version number to be used e.g. 1.12.1 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://npmcdn.com/react@0.14.2/dist/react.min.js"></script> | |
<script src="https://npmcdn.com/react-dom@0.14.2/dist/react-dom.min.js"></script> | |
<script src="https://npmcdn.com/google-map-react@0.14.6/dist/GoogleMapReact.js"></script> | |
<meta charset="utf-8"> |
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 PROCEDURE [dbo].[xxx] | |
AS | |
BEGIN | |
SET NOCOUNT ON; | |
DECLARE @transactionName VARCHAR(32) = REPLACE((CAST(NEWID() AS VARCHAR(36))),'-','') | |
BEGIN TRY | |
DECLARE @TranCounter INT; |
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
namespace namespace VS.Library.Interfaces | |
{ | |
public interface IFile | |
{ | |
void Move(string sourceFileName, string destFileName); | |
bool Exists(string fileName); | |
void Delete(string fileName); | |
} |
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
namespace VS.Library.Interfaces | |
{ | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Security.AccessControl; | |
public interface IDirectory | |
{ | |
bool Exists(string path); |
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
private IEnumerable<Dictionary<string, object>> DataSetToOrder(DataSet orderDetails) | |
{ | |
var s = orderDetails.Tables[0].Rows[0][0].ToString(); | |
var tableDefinitions = s.Replace(", ", ",").Split(','); | |
var tables = tableDefinitions.Select(tableDefinition => tableDefinition.Split('/')).Select(temp => new Tuple<int, int, string>(int.Parse(temp[0]), int.Parse(temp[1]), temp[2])).ToList(); | |
var parent = tables.First(t => t.Item1.Equals(1)); |
NewerOlder