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
internal class Program | |
{ | |
private const int size = 500; | |
private const int iterations = 5000; | |
private static void Main( string[] args ) | |
{ | |
TimeSpan elapsed = TimeOriginal(); | |
Console.WriteLine( elapsed ); |
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
#region License | |
// | |
// Author: Nate Kohari <[email protected]> | |
// Copyright (c) 2007-2010, Enkari, Ltd. | |
// | |
// Dual-licensed under the Apache License, Version 2.0, and the Microsoft Public License (Ms-PL). | |
// See the file LICENSE.txt for details. | |
// | |
#endregion | |
#if !NO_ASSEMBLY_SCANNING |
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
src/Ninject/Activation/Blocks/ActivationBlock.cs | 4 ++-- | |
1 files changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/src/Ninject/Activation/Blocks/ActivationBlock.cs b/src/Ninject/Activation/Blocks/ActivationBlock.cs | |
index b16b503..4b64376 100644 | |
--- a/src/Ninject/Activation/Blocks/ActivationBlock.cs | |
+++ b/src/Ninject/Activation/Blocks/ActivationBlock.cs | |
@@ -68,10 +68,10 @@ namespace Ninject.Activation.Blocks | |
/// </summary> | |
/// <param name="request">The request.</param> |
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
#region Using Directives | |
using System; | |
using System.ServiceProcess; | |
using YourCorp.Services; | |
using Ninject; | |
using Topshelf; | |
using Topshelf.Configuration; | |
using Topshelf.Configuration.Dsl; |
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
if (bindings == null) | |
{ | |
return false; | |
} | |
lock(_handleMissingBindingLockObject) | |
{ | |
if (!CanResolve(request)) | |
{ | |
bindings.Map(binding => binding.IsImplicit = true); |
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
public enum TestEnum | |
{ | |
None =0, | |
One = 1, | |
Two = 2 | |
} | |
var zero = Enum<TestEnum>.GetValue<int>( TestEnum.None ); | |
var one = Enum<TestEnum>.GetValue<int>( TestEnum.One ); | |
var two = Enum<TestEnum>.GetValue<int>( TestEnum.Two ); | |
var nine = Enum<TestEnum>.GetValue<int>( TestEnum.One | TestEnum.Eight ); |
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
param( [ScriptBlock] $scriptBlock ) | |
<# | |
.SYNOPSIS | |
Impersonates a user and executes a script block as that user. This is an interactive script | |
and a window will open in order to securely capture credentials. | |
.EXAMPLE | |
Use-Impersonation.ps1 {Get-ChildItem 'C:\' | Foreach { Write-Host $_.Name }} | |
This writes the contents of 'C:\' impersonating the user that is entered. | |
#> | |
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
;config.ini | |
[Network] | |
DataFeed=http://mydomain.com/feed.xml | |
Port=68 | |
NextUpdate=3/23/2009 9:11:48 PM | |
You can load it: | |
var configurationSource = new IniConfigurationSource("config.ini"); | |
var datafeed = configurationSource.Sections["Network"].Get<string>("DataFeed"); |
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
PS C:\Development\PowerStudio> set-executionpolicy default | |
Execution Policy Change | |
The execution policy helps protect you from scripts that you do not trust. Changing the execution | |
policy might expose you to the security risks described in the about_Execution_Policies help topic. | |
Do you want to change the execution policy? | |
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y | |
PS C:\Development\PowerStudio> type .\test.ps1 | |
gci | |
PS C:\Development\PowerStudio> .\test.ps1 |
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
#region Using Directives | |
using System.Threading; | |
#endregion | |
namespace ObjectExtensions.Tests | |
{ | |
public class Person | |
{ |
OlderNewer