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
$TTL 60 | |
@ IN SOA localhost. root.localhost. ( | |
2015112501 ; serial | |
1h ; refresh | |
30m ; retry | |
1w ; expiry | |
30m) ; minimum | |
IN NS localhost. | |
localhost A 127.0.0.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
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | | |
SecurityProtocolType.Tls11 | | |
SecurityProtocolType.Tls12; |
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.sp_TestGetAll | |
@LIMIT INT | |
AS | |
SELECT TOP (@LIMIT) id, col1, col2, col3 FROM TestTable |
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 @pageNo INT | |
DECLARE @pageSize INT | |
SET @pageNo = 2 | |
SET @pageSize = 15 | |
SELECT | |
CustomerNo, | |
FirstName, | |
LastName |
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
<Grid.ColumnDefinitions> | |
<ColumnDefinition SharedSizeGroup="col1" /> | |
<ColumnDefinition SharedSizeGroup="col2" /> | |
</Grid.ColumnDefinitions> |
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 @test NVARCHAR(MAX) | |
SELECT @test = COALESCE(@test + ', ', '') + Field FROM <Sampletable> WHERE <whereclause> AND Field IS NOT NULL | |
SELECT @test |
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
StateObject object = new StateObject(); | |
object.Number = 5; | |
System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback(callback), object, ...); |
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 @whichRow INT | |
set @whichRow = 5 | |
select top 1 * from | |
( | |
select top (@whichRow) * from <thetable> where <whereclause> order by <orderbyclause> desc | |
) tmp | |
order by id asc |
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
dynamic test = new { | |
id = 12345, | |
additionalData = new | |
{ | |
something = "Hello World", | |
subItems = new List<object>() | |
{ | |
new { | |
test1 = "this", | |
test2 = "is" |