Skip to content

Instantly share code, notes, and snippets.

@dalenewman
dalenewman / transformalize-provider-bogus.xml
Created March 2, 2018 13:45
a transformalize arrangement demonstrating the bogus provider
<cfg name="Bogus">
<connections>
<add name="input" provider="bogus" seed="1" />
</connections>
<entities>
<add name="Contact" size="5">
<fields>
<add name="Identity" type="int" />
USE master
GO
-- you have to start procedure name with sp_ to make it global
CREATE PROCEDURE sp_log
@Message NVARCHAR(512),
@RowCount INT = null OUTPUT,
@Delimiter NCHAR(1) = N' ',
@PadChar NCHAR(1) = N'-'
AS
@davidfowl
davidfowl / Example1.cs
Last active September 2, 2024 12:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
@dalenewman
dalenewman / gist:6377911
Last active August 16, 2023 15:08
A T-SQL stored procedure for moving an index from one file group to another. The original script was found at http://blogs.msdn.com/b/ramoji/archive/2008/09/26/how-to-move-existing-indexes-from-one-filegroup-to-another.aspx and updated according to responses found on the same page.
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MoveIndexToFileGroup]') AND type in (N'P', N'PC'))
BEGIN
DROP PROCEDURE [dbo].[MoveIndexToFileGroup]
END
GO
CREATE PROC [dbo].[MoveIndexToFileGroup] (
@DBName sysname,
@SchemaName sysname = 'dbo',
@ObjectNameList Varchar(Max),