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
[TestFixture] | |
public class InheritedFixture | |
{ | |
protected int _setupValue; | |
[SetUp] | |
public void ShouldNotRun() | |
{ | |
_setupValue = 10; | |
} |
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 Class RadDocumentViewerViewModel | |
Private pdfWebControl As PdfWebControl | |
Property ControlID As String = Guid.NewGuid.ToString().Replace("-", "") | |
Property DocumentKey As String | |
Sub New(ByVal specialDocumentKey As String, ByVal documentName As Func(Of String), ByVal fileContents As Func(Of Byte())) | |
pdfWebControl = New PdfWebControl() |
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
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of RadDocumentViewerViewModel)" %> | |
<div id="rad_document_viewer_container" style="height:100%;"> | |
<iframe src="<%= Model.IFrameSrc %>" id="<%= Model.ControlID %>" frameborder="0" style="height:100%; width:100%; border: 0px none rgb(255, 255, 255);"></iframe> | |
</div> |
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
function Get-Last-NuGet-Version($nuGetPackageId) { | |
$feeedUrl = "http://packages.nuget.org/v1/FeedService.svc/Packages()?`$filter=Id%20eq%20'$nuGetPackageId'" | |
$webClient = new-object System.Net.WebClient | |
$queryResults = [xml]($webClient.DownloadString($feeedUrl)) | |
$version = $queryResults.feed.entry | %{ $_.properties.version } | sort-object | select -last 1 | |
if(!$version){ | |
$version = "0.0" | |
} | |
$version | |
} |
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
using System; | |
using System.Collections.ObjectModel; | |
using StatLight.Client.Harness.Events; | |
using StatLight.Core.Common; | |
using StatLight.Core.Configuration; | |
using StatLight.Core.Events; | |
using StatLight.Core.Events.Aggregation; | |
using StatLight.Core.Reporting; | |
using StatLight.Core.Runners; | |
using StatLight.Core.WebBrowser; |
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
function Start-The-Fun() | |
{ | |
$voice = new-object -com SAPI.SpVoice; | |
while($true) | |
{ | |
write-host "->" -NoNewLine; | |
$msg = read-host; | |
$Voice.Speak( $msg, 1 ) | out-null; | |
} |
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 static class EnumerableEx | |
{ | |
public static IEnumerable<T> Concat<T>(params IEnumerable<T>[] enumerables) | |
{ | |
if (enumerables == null) throw new ArgumentNullException("enumerables"); | |
return enumerables.SelectMany(i => i); | |
} | |
} |
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 class Sample | |
{ | |
[Test] | |
public void MetadataSample() | |
{ | |
Items.ItemA.ShouldEqual(Items.ItemA); | |
Items.ItemA.Description.ShouldEndWith("Description for A"); | |
} | |
} |
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
function where-is($command) { | |
(ls env:\path).Value.split(';') | ` | |
where { $_ } | ` | |
%{ [System.Environment]::ExpandEnvironmentVariables($_) } | ` | |
where { test-path $_ } |` | |
%{ ls "$_\*" -include *.bat,*.exe,*cmd } | ` | |
%{ $file = $_.Name; ` | |
if($file -and ($file -eq $command -or ` | |
$file -eq ($command + '.exe') -or ` | |
$file -eq ($command + '.bat') -or ` |
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
var msg; | |
// FizzBuzz 1 | |
for(var i = 1; i <=100; i++, msg = ''){ | |
if(i % 5 === 0) | |
msg = 'Buzz'; | |
if(i % 3 === 0) | |
msg += 'Fizz'; |
OlderNewer