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
#define MAXC 1010 | |
#define MAXX 110 | |
#define INF 2000000000 | |
#include <iostream> | |
#include <queue> | |
#include <vector> | |
#include <cstring> | |
using namespace std; | |
int n, m, s, d, qr, c; |
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
var foo = Expression.Parameter(typeof(Foo)); | |
var value = Expression.Parameter(typeof(int)); | |
var propA_set = Expression.Lambda<Action<Foo, int>>( | |
Expression.Assign(Expression.Property(foo, propA), value), | |
foo, value).Compile(); |
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
var foo = new Foo(); | |
var bar = typeof(Foo).GetMethod("Bar"); | |
var s = Stopwatch.StartNew(); | |
for (int i = 0; i < 5000000; i++) | |
foo.Bar(i); | |
Console.WriteLine("Sem reflection: {0}", s.Elapsed); | |
s.Restart(); |
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
var foo = new Foo(); | |
var bar = typeof(Foo).GetMethod("Bar"); | |
var param = Expression.Parameter(typeof(int)); | |
var bar2 = Expression.Lambda<Func<int, string>>( | |
Expression.Call(Expression.Constant(foo), bar, param), param).Compile(); | |
var s = Stopwatch.StartNew(); | |
for (int i = 0; i < 5000000; i++) | |
foo.Bar(i); |
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
[Test] | |
public void GetMovesOneSquareForward_A2_ReturnsPromotions() | |
{ | |
var bp = new BlackPawns(Bitboard.With.A2); | |
var m = bp.GetMovesOneSquareForward(); | |
m.Should().Have.SameSequenceAs( | |
new Move("A2", "A1", MoveTypes.PawnToQueenPromotion), | |
new Move("A2", "A1", MoveTypes.PawnToRookPromotion), |
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 SimpleHelper : System.Web.WebPages.HelperPage | |
{ | |
public static new WebViewPage Page | |
{ | |
get { return (WebViewPage)WebPageContext.Current.Page; } | |
} | |
public static new HtmlHelper Html | |
{ | |
get { return Page.Html; } |
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
namespace StrongChess.Model.Pieces | |
{ | |
public struct Bishop : IPieceRule | |
{ | |
public Bitboard GetMoveBoard(Square from) | |
{ | |
return GetMoveBoard(from, 0); | |
} | |
public Bitboard GetMoveBoard(Square from, Bitboard friends) |
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
Adagio | |
After Forever | |
Aina | |
Allen & Lande | |
Almah | |
Altaria | |
Amaran | |
Andre Matos | |
Angra | |
Apocalyptica |
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 ParamsExtraction | |
{ | |
Group group; | |
public ParamsExtraction(Group group) | |
{ | |
this.group = group; | |
} | |
private bool TryGet<T>(int position, out T result) | |
{ |
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
Felipe: | |
quer minha opinião? | |
Rodrigo Vidal: | |
sim :D | |
Felipe: | |
na grande maioria dos casos, tanto faz | |
não terá diferença | |
em casos que um FileSystem é um problema, o DB será um problema também | |
e vice-cersa | |
vice-versa |