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 void Main(String[] args) | |
{ | |
Console.WriteLine("\n\nStarting Test"); | |
var evals = new List<EvaluationResult> | |
{ | |
StartNewTest("PST", new PSTLooper(intHands), RUNS), | |
StartNewTest("SteveBrecher", new SteveBrecherLooper(longHands), RUNS), | |
StartNewTest("2p2", new TwoPlusTwoLooper(intHands), RUNS) | |
}; |
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
CDBCommand::CRow *newrow = NULL; | |
int wv = row->Field("wiedervorlage")->GetInt(); | |
if (wv > 0) { | |
CDBCommand swv = CDBCommand(format("SELECT * FROM swvtab WHERE id=%d", wv)); | |
if (swv.Execute()) | |
newrow = swv.FetchRow(CDBCommand::FETCH_NOSELECT); | |
} | |
if (newrow == NULL){ | |
CDBCommand swv = CDatastorage::GetActiveDatabase()->SimpleTable("swvtab"); |
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 readonly int[] HR = new int[32487834]; | |
private static unsafe void Init() | |
{ | |
var lutFileInfo = new FileInfo(@"C:\Handranks.dat"); | |
if (!lutFileInfo.Exists) | |
{ | |
GenerateFile(); | |
} |
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 long encode(IEnumerable<int> cards) | |
{ | |
long result = 0; | |
foreach(int c in cards) | |
{ | |
result |= encode(new Card(c)); | |
} | |
return 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
public static class EnumerableExtensions | |
{ | |
private static readonly Random rng = new Random(); | |
public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> source) | |
{ | |
if (source == null) | |
throw new ArgumentNullException("source"); | |
if (rng == null) | |
throw new ArgumentNullException("rng"); |
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
0 0 28 30 | |
0 30 28 30 | |
0 60 18 30 | |
0 90 12 30 | |
0 120 28 29 | |
12 90 27 29 | |
18 60 25 29 | |
0 149 21 29 | |
0 178 26 28 | |
21 149 19 29 |
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
0 0 0 0 0 0 0 0 1 | |
0 0 0 0 0 0 0 0 1 | |
0 0 0 0 0 0 0 0 1 | |
5 5 5 5 6 6 7 7 1 | |
5 5 5 5 6 6 7 7 1 | |
5 5 5 5 6 6 7 7 1 | |
5 5 5 5 6 6 . . 1 | |
2 2 2 2 2 2 3 3 3 | |
2 2 2 2 2 2 3 3 3 | |
2 2 2 2 2 2 3 3 3 |
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; | |
namespace GuessTheNumber | |
{ | |
class Program | |
{ | |
static Random rng = new Random(); | |
static int min=0; | |
static int max=100; | |
static int guess = 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
using System; | |
namespace GuessTheNumber | |
{ | |
internal class Program | |
{ | |
private static void Main() | |
{ | |
Random rng = new Random(); | |
int min = 0, guess = 0, tries = 0, max = 100, number = rng.Next(1, 100); |
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
import math | |
from itertools import product | |
def fib(n): | |
F = [1, 1] | |
T = [[0, 1], | |
[1, 1]] | |
if n == 1: | |
return 1 |
OlderNewer