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
// MS-PL License. | |
// Author Johannes Rudolph <jojo.rudolph@gmail.com> | |
// This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. | |
// 1. Definitions | |
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. | |
// A "contribution" is the original software, or any additions or changes to the software. | |
// A "contributor" is any person that distributes its contribution under this license. | |
// "Licensed patents" are a contributor's patent claims that read directly on its contribution. |
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 AutoIndexMerging : RavenTest | |
{ | |
const string SampleLogfileStoreId = "123"; | |
[Fact] | |
public async Task AutoIndexReuseFails() | |
{ | |
var store = NewRemoteDocumentStore( fiddler: true ); | |
var session = store.OpenAsyncSession(); |
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
import rescala._ | |
import rescala.events.{ Event, ImperativeEvent } | |
import makro.SignalMacro.{SignalM => Signal} | |
object ReScalaDemo extends App { | |
/* | |
Observer criticism | |
- inverts natural dependency order (listeners call soure to register) |
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
object PathDependentTypes extends App { | |
class Food {} | |
class Grass extends Food {} | |
class DogFood extends Food {} | |
abstract class Animal { | |
// SuitableFood is a subtype of Food, deriving classes must define it | |
type SuitableFood <: Food | |
def eat(food: SuitableFood) | |
} |
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 Library; | |
using System.Reflection; | |
using System.Runtime.Remoting.Proxies; | |
using System.Runtime.Remoting.Services; | |
using System.Runtime.Remoting.Messaging; | |
using System.Runtime.Remoting.Activation; | |
namespace Library | |
{ |
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 spec = from sut in SpecificationExpression.Begin(() => new Stack<int>()) | |
where sut.Push(element) | |
select new Observations() | |
{ | |
() => Assert.NotEmpty(sut), | |
() => Assert.Equal(element, sut.Peek()) | |
}; |
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 Vehicle {} | |
class Car extends Vehicle {} | |
class Porsche extends Car {} | |
public void foo(List<? extends Car> extendsCar , List<? super Car> superOfCar, List<Car> cars) { | |
Vehicle V = new Vehicle(); | |
Car C = new Car(); | |
Porsche P = new Porsche(); | |
// [] specifies the range of valid types for ? |
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
// | |
// TeamCityAdadpter.m | |
// Created by Johannes Rudolph on 27.05.11. | |
// Use of this source code is governed by the following license: | |
// | |
// Redistribution and use in source and binary forms, with or without modification, | |
// are permitted provided that the following conditions are met: | |
// | |
// (1) Redistributions of source code must retain the above copyright notice, |
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
open System.Linq | |
let a = [0; 5; 10] | |
let b = [0 .. 10] | |
// enumerates left and yields element pairs combined by consuming right until 'consume' is false or either sequence is exhausted | |
let condZip (left:seq<'a>) (right:seq<'b>) consume project = | |
seq { | |
use en = right.GetEnumerator() | |
let hadNext = ref(en.MoveNext()) |
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 SimpleSpec; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Xunit; | |
namespace SimpleSpec.Tests | |
{ | |
public class Demo | |
{ |
OlderNewer