Skip to content

Instantly share code, notes, and snippets.

C:\>gem install rdiscount -s http://gemcutter.org
Building native extensions. This could take a while...
ERROR: Error installing rdiscount:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for random()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
<configuration>
<system.serviceModel>
<client>
<metadata>
<wsdlImporters>
<extension type="TaskWsdlImportExtension.TaskAsyncWsdlImportExtension, TaskWsdlImportExtension" />
</policyImporters>
</metadata>
</client>
</system.serviceModel>
public partial class QuoteCalculatorServiceClient : System.ServiceModel.ClientBase<IQuoteCalculatorService>, IQuoteCalculatorService {
public System.Threading.Tasks.Task<ClientApp.WCFService.Quote> GetQuoteAsync(string ticker) {
return System.Threading.Tasks.Task<ClientApp.WCFService.Quote>.Factory.FromAsync(
new System.Func<string, System.AsyncCallback, object, System.IAsyncResult>((
(IQuoteCalculatorService)(this)).BeginGetQuote),
new System.Func<System.IAsyncResult, ClientApp.WCFService.Quote>(((IQuoteCalculatorService)(this)).EndGetQuote), ticker, null);
}
public System.Threading.Tasks.Task<System.Collections.ObjectModel.ReadOnlyCollection<ClientApp.WCFService.Quote>> GetQuotesAsync(string[] tickers) {
quoteTask.ContinueWith((x) => Console.WriteLine("GetQuoteAsync call finished.")).Start();
<internal:lib/rubygems/custom_require>:33:in `require': 126: The specified module could not be found. - C:/Ruby192/lib/ruby/gems/1.9.1/gems/zmq-2.0.9/lib/zmq.so (LoadError)
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/Users/larsw/Documents/NetBeansProjects/zmq-publisher/lib/main.rb:5:in `<main>'
# To change this template, choose Tools | Templates
# and open the template in the editor.
require "rubygems"
require "zmq"
puts "hello world"
namespace ForEachWithOnlyGetEnumerator
{
using System;
using System.Collections;
class Foo
{
public IEnumerator GetEnumerator()
{
yield return "foo";
C:\github\larsw\ncqrs-master>tools\nant\nant.exe /f:"MAIN.build"
NAnt 0.91 (Build 0.91.3881.0; alpha2; 17.08.2010)
Copyright (C) 2001-2010 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/github/larsw/ncqrs-master/MAIN.build
Target framework: Microsoft .NET Framework 4.0
Target(s) specified: build
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
//
// Quiz: how can you get this to compile / run / output "Hello World", by only adding three attributes?
//
// Lars Wilhelmsen / @larsw
@larsw
larsw / larsw_quiz_20110322.cs
Created March 22, 2011 08:01
Quiz - answer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
//
// Quiz: how can you get this to compile / run / output "Hello World", by only adding three attributes?
//
// Lars Wilhelmsen / @larsw