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 UrlBuilder : IDynamicMetaObjectProvider | |
{ | |
/// <summary> | |
/// Usage: UrlBuilder.Build(url, key1: value1, key2: value2) | |
/// </summary> | |
/// <remarks> | |
/// values will be converted to strings via "ToString()". Any url-encoding must happen before | |
/// this method is called. Pass null as the value at runtime in order to omit the parameter | |
/// entirely. Use String.Empty for query parameters which should be present but have no value. | |
/// If url is a string, the result will be a string. If it is a System.Uri, the result will |
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 StringFormat : IDynamicMetaObjectProvider | |
{ | |
/// <summary> | |
/// Usage: StringFormat.Format(formatString, key1: value1, key2: value2) | |
/// or StringFormat.Format(formatProvider, formatString, key1: value1, key2: value2) | |
/// </summary> | |
public static readonly dynamic Format = new StringFormat(); | |
private StringFormat() | |
{ |
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
let | |
data = Table.FromColumns({{1, 2, 3, 4, 5}, {"Left", "Right", "Center", "Left", "Right"}}), | |
filter = Table.FromColumns({{"Right", "Center"}}), | |
filterValues = filter[Column1], | |
filtered = Table.SelectRows(data, each List.Contains(filterValues, [Column2])) | |
in | |
filtered |
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
let | |
Source = Text.FromBinary(File.Contents("D:\testdata\tweet.json")), | |
Eol = Text.PositionOf(Source, "#(lf)"), | |
Skipped = Text.Range(Source, Eol + 1), | |
Tweets = Json.Document(Skipped) | |
in | |
Tweets |
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
let | |
Source = Table.FromColumns({Lines.FromBinary(Web.Contents("http://www.aer.ca/data/WELLS/SPUDTHU.TXT"),null,null,1252)}), | |
Header = List.First(List.Select(Source[Column1], each Text.StartsWith(_, "--"))), | |
Positions = Text.PositionOf(Header, " ", -1), | |
Length = Text.Length(Header), | |
Lengths = List.Generate( | |
() => 0, | |
(i) => i <= List.Count(Positions), | |
(i) => i + 1, | |
(i) => |
NewerOlder