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 FubuMVC.Core; | |
namespace CharmSim.Controllers | |
{ | |
public class HelpController | |
{ | |
public HelpViewModel Start() | |
{ | |
return new HelpViewModel { Title = "Hello from Controller! " }; | |
} |
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.Windows.Input; | |
namespace Something | |
{ | |
public class RelayCommand : ICommand | |
{ | |
private readonly Func<object, bool> _canExecute; | |
private readonly Action<object> _execute; |
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
$a = pwd | |
ls -r | | |
? { !$_.name.Contains(".g.") } | | |
? { $_.Extension -eq ".cs" -or $_.Extension -eq ".csproj" } | | |
? { $_.lastwritetime -gt [DateTime]::Now.AddHours(-6) } | | |
% { | |
$relative = $_.fullname.Replace($a.Path + "\","") | |
$Path = [System.IO.Path]::GetDirectoryName($relative) | |
mkdir c:\temp\$path -erroraction SilentlyContinue | |
Copy-Item -path $relative -destination c:\temp\$path |
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 Permutation where | |
permutate :: [a] -> [[a]] | |
permutate [x1,x2] = [[x1,x2],[x2,x1]] | |
permutate items = concat $ map p $ getEachInFrontOnce items | |
where | |
p (x:xs) = map (\items -> [x]++items) $ permutate xs | |
getEachInFrontOnce items = map (putItemAtIndexToFront items) [0..length items-1] | |
putItemAtIndexToFront items idx = [items!!idx] ++ take idx items ++ drop (idx+1) items |
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 Ast | |
open System | |
type slotDeclaration= { | |
Index : int | |
Name : string | |
Size : int | |
} |
NewerOlder