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.Diagnostics; | |
using System.Linq; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
namespace DynamicDispatch | |
{ | |
interface IAnimalVisitor |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" | |
DefaultTargets="PrintValues" | |
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<Add>$([MSBuild]::Add(5,9))</Add> | |
<Subtract01>$([MSBuild]::Subtract(90,768))</Subtract01> | |
<Mult01>$([MSBuild]::Multiply(4,9))</Mult01> | |
<Div01>$([MSBuild]::Divide(100,5.2))</Div01> |
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 Dapper; | |
using Oracle.ManagedDataAccess.Client; | |
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Linq; | |
public class OracleDynamicParameters : Dapper.SqlMapper.IDynamicParameters { | |
private static Dictionary<SqlMapper.Identity, Action<IDbCommand, object>> paramReaderCache = new Dictionary<SqlMapper.Identity, Action<IDbCommand, object>>( ); |
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 Test { | |
// Implicit class is also a new feature in scala 2.10 | |
implicit class CounterSC(val sc: StringContext) extends AnyVal { | |
// Define functions that we want to use with string interpolation syntax | |
def partsCount(args: Any*): Int = sc.parts.length | |
def argsCount(args: Any*): Int = args.length | |
def tokenCount(args: Any*): Int = sc.parts.length + args.length | |
def getParts(args: Any*): String = |
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
namespace YourNamespace | |
{ | |
/// <summary> | |
/// Uses the Name value of the <see cref="ColumnAttribute"/> specified to determine | |
/// the association between the name of the column in the query results and the member to | |
/// which it will be extracted. If no column mapping is present all members are mapped as | |
/// usual. | |
/// </summary> | |
/// <typeparam name="T">The type of the object that this association between the mapper applies to.</typeparam> | |
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
var grabby = new Grabby(); | |
string output = grabby.Grab("http://www.dotnetnerd.dk/cv"); | |
Console.WriteLine(output); | |
File.WriteAllText("c:\\test.html", output); | |
} |
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 @"..\packages\Accord.2.8.1.0\lib\Accord.dll" | |
#r @"..\packages\Accord.Math.2.8.1.0\lib\Accord.Math.dll" | |
#r @"..\packages\Accord.Statistics.2.8.1.0\lib\Accord.Statistics.dll" | |
#r @"..\packages\Accord.MachineLearning.2.8.1.0\lib\Accord.MachineLearning.dll" | |
open System | |
open System.IO | |
open Accord.MachineLearning | |
open Accord.MachineLearning.VectorMachines |
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
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same 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
package com.liveperson.predictivedialer.common.sessions | |
import scala.concurrent.duration.FiniteDuration | |
/** | |
* User: michaelna | |
* Date: 1/15/14 | |
* Time: 2:58 PM | |
*/ | |
object InviteResponse { |
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
module Counter = | |
type State = { Value: int } | |
static member Zero = { Value: 0 } | |
type Command = | |
| Incremement | |
| Decrement | |
type Event = | |
| Incremented |
OlderNewer