This file contains hidden or 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
USE CDR | |
GO | |
DECLARE @DatabaseName nvarchar(50) = 'CDR' | |
DECLARE @SchemaName nvarchar(50) = NULL | |
DECLARE @ObjectName nvarchar(50) = NULL | |
DECLARE @DatabaseID smallint = DB_ID(@DatabaseName) | |
SELECT * | |
FROM ( |
This file contains hidden or 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
Set-Location ~\Dropbox\Work\Journal\201207 | |
Import-CSV numbers.csv -Header From,To | %{ | |
if ($_.From -match '^\d+$') { | |
[Int64]$From = $_.From | |
[Int64]$To = $(if ($_.To) { $_.To } else { $From }) | |
[Int64]$i = $From |
This file contains hidden or 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
[CmdletBinding(DefaultParameterSetName='Normal')] | |
param( | |
[Parameter()] | |
[Int32]$Length = 8, | |
[Parameter(ParameterSetName="Complex")] | |
[Switch]$Complex, | |
[Parameter(ParameterSetName="Easy")] |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Deployment.Application; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
namespace InstallClickOnceApp | |
{ |
This file contains hidden or 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
/// <summary> | |
/// Uses reflection to disable the UseSprings dependency property which is read-only on map layers. | |
/// This will stop animations from occurring when the center point or zoom level of the map is changed. | |
/// </summary> | |
/// <param name="map">The map control to disable the animations for.</param> | |
/// <remarks> | |
/// Note that this method disables the UseSprings property in the layers currently added to the map. If | |
/// new layers are added, this method will need to be called again. | |
/// </remarks> | |
public static void DisableAnimation( this MapControl map ) |
This file contains hidden or 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
/// <summary> | |
/// Modifies a collection in-place by removing items from the collection that match | |
/// a given <see cref="T:Predicate[T]"/>. | |
/// </summary> | |
/// <remarks> | |
/// The type of collection passed in will affect how the method performs. For collections | |
/// with a built-in method to remove in-place (such as sets) the existing implementation | |
/// will be used. For collections implementing IList[T], the method will perform better | |
/// because the collection can be enumerated more efficiently. For all other collections, | |
/// the items to remove will be buffered and Remove will be called individually which, |
This file contains hidden or 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
-- these should not parse because of the string format | |
IF Utils.TryParseInt64(NULL) IS NOT NULL RAISERROR('Fail', 16, 1); | |
IF Utils.TryParseInt64('') IS NOT NULL RAISERROR('Fail', 16, 1); | |
IF Utils.TryParseInt64(' ') IS NOT NULL RAISERROR('Fail', 16, 1); | |
IF Utils.TryParseInt64(' ') IS NOT NULL RAISERROR('Fail', 16, 1); | |
IF Utils.TryParseInt64('.') IS NOT NULL RAISERROR('Fail', 16, 1); | |
IF Utils.TryParseInt64('0.0') IS NOT NULL RAISERROR('Fail', 16, 1); | |
IF Utils.TryParseInt64('0.') IS NOT NULL RAISERROR('Fail', 16, 1); | |
IF Utils.TryParseInt64('.0') IS NOT NULL RAISERROR('Fail', 16, 1); | |
IF Utils.TryParseInt64('1,000') IS NOT NULL RAISERROR('Fail', 16, 1); |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Text; | |
namespace Einstein | |
{ | |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Einstein.Dynamic | |
{ |
This file contains hidden or 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
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
namespace SCoreShell | |
{ | |
/// <summary> | |
/// This application's sole purpose in life is to sit in for the default "shell" on a |