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.Diagnostics; | |
const int deckSize = 60; | |
const int sampleHandsCount = 3; | |
const int openingHandsCards = 7; | |
const int simulateTimes = 10_000_000; | |
Console.WriteLine("Opening hand simulator v1.0"); | |
Console.WriteLine($" @deckSize: {deckSize}, @sampleHandsCount: {sampleHandsCount}, @openingHandsCards: {openingHandsCards}"); | |
Console.WriteLine($" @simulateTimes: {simulateTimes}"); |
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
use strict; | |
use warnings; | |
use 5.18.2; | |
use File::Slurp; | |
use utf8; | |
use Encode; | |
my @legals = read_file("legal_cards.txt"); | |
my $all_cards = read_file("search.php.txt", binmode => ":utf8"); | |
my @all = split /\n\n/, $all_cards; |
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
// いままでは OK だったが Visual Studio 2017 Update3 で急に怒られるようになったコード | |
// error CS8306: タプル要素名 'a' と推測されます。推測される名前で要素にアクセスするには、言語バージョン 7.1 以上をお使いください。 | |
// error CS8306: タプル要素名 'b' と推測されます。推測される名前で要素にアクセスするには、言語バージョン 7.1 以上をお使いください。 | |
// 「最新のマイナーを使用」に設定する(C# 7.1) と通る | |
using System.Linq; | |
namespace ResolveTupleTest | |
{ | |
class Program |
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.Collections.Generic; | |
using System.Linq; | |
namespace MyLinq | |
{ | |
/// <summary> | |
/// LINQ拡張メソッドを定義するためのユーティリティクラスです。 | |
/// </summary> | |
public static class LinqEx |
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
defmodule TypeZeroSim do | |
def create_deck(spirit, flame) do | |
deck = List.duplicate(:spirit, spirit) ++ List.duplicate(:flame, flame) | |
Enum.shuffle(deck) | |
end | |
def simulate(deck) do | |
hand = Enum.slice(deck, 0, 7) | |
library = Enum.slice(deck, 7, Enum.count(deck) - 7) |
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
<UserSettings> | |
<ApplicationIdentity version="11.0"/> | |
<ToolsOptions> | |
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/> | |
</ToolsOptions> | |
<Category name="Environment_Group" RegisteredName="Environment_Group"> | |
<Category name="Environment_KeyBindings" Category="{F09035F1-80D2-4312-8EC4-4D354A4BCB4C}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_KeyBindings" PackageName="Visual Studio Environment Package"> | |
<Version>11.0.0.0</Version> | |
<KeyboardShortcuts> | |
<ScopeDefinitions> |
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.Collections.Generic; | |
namespace VsKiller | |
{ | |
class Death | |
{ | |
public static void Main(string[] args) | |
{ | |
var a = new List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List<List |
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
cat ./*.ts | perl -nle 'print if /^\s*((\/\*)|\*)/' > cat.js; jsdoc ./cat.js; rm cat.js |
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
#!/usr/bin/env zsh | |
#add following alias to your ~/.zshrc | |
#alias cdp='. _cdp' | |
PWD=`ls -la | grep '^d' | awk '{print $9}' | peco --prompt="$(pwd) >"` | |
if [ $PWD = "." ]; then | |
cd $PWD | |
else | |
cd $PWD |
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 success; | |
var board[8]; | |
var yokoArray[8]; | |
var leftUpper[88]; | |
var rightUpper[88]; | |
main() { | |
var max, state; | |
max = 8 * 8 * 8 * 8 * 8 * 8 * 8 * 8; | |
state = 0; |
NewerOlder