[alias]
lg = log --graph --pretty=format:'%C(yellow)%d%Creset %C(cyan)%h%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --all
This alias is going to generate an output like this:
public class Message | |
{ | |
[JsonConverter(typeof(SHA256StringJsonConverter))] | |
public string Password { get; set; } | |
} | |
public static class Foo | |
{ | |
private static async Task DelayAsync() | |
{ | |
await Task.Delay(1000); | |
} | |
public static void Test() | |
{ | |
var delayTask = DelayAsync(); |
public partial class Login : PhoneApplicationPage | |
{ | |
ILoginService _service; | |
public Login(ILoginService service) | |
{ | |
this.InitializeComponent(); | |
_service = service; | |
} | |
public static class TypeExtensions | |
{ | |
public static bool IsAssignableToGenericType(this Type givenType, Type genericType) | |
{ | |
var interfaceTypes = givenType.GetInterfaces(); | |
if (interfaceTypes.Any(it => it.IsGenericType && it.GetGenericTypeDefinition() == genericType)) | |
{ | |
return true; | |
} |
GET http://webservice.buddyplatform.com/Service/v1/BuddyService.ashx?UserAccount_Profile_Create&BuddyApplicationName=EII_Application&BuddyApplicationPassword=2D5A783F-1CA2-4464-8EF0-4C0AB5279410&NewUserName=BuddyTester1234&UserSuppliedPassword=testerpw3&NewUserGender=male&UserAge=13&[email protected]&StatusID=1&FuzzLocationEnabled=1&CelebModeEnabled=1&ApplicationTag=&RESERVED= HTTP/1.1 | |
Host: webservice.buddyplatform.com | |
Connection: keep-alive | |
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
Accept-Encoding: gzip,deflate,sdch | |
Accept-Language: en-US,en;q=0.8 | |
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 | |
Cookie: Coyote-2-d063c7da=a0a1465:0 |
public class MyDslGrammar : Grammar | |
{ | |
public MyDslGrammar(): base(caseSensitive:false) | |
{ | |
var binaryExpression = new NonTerminal("binaryExpression", typeof(BinaryExpressionNode)); | |
/*...*/ | |
} | |
} |
функция f(x) { | |
если (x % 2 == 0) { | |
возврат истина; | |
} иначе { | |
возврат ложь; | |
} | |
} | |
для (пер i = 0; i < 10; i++) { | |
console.log(i, f(i)); |
function stringContainsAnyOfElements(string, elements){ | |
string = string.toLowerCase(); | |
for(var i = 0; i < elements.length; i++) { | |
if(string.indexOf(elements[i]) != -1) { | |
return true; | |
} | |
} | |
return false; | |
} | |
public class NullAction | |
{ | |
public static readonly Action DoNothing = () => { }; | |
} | |
//This allows you to do (callback ?? NullAction.DoNothing)() instead of (callback ?? () => { })() |