View db.rpz
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 |
View force_tls.cs
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; |
View parameterized_top.sql
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 |
View paginate.sql
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 |
View wpf_listbox_same_column_width.cs
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> |
View transpose_result.sql
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 |
View passing_object_right.cs
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, ...); |
View nth-row.sql
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 |
View dynamic_object.cs
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" |