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
root@ubuntu:/home/elemarjr# mvn archetype:create -DgroupId=com.elemarjr.simpleMath -DartifactId=SimpleMath -DarchetypeArtifactId=maven-archetype-quickstart | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building Maven Stub Project (No POM) 1 | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-archetype-plugin:2.4:create (default-cli) @ standalone-pom --- | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] BUILD FAILURE |
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
(* --- 0001 --- *) | |
[1..999] | |
|> List.where (fun f -> (f % 3 = 0) || (f % 5 = 0)) | |
|> List.sum | |
(* --- 0002 --- *) | |
let fib = | |
let rec f a b = seq { | |
yield a | |
yield! f b (a + b) |
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 inline solution n = | |
[1UL..(n - 1UL)] | |
|> List.filter (fun f -> (f % 3UL = 0UL) || (f % 5UL = 0UL)) | |
|> List.sum | |
let rec iterate count = | |
if count > 0 | |
then | |
System.Console.ReadLine() | |
|> (uint64) |
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
// Este teste verifica o bit mais alto ligado em um bitboard | |
// (ver minha série sobre xadrez [http://elemarjr.net]) para entender o contexto | |
// Não só mais de um assert faz sentido, como a lógica no teste | |
// O equivalente a esse teste seriam 64 testes individuais (muito trabalho para pouco resultado, não acha) | |
[Test] | |
public void GetLeadingSquare_EverySquare() | |
{ | |
var bitboard = new Bitboard(); | |
for (int i = 0; i < 64; 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
public void ctor_DiagonalsNEA1H8() | |
{ | |
Square[] squares = new Square[] { | |
Squares.A1, | |
Squares.B2, | |
Squares.C3, | |
Squares.D4, | |
Squares.E5, | |
Squares.F6, | |
Squares.G7, |
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.Collections.Generic; | |
using StrongChess.Model.Pieces; | |
namespace StrongChess.Model.Sets | |
{ | |
struct PieceSet<TPieceRule> | |
where TPieceRule : IPieceRule, new() | |
{ | |
Bitboard _Positions; | |
public PieceSet(Bitboard positions) : this() |
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
14 Bis | |
AC_DC | |
Ac£sticos e Valvulados | |
Adele | |
Adriana Calcanhoto, Ana Carolina e Maris | |
Aerosmith | |
Aha | |
Air Supply | |
Alanis Morissette | |
Alceu Valenca- Elba Ramalho - Geraldo Azevedo |
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 static void Class_AllStaticMethodsShouldBeDecoratedWithDebuggerStepThroughAttribute() | |
{ | |
var methods = from m in typeof(Mooble.Util.StringExtensions).GetMethods() | |
where !m.IsSpecialName && m.IsStatic && | |
m.GetCustomAttributes(typeof(DebuggerStepThroughAttribute), true).Count() == 0 | |
select m.Name; | |
if (methods.Count() > 0) | |
{ |
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 SilverlightApplication1 | |
{ | |
public partial class MainPage : UserControl | |
{ | |
public MainPage() | |
{ | |
InitializeComponent(); | |
this.Loaded += (s, e) => { this.DataContext = new Person(); }; | |
} | |
} |
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
<UserControl x:Class="SilverlightApplication1.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
d:DesignHeight="300" d:DesignWidth="400"> | |
<StackPanel x:Name="LayoutRoot" Background="White"> |
OlderNewer