This file contains hidden or 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
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
This file contains hidden or 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
%export just | |
||----------------------------------------------------------------------|| | |
|| in this program we move between three different representations of || | |
|| text - as a flat list of characters, including spaces and newlines || | |
|| - as a list of lines (containing spaces but not newlines) || | |
|| - and as a list of list of words. || | |
||----------------------------------------------------------------------|| | |
text == [char] |
This file contains hidden or 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
internal static class Foobar | |
{ | |
private static Bar Foo(Func<Bar, Bar> f) => f(null); | |
internal class Bar | |
{ | |
public Bar Use(Bar bar) => throw new NotImplementedException(); | |
} | |
internal static void Warning() |
This file contains hidden or 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
internal class MyModule : Module | |
{ | |
readonly SourceSettings[] _settings = | |
{ | |
new SourceSettings {FTPServerAddress = "ftp1.server1.lab", Filter = "ALL"}, | |
new SourceSettings {FTPServerAddress = "ftp2.server2.lab", Filter = "pdf;docx"}, | |
new SourceSettings {FTPServerAddress = "ftp3.server3.lab", Filter = "pdf"} | |
}; | |
protected override void Load(ContainerBuilder builder) |
This file contains hidden or 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
private static IEnumerable<string> PermutationsIterative(string s) | |
{ | |
var pending = new List<(string permutation, string rest)> | |
{ | |
("", s) | |
}; | |
var permutations = new List<string>(); | |
while (pending.Any()) | |
{ |
This file contains hidden or 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
private static IEnumerable<string> PermutationsIterative(string s) | |
{ | |
var permutations = new List<(string permutation, string rest)> | |
{ | |
("", s) | |
}; | |
while (true) | |
{ | |
if (permutations.All(p => p.rest == "")) |
This file contains hidden or 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
private static IEnumerable<string> Permutations(string s) | |
=> Permutations("", s).Select(e => e.Item1); | |
private static IEnumerable<(string, string)> Permutations(string acc, string rest) | |
{ | |
if (string.IsNullOrEmpty(rest)) | |
return new[] {(acc, rest)}; | |
return rest.SelectMany(c => | |
Permutations( |
This file contains hidden or 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.joantolos.kata.social.networking.time; | |
import com.joantolos.kata.social.networking.domain.TimeLapse; | |
import com.joantolos.kata.social.networking.ui.Magnitude; | |
import java.sql.Timestamp; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.stream.Collectors; |
This file contains hidden or 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 FluentAssertions; | |
using Xunit; | |
namespace CroMagnon | |
{ | |
public class PrimitiveTest | |
{ | |
public class Foo | |
{ | |
public ConnectionString ConnectionString { get; set; } |
This file contains hidden or 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
Result Work(bool goodQuality) => | |
goodQuality ? throw new Exception("Should not happen") : GoQuickAndDirty(); | |
Result GoQuickAndDirty() => | |
Work(goodQuality: false); |