View db.rpz
$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
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | | |
SecurityProtocolType.Tls11 | | |
SecurityProtocolType.Tls12; |
View parameterized_top.sql
CREATE PROCEDURE dbo.sp_TestGetAll | |
@LIMIT INT | |
AS | |
SELECT TOP (@LIMIT) id, col1, col2, col3 FROM TestTable |
View paginate.sql
DECLARE @pageNo INT | |
DECLARE @pageSize INT | |
SET @pageNo = 2 | |
SET @pageSize = 15 | |
SELECT | |
CustomerNo, | |
FirstName, | |
LastName |
View wpf_listbox_same_column_width.cs
<Grid.ColumnDefinitions> | |
<ColumnDefinition SharedSizeGroup="col1" /> | |
<ColumnDefinition SharedSizeGroup="col2" /> | |
</Grid.ColumnDefinitions> |
View transpose_result.sql
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
StateObject object = new StateObject(); | |
object.Number = 5; | |
System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback(callback), object, ...); |
View nth-row.sql
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
dynamic test = new { | |
id = 12345, | |
additionalData = new | |
{ | |
something = "Hello World", | |
subItems = new List<object>() | |
{ | |
new { | |
test1 = "this", | |
test2 = "is" |