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
case class Water {} | |
object Wood extends Enumeration { | |
val Oak = Value | |
} | |
object Countries extends Enumeration { | |
val Many, Scotland, USA = Value | |
} |
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
#r "FSharp.Data.TypeProviders.dll" | |
#r "System.ServiceModel" | |
open System.ServiceModel | |
open Microsoft.FSharp.Data.TypeProviders | |
open Microsoft.FSharp.Linq | |
type WSDL = Microsoft.FSharp.Data.TypeProviders.WsdlService< @"http://localhost:55322/api/ReviewRequestsWebService.svc"> |
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
$clipboardImage = [System.Windows.Forms.Clipboard]::GetImage() | |
$saveDirectory = 'c:\temp\captured' | |
if ( $clipboardImage -ne $null ) | |
{ | |
$existingImages = @() | |
$existingImages = ls 'c:\temp\captured' | |
if ( $existingImages.Length -eq 0 ) | |
{ |
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
#r "System.Data.dll" | |
#r "FSharp.Data.TypeProviders.dll" | |
#r "System.Data.Linq.dll" | |
#r "FSharp.Data.TypeProviders.dll" | |
#r "FSharp.Core.dll" | |
#r "System.Data.Linq.dll" | |
open System | |
open System.Data | |
open System.Data.Linq |
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
{ | |
"contentType": "application/gliffy+json", | |
"version": "1.3", | |
"metadata": { | |
"title": "untitled", | |
"revision": 0, | |
"exportBorder": false, | |
"loadPosition": "default", | |
"libraries": [ | |
"com.gliffy.libraries.ui.ui_v3.containers_content", |
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
def define_context( context, parent_contexts = None, verbose = False ): | |
if verbose: | |
print 'Defining context for \"%s\"' % context.__name__ | |
if parent_contexts is None: | |
parent_contexts = [] | |
def make_test_case_name( parent_contexts, context ): | |
if len(parent_contexts) > 0: | |
return '_'.join( [ x.__name__ for x in parent_contexts + [ context ] ] ) |
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 foo( args ) | |
{ | |
if( !(promises instanceof Array) ) | |
args = Array.prototype.slice.call(arguments); | |
... | |
} |
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.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace SpecLite | |
{ | |
class Suite | |
{ |
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
class SingleThreadedSynchronizationContext : SynchronizationContext | |
{ | |
private readonly Queue<Action> messagesToProcess = new Queue<Action>(); | |
private readonly object syncHandle = new object(); | |
private bool isRunning = true; | |
public override void Send(SendOrPostCallback codeToRun, object state) | |
{ | |
throw new NotImplementedException(); |
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
select distinct vp.ParentId, stdev( vr.Percents ) over (partition by vp.ParentId ) dev , | |
( select FullName from VotingPlace where Id = vp.ParentId ) | |
from VotingResult vr inner join VotingPlace vp on vr.VotingPlaceId = vp.Id where vr.Counter = '23' and vp.ElectionId = 'PRES2012' and vp.Type = 5 | |
order by dev desc |
OlderNewer