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
Console.WriteLine("Progress bar demo using carriage returns"); | |
const int STEPS = 40; | |
const string SPINNER = "|/-\\"; | |
var random = new Random(); | |
for (var i = 0; i <= STEPS; i++) { | |
Console.Write("\r"); | |
Console.Write("Progress: "); | |
Console.Write(SPINNER[i%4]); | |
Console.Write(" ["); | |
Console.Write(String.Empty.PadRight(i, '▓').PadRight(STEPS, ' ')); |
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
({}+"")[!""+!""] | |
+ ([] + !""/[])[!![]+!!{}+!""] | |
+ (![] + "")[!![] << !![]] | |
+ (![] + "")[!![] << !![]] | |
+ (!!{}/[]+"")[!![] << !![] <<!![] | !![] << !![] | !![]] | |
+ ({}+"")[!![] << !![] <<!![] | !![] << !![] | !![]] | |
+ ({}+"")[!![]<<!![]|!([]/[])] | |
+ ({}+"")[+!"" ] | |
+ (""+![])[!![]<<!![]<<!![]] | |
+ (![] + "")[!![] << !![]] |
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
abstract class Animal { | |
public int distanceFromEdge = 1; | |
protected bool edge => distanceFromEdge <= 0; | |
protected void run() { | |
distanceFromEdge--; | |
} | |
public abstract void go(); | |
} |
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 static class ObjectExtensions { | |
public static dynamic ToDynamic(this object value) { | |
IDictionary<string, object> expando = new ExpandoObject(); | |
var properties = TypeDescriptor.GetProperties(value.GetType()); | |
foreach (PropertyDescriptor property in properties) { | |
expando.Add(property.Name, property.GetValue(value)); | |
} | |
return (ExpandoObject)expando; | |
} | |
} |
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
Forever takes a lifetime. | |
The sunset is silence (it seems) | |
Until a lifetime is nothing, | |
Roll a lifetime into your dreams, | |
Cast your dreams into the night, | |
Let the sunset be with the night. | |
Give back the sunset | |
Give back the night |
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 static class ObjectExtensions { | |
public static dynamic ToDynamic(this object value) { | |
IDictionary<string, object> expando = new ExpandoObject(); | |
var properties = TypeDescriptor.GetProperties(value.GetType()); | |
foreach (PropertyDescriptor property in properties) { | |
expando.Add(property.Name, property.GetValue(value)); | |
} | |
return (ExpandoObject)expando; | |
} | |
} |
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
DECLARE @places TABLE (name nvarchar(max)); | |
insert into @places(name) values('Aarhus'); | |
insert into @places(name) values('Berlin'); | |
insert into @places(name) values('Zurich'); | |
insert into @places(name) values('Aachen'); | |
select name from @places order by name COLLATE Latin1_General_CI_AI | |
select name from @places order by name COLLATE Danish_Norwegian_CI_AI | |
select name from @places order by name COLLATE Finnish_Swedish_CI_AI |
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.Text; | |
namespace DotNetSummitBy { | |
class Program { | |
static NormalizationForm[] forms = new[] { | |
NormalizationForm.FormC, NormalizationForm.FormD, | |
NormalizationForm.FormKC, NormalizationForm.FormKD |
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
BEGIN:VCARD | |
VERSION:2.1 | |
N:Gump;Forrest;;Mr. | |
FN:Forrest Gump | |
ORG:Bubba Gump Shrimp Co. | |
TITLE:Shrimp Man | |
PHOTO;GIF:http://www.example.com/dir_photos/my_photo.gif | |
TEL;WORK;VOICE:(111) 555-1212 | |
TEL;HOME;VOICE:(404) 555-1212 | |
ADR;WORK;PREF:;;100 Waters Edge;Baytown;LA;30314;United States of America |
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
/* | |
This bookmarklet will let you select multiple stories in Pivotal Tracker and then | |
copy story details to your clipboard in Markdown format, as: | |
* Story name [#123456579](https://www.pivotaltracker.com/story/show/123456789) | |
* Story name [#123456579](https://www.pivotaltracker.com/story/show/123456789) | |
You can then paste this into your GitHub pull request description, then paste the resulting | |
rendered HTML into release emails, Slack, etc. |
NewerOlder