<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8783559460570125755</id><updated>2026-08-13T23:17:56.045+09:00</updated><category term="Perl"/><category term="java"/><category term="emacs"/><category term="javascript"/><category term="ExcelVBA"/><category term="雑記"/><category term="C"/><category term="MySQL"/><category term="SPIDERING_HACKS"/><category term="class"/><category term="macbook"/><category term="vb.net"/><category term="C#"/><category term="mac OS X"/><category term="LWP"/><category term="URI"/><category term="cpan"/><category term="cplusplus"/><category term="sort"/><category term="ライブラリ.js"/><category term="正規表現"/><category term="ASP.NET"/><category term="Catalyst"/><category term="CentOS7"/><category term="Project Euler"/><category term="SQL Server"/><category term="TypeScript"/><category term="book"/><category term="c++"/><category term="jquery"/><category term="shell"/><category term="ubuntu"/><category term="どう書く"/><category term="インストール"/><category term="モジュール"/><category term="リファレンス"/><category term=".net"/><category term="/"/><category term="Abcd"/><category term="Blogger"/><category term="CGI"/><category term="Class::Accessor::Fast"/><category term="DB"/><category term="Data::Dumper"/><category term="Dumpvalue"/><category term="File::Find"/><category term="File::Path"/><category term="Haskell"/><category term="Image::Magick"/><category term="Imager"/><category term="LWP::Simple"/><category term="Module"/><category term="Module::Starter::PBP"/><category term="Objective-C"/><category term="PPM"/><category term="VirtualBox"/><category term="a b"/><category term="apache"/><category term="azure"/><category term="ftp"/><category term="git"/><category term="mac"/><category term="memo"/><category term="moose"/><category term="nginx"/><category term="perlbrew"/><category term="ruby"/><category term="safari"/><category term="test"/><category term="vbscript"/><category term="web共有"/><category term="wget"/><category term="win32APi"/><category term="xrea"/><category term="zsh"/><category term="どう書く？org"/><category term="コンパイル"/><category term="サブルーチン"/><category term="スクリーンショット"/><category term="ソフト"/><category term="人工無能"/><category term="入力"/><category term="後で読む"/><category term="画像加工表示系.js"/><category term="素数"/><category term="資料"/><title type='text'>buffer</title><subtitle type='html'>日々、勉強し吐き出し中です。。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>187</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-134184620007959098</id><published>2026-08-13T23:07:03.364+09:00</published><updated>2026-08-13T23:17:56.044+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Haskell"/><title type='text'>Hello, World</title><content type='html'>windowsで実行&lt;br&gt;
&lt;br&gt;
&lt;pre class=&quot;prettyprint lang-hs&quot;&gt;&lt;code&gt;
main = putStrLn &quot;Hello, World!&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;
runghc ./ファイル名.hs&lt;br&gt;
→コンパイルして実行(実行ファイルは生成しない)&lt;br&gt;
&lt;br&gt;
ghc ./ファイル名.hs&lt;br&gt;
→ファイル名.hi, ファイル名.o, ファイル名.exe を作成&lt;br&gt;
./ファイル.exe&lt;br&gt;

</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/134184620007959098/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/134184620007959098' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/134184620007959098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/134184620007959098'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2026/08/hello-world.html' title='Hello, World'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-8426379089082246234</id><published>2024-02-10T02:48:00.013+09:00</published><updated>2024-02-11T01:34:25.997+09:00</updated><title type='text'>PowerShellメモ</title><content type='html'>&lt;p&gt;
■PowerShell ISE&lt;br /&gt;
PowerShellスクリプト開発環境のことデバッグ機能、入力支援機能あり&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;
■変数作成&lt;br /&gt;
宣言はなし。値代入により変数が作成される。&lt;br /&gt;
&lt;br /&gt;
$ + 変数名 で作成できる。&lt;br /&gt;
&lt;/p&gt;

$str = &quot;あいうえお&quot;&amp;nbsp;&lt;div&gt;$int = 10&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;※大文字小文字は識別されない&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■標準出力&lt;/div&gt;&lt;div&gt;Write-Host 変数名
で出力&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■strictモード&lt;/div&gt;&lt;div&gt;以下のようにタイプミスしても何も表示されない&lt;/div&gt;&lt;div&gt;$string = &quot;Hello World!&quot;&lt;/div&gt;&lt;div&gt;Write-Host $sting&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;そのため set-psdebug -Strict を記載すると&lt;/div&gt;&lt;div&gt;それ以降で、変数が作成されていないのに利用しているとエラーとなる&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;set-psdebug -Strict
$string = &quot;Hello World!&quot;&lt;/div&gt;&lt;div&gt;Write-Host $sting&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;gt;変数 &#39;$sting&#39; は、設定されていないために取得できません。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■変数の型&lt;/div&gt;&lt;div&gt;// 整数&lt;/div&gt;&lt;div&gt;Byte  (8bit  符号なし)&amp;nbsp;&lt;/div&gt;&lt;div&gt;Char  (16bit 符号なし)&amp;nbsp;&lt;/div&gt;&lt;div&gt;UInt16(16bit 符号なし)&amp;nbsp;&lt;/div&gt;&lt;div&gt;UInt32(32bit 符号なし)&amp;nbsp;&lt;/div&gt;&lt;div&gt;UInt64(64bit 符号なし)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;SByte (8bit  符号あり)&amp;nbsp;&lt;/div&gt;&lt;div&gt;Int16 (16bit 符号あり)&amp;nbsp;&lt;/div&gt;&lt;div&gt;Int32 (32bit 符号あり)&amp;nbsp;&lt;/div&gt;&lt;div&gt;Int64 (64bit 符号あり)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;// 他&lt;/div&gt;&lt;div&gt;Decimal&amp;nbsp;&lt;/div&gt;&lt;div&gt;Double&amp;nbsp;&lt;/div&gt;&lt;div&gt;Boolean&amp;nbsp;&lt;/div&gt;&lt;div&gt;DateTime&amp;nbsp;&lt;/div&gt;&lt;div&gt;String&amp;nbsp;&lt;/div&gt;&lt;div&gt;Object&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;代入した際に型が自動的に決まってしまうので、数値については&amp;nbsp;&lt;/div&gt;&lt;div&gt;下記のように型を記載することで指定できる&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[Byte]$num = 255&lt;/div&gt;&lt;div&gt;参考：&lt;/div&gt;&lt;div&gt;以下によって変数の型が取得できる&lt;/div&gt;&lt;div&gt;set-psdebug -Strict&lt;/div&gt;&lt;div&gt;$str = &quot;文字列&quot;&lt;/div&gt;&lt;div&gt;Write-Host $str.GetType()&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;■型変換&lt;/div&gt;&lt;div&gt;変数 -as データ型　で変換できる&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$numstr = &quot;123&quot;&lt;/div&gt;&lt;div&gt;$num = $numstr -as [Int16]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■文字列中の変数展開&lt;/div&gt;&lt;div&gt;set-psdebug -Strict&lt;/div&gt;&lt;div&gt;$num = 123&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Write-Host &quot;`$numの値は、 $num です&quot;&lt;/div&gt;&lt;div&gt;Write-Host &quot;`$numの値は、${num}です&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;半角スペースで区切れている場合は、よいが区切れていないと変数名の切れ目が意図したところにならないので{}で囲む&lt;/div&gt;&lt;div&gt;また、$自体をエスケープするには `(バックくぉーと)を使う&lt;/div&gt;&lt;div&gt;カレントフォルダで Name列が sで始まるデータに絞り込み全列表示&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■定数&lt;/div&gt;&lt;div&gt;Set-Variable -name keisu -value 0.5 -option constant&lt;/div&gt;&lt;div&gt;$keisu = 0.6&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;amp;gt;変数 keisu は読み取り専用または定数であるため、上書きできません。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■特別な変数&lt;/div&gt;&lt;div&gt;$Args…引数が格納されている&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$True…True&lt;/div&gt;&lt;div&gt;$False…False&lt;/div&gt;&lt;div&gt;$NULL…Null&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$This…オブジェクト自身&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$Error…エラー&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■配列の初期値&lt;/div&gt;&lt;div&gt;①コンマ区切りで指定する&lt;/div&gt;&lt;div&gt;$dataList = &quot;aaa&quot;, &quot;bbb&quot;, &quot;ccc&quot;&lt;/div&gt;&lt;div&gt;Write-Host $dataList #aaa bbb ccc&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$dataList = 100, 200, 300&lt;/div&gt;&lt;div&gt;Write-Host $dataList&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$dataList = 3..5 #連続する数値を配列に指定&lt;/div&gt;&lt;div&gt;Write-Host $dataList.Count #3&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;②@()を使う&lt;/div&gt;&lt;div&gt;$dataList = (100, 200, 300)&lt;/div&gt;&lt;div&gt;Write-Host $dataList #100 200 300&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■配列の初期値(1要素の配列)&lt;/div&gt;&lt;div&gt;①@()を使う&lt;/div&gt;&lt;div&gt;$dataList = @(100)&lt;/div&gt;&lt;div&gt;Write-Host $dataList[0]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;②,とデータを指定する&lt;/div&gt;&lt;div&gt;$dataList = ,100&lt;/div&gt;&lt;div&gt;Write-Host $dataList[0] #100&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■要素を追加&lt;/div&gt;&lt;div&gt;$dataList = @(&quot;aaa&quot;, &quot;bbb&quot;, &quot;ccc&quot;)&lt;/div&gt;&lt;div&gt;$dataList += (&quot;ddd&quot;)&lt;/div&gt;&lt;div&gt;Write-Host $dataList #aaa bbb ccc ddd&lt;/div&gt;&lt;div&gt;※System.String[]では、Addではなく += で追加&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■要素を削除&lt;/div&gt;&lt;div&gt;削除したい要素以外のデータで配列を作り直す&lt;/div&gt;&lt;div&gt;$dataList = @(&quot;aaa&quot;, &quot;bbb&quot;, &quot;ccc&quot;, &quot;ddd&quot;, &quot;eee&quot;)&lt;/div&gt;&lt;div&gt;$dataList = $dataList[0..2] + $dataList[4]&lt;/div&gt;&lt;div&gt;Write-Host $dataList #aaa bbb ccc eee&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■配列の個数&lt;/div&gt;&lt;div&gt;$変数名.length … 個数　#Countを同じ&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■多次元配列&lt;/div&gt;&lt;div&gt;$data = New-Object &#39;string[,]&#39; 2,3&lt;/div&gt;&lt;div&gt;$data[0,0] = &quot;0,0&quot;&lt;/div&gt;&lt;div&gt;$data[0,1] = &quot;0,1&quot;&lt;/div&gt;&lt;div&gt;$data[0,2] = &quot;0,2&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$data[1,0] = &quot;1,0&quot;&lt;/div&gt;&lt;div&gt;$data[1,1] = &quot;1,1&quot;&lt;/div&gt;&lt;div&gt;$data[1,2] = &quot;1,2&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Write-Host $data #0,0 0,1 0,2 1,0 1,1 1,2&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■ジャグ配列&lt;/div&gt;&lt;div&gt;$data = @(@(11, 12), @(21, 22, 23))&lt;/div&gt;&lt;div&gt;Write-Host $data #11 12 21 22 23&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■算術演算子&lt;/div&gt;&lt;div&gt;+-*/%&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■比較演算子&lt;/div&gt;&lt;div&gt;-eq …等しい&lt;/div&gt;&lt;div&gt;-ne …等しくない&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-gt …より大きい&lt;/div&gt;&lt;div&gt;-ge …以上&lt;/div&gt;&lt;div&gt;-lt …より小さい&lt;/div&gt;&lt;div&gt;-le …以下&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-like …ワイルドカードに一致&lt;/div&gt;&lt;div&gt;-notlike …ワイルドカードに不一致&lt;/div&gt;&lt;div&gt;※ *…以上にマッチ ?…1文字にマッチ&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-match …正規表現に一致&lt;/div&gt;&lt;div&gt;-notmatch …正規表現に不一致&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;・文字、小文字の比較&lt;/div&gt;&lt;div&gt;Write-Host (&quot;abc&quot; -ceq &quot;ABC&quot;) #大文字小文字区別&lt;/div&gt;&lt;div&gt;Write-Host (&quot;abc&quot; -ieq &quot;ABC&quot;) #大文字小文字区別しない&lt;/div&gt;&lt;div&gt;Write-Host (&quot;abc&quot; -eq &quot;ABC&quot;)&amp;nbsp; #デフォルトは大文字小文字区別しない&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■論理演算子&lt;/div&gt;&lt;div&gt;-and&lt;/div&gt;&lt;div&gt;-or&lt;/div&gt;&lt;div&gt;-not&lt;/div&gt;&lt;div&gt;-!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■if文&lt;/div&gt;&lt;div&gt;if(条件){&lt;/div&gt;&lt;div&gt;}elseif(条件){&lt;/div&gt;&lt;div&gt;}else{&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■switch&lt;/div&gt;&lt;div&gt;switch 条件&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; 値1{}&lt;/div&gt;&lt;div&gt;&amp;nbsp; 値2{}&lt;/div&gt;&lt;div&gt;&amp;nbsp; …&lt;/div&gt;&lt;div&gt;&amp;nbsp; default{}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;※途中で抜けたいときは、break&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■for文&lt;/div&gt;&lt;div&gt;for($i = 0; $i -lt 10; $i++)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; if($i % 2 -eq 0) { continue }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; if($i -eq 9) { break }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Write-Host $i&amp;nbsp; #1 3 5 7&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■foreach&lt;/div&gt;&lt;div&gt;foreach($num in $numList){&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; write-host $num&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■while&lt;/div&gt;&lt;div&gt;while(条件){}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■コメント&lt;/div&gt;&lt;div&gt;# 1行コメント&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;amp;lt;#&lt;/div&gt;&lt;div&gt;複数行&lt;/div&gt;&lt;div&gt;コメント&lt;/div&gt;&lt;div&gt;#&amp;amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■改行、タブ&lt;/div&gt;&lt;div&gt;バッククォートをつける&lt;/div&gt;&lt;div&gt;`n&lt;/div&gt;&lt;div&gt;`t&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■関数&lt;/div&gt;&lt;div&gt;--------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;div&gt;Echo(&quot;test&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;function Echo($message){&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Write-Host $message&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;--------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;div&gt;#引数の型を定義することも可&lt;/div&gt;&lt;div&gt;function Echo([string]$message){&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Write-Host $message&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;--------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;div&gt;２つの値を足して、結果を返す場合&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;function Plus([int]$num1, [int]$num2){&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; return $num1 + $num2&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$ans = Plus 10 20&lt;/div&gt;&lt;div&gt;Write-Host $ans&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;※関数に渡した際の型がよくわからない・・・&lt;/div&gt;&lt;div&gt;後で調べる&lt;/div&gt;&lt;div&gt;※参照渡しの場合は、呼び出す側、仮引数ともに[ref]をつける&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■例外&lt;/div&gt;&lt;div&gt;&lt;div&gt;try{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; throw &quot;エラーのテスト&quot;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;catch&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Write-Host &quot;catch $_&quot;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;finally&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Write-Host &quot;finally&quot;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;■他後でまとめる&lt;/div&gt;&lt;div&gt;Get-ChildItem | Where-Object { $_.Name -Match &quot;^s&quot;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;カレントフォルダで Size列&lt;/div&gt;&lt;div&gt;Get-ChildItem | Where-Object { $_.Name -Match &quot;^s&quot;} | Select-Object Name&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;カレントフォルダ配下すべてに対し、 *.xml　に絞り、更新日時でソートし、ファイル名の古パスを１件表示&lt;/div&gt;&lt;div&gt;Get-ChildItem -Filter *.xml -Recurse&amp;nbsp; | Sort-Object LastWriteTime -Descending |&amp;nbsp; Select-Object {$_.FullName} -first 1&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/8426379089082246234/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/8426379089082246234' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/8426379089082246234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/8426379089082246234'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2024/02/powershell.html' title='PowerShellメモ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-3394305364006899086</id><published>2023-09-29T23:52:00.001+09:00</published><updated>2023-09-29T23:52:29.430+09:00</updated><title type='text'>デバッグログ</title><content type='html'>Debug.unityLogger.logEnabled = false;//ログを出力しない
Debug.unityLogger.logEnabled = true; //ログを出力する</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/3394305364006899086/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/3394305364006899086' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3394305364006899086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3394305364006899086'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2023/09/blog-post.html' title='デバッグログ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-3632562480516959552</id><published>2021-06-26T23:57:00.002+09:00</published><updated>2021-06-26T23:57:40.373+09:00</updated><title type='text'>SQLite</title><content type='html'>■テーブルがなければ作る
CREATE TABLE IF NOT EXISTS [テーブル名]~

■AUTO INCREMENT
 SQLiteとしては、おすすめしていないため、使わないとすると
CREATEテーブルで INTEGER と PRIMARY KEY を設定することで
INSERT時、何もあたいを指定しないとROWIDが設定されるとのこと

例
CREATE TABLE [Employee] (
[id] INTEGER PRIMARY KEY,
[name] TEXT NOT NULL)

INSERT INTO ([name]) VALUES(&#39;NAME1&#39;)

この場合自動的に、ROWIDのあたいを使う。
AUTO INCREMENTは、行をDELETEしてもIDを再利用しないため増える一方であるが
AUTO　INCREMENTを指定しない場合、基本的には増える一方であるが、DELETEした場合は再利用を行う点が違う。
そのため、外部キー等でいくつのIDが設定されているか知りたい時は、
SELECT last_insert_rowid() といった感じで最後にしようしたあたいが取得できる</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/3632562480516959552/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/3632562480516959552' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3632562480516959552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3632562480516959552'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2021/06/sqlite.html' title='SQLite'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-3783394014279175848</id><published>2020-03-20T16:12:00.000+09:00</published><updated>2020-03-20T16:12:31.217+09:00</updated><title type='text'>TypeScriptメモ</title><content type='html'>■クラス&lt;br /&gt;
・クラス&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;class クラス名 {}
&lt;/pre&gt;&lt;br /&gt;
・コンストラクタ&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;class クラス名{
    constructor(){
    }
}
&lt;/pre&gt;&lt;br /&gt;
・インスタンス変数&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;class クラス名{
    public 変数名: 型;
    private 変数名: 型;

    // getter
    public get 名前（） {
        return this.変数名;
    }

    // setter
    public set 名前(変数名){
        this.変数名 = 変数名
    }
}
&lt;/pre&gt;&lt;br /&gt;
public 変数名は、constructorでも設定可能&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;class クラス名{
    constructor(public 変数名: 型){} // publicをつけると public 変数名を書いたのと同じになる
}
&lt;/pre&gt;&lt;br /&gt;
・インスタンスメソッド&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;class クラス名{
    public メソッド名(){}

    private メソッド名(){}
}
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/3783394014279175848/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/3783394014279175848' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3783394014279175848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3783394014279175848'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2020/03/typescript.html' title='TypeScriptメモ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-6140317611071580927</id><published>2020-03-08T16:52:00.000+09:00</published><updated>2020-03-08T16:52:14.575+09:00</updated><title type='text'>vscodeメモ</title><content type='html'>定義に移動&lt;br /&gt;
win&lt;br /&gt;
 ctr + マウスオーバー　でクリック&lt;br /&gt;
&lt;br /&gt;
mac &lt;br /&gt;
 Option + マウスオーバーでクリック</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/6140317611071580927/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/6140317611071580927' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/6140317611071580927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/6140317611071580927'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2020/03/vscode.html' title='vscodeメモ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-3219295128436405158</id><published>2020-03-02T00:30:00.002+09:00</published><updated>2020-03-02T00:30:48.226+09:00</updated><title type='text'>トグルスイッチ</title><content type='html'>あとで眺める&lt;br /&gt;
https://www.designlabthemes.com/css-toggle-switch/</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/3219295128436405158/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/3219295128436405158' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3219295128436405158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3219295128436405158'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2020/03/blog-post.html' title='トグルスイッチ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-778687355487845660</id><published>2020-03-02T00:17:00.001+09:00</published><updated>2020-03-02T00:17:16.838+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>VSCodeでTypeScriptを軽く触る時の最低限のメモ</title><content type='html'>◆達成したいこと。&lt;br /&gt;
&lt;br /&gt;
ちょっとTypeScriptを使ってコードを書いて見たい場合に、&lt;br /&gt;
html/js/TypeScriptのいずれも保存時自動で更新するようにしたい&lt;br /&gt;
&lt;br /&gt;
◆やったこと&lt;br /&gt;
html/jsの保存時、自動更新は拡張機能のLive Serverを使用&lt;br /&gt;
TypeScriptについては以下のようにした&lt;br /&gt;
&lt;br /&gt;
VSCodeでプロジェクトのルートフォルダを開くためcodeコマンドを実行&lt;br /&gt;
$ code フォルダパス&lt;br /&gt;
&lt;br /&gt;
TypeScriptとをインストール&lt;br /&gt;
$ npm i typescript&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package.jsonを作成&lt;br /&gt;
$ npm init -y&lt;br /&gt;
&lt;br /&gt;
package.jsonにtscコマンドを指定&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;  &quot;scripts&quot;: {
    &quot;watch&quot;: &quot;tsc -w&quot;
  },
&lt;/pre&gt;&lt;br /&gt;
フォルダ構成&lt;br /&gt;
下記のようにしたいので&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;├── node_modules
├── src
│ ├─js
│ ├─ts
│ └─index.html
├── package-lock.json
├── package.json
└── tsconfig.json
&lt;/pre&gt;&lt;br /&gt;
tsconfig.jsonを作って場所を設定する&lt;br /&gt;
$ tsc --init&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;&quot;outDir&quot;: &quot;./src/js&quot;,
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
後は、Live Serverを起動した状態で、&lt;br /&gt;
$ npm run watch でtsの保存を監視してコンパイルさせるようにする&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/778687355487845660/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/778687355487845660' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/778687355487845660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/778687355487845660'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2020/03/vscodetypescript.html' title='VSCodeでTypeScriptを軽く触る時の最低限のメモ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-3836428294926253443</id><published>2020-02-09T21:53:00.000+09:00</published><updated>2020-02-09T21:53:09.955+09:00</updated><title type='text'>VSCode複数起動</title><content type='html'>見比べたくて複数起動したかったのでメモ&lt;br /&gt;
&lt;br /&gt;
mac: shift + command + n&lt;br /&gt;
win: shift + control + n</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/3836428294926253443/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/3836428294926253443' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3836428294926253443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3836428294926253443'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2020/02/vscode.html' title='VSCode複数起動'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-8800675560507265547</id><published>2020-02-09T10:56:00.000+09:00</published><updated>2020-02-09T10:57:23.820+09:00</updated><title type='text'>VSCodeでHTML書く時用のメモ</title><content type='html'>Emmet+VSCodeのショートカットのメモ&lt;br /&gt;
&lt;br /&gt;
◾️HTML5の雛形&lt;br /&gt;
! + [Tab]&lt;br /&gt;
&lt;br /&gt;
◾️次の行へ移動し空行追加&lt;br /&gt;
[Ctrl] + Enter&lt;br /&gt;
&lt;br /&gt;
◾️タグ&lt;br /&gt;
基本的にはタグ名 + Enter&lt;br /&gt;
&lt;br /&gt;
id属性は&lt;br /&gt;
タグ#id + Enter&lt;br /&gt;
&lt;br /&gt;
class属性は&lt;br /&gt;
タグ.Class + Enter&lt;br /&gt;
&lt;br /&gt;
それ以外は&lt;br /&gt;
タグ:属性 + Enter</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/8800675560507265547/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/8800675560507265547' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/8800675560507265547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/8800675560507265547'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2020/02/vscodehtml.html' title='VSCodeでHTML書く時用のメモ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-5448056856898317360</id><published>2019-03-18T00:36:00.001+09:00</published><updated>2019-03-18T00:36:42.835+09:00</updated><title type='text'>memo</title><content type='html'>@echo off&lt;br /&gt;
&lt;br /&gt;
cd /d %~dp0&lt;br /&gt;
&lt;br /&gt;
set LockFile=nolock&lt;br /&gt;
&lt;br /&gt;
:Loop&lt;br /&gt;
if exist %LockFile% (&lt;br /&gt;
    if exist %LockFile%/ (&lt;br /&gt;
        timeout /t 3 &gt; nul&lt;br /&gt;
        goto Loop&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    rem 存在する場合そのまま&lt;br /&gt;
&lt;br /&gt;
) else (&lt;br /&gt;
    echo 存在しない&lt;br /&gt;
    type nul &gt; %LockFile%&lt;br /&gt;
    timeout /t 3 &gt; nul&lt;br /&gt;
    goto Loop &lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
rem ------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
pause</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/5448056856898317360/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/5448056856898317360' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/5448056856898317360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/5448056856898317360'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2019/03/memo.html' title='memo'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-239813506172751844</id><published>2018-08-12T10:21:00.000+09:00</published><updated>2018-08-12T10:21:15.130+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="a b"/><title type='text'>test</title><content type='html'>test</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/239813506172751844/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/239813506172751844' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/239813506172751844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/239813506172751844'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2014/01/test.html' title='test'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-6334808651374353598</id><published>2018-07-07T15:05:00.000+09:00</published><updated>2018-07-07T15:05:26.129+09:00</updated><title type='text'>SQLiteのNuget</title><content type='html'>.net framework&lt;br /&gt;
System.Data.SQLite&lt;br /&gt;
&lt;br /&gt;
.net core&lt;br /&gt;
Microsoft.Data.Sqlite&lt;br /&gt;
&lt;br /&gt;
.net core でSQLite EF&lt;br /&gt;
Microsoft.EntityFrameworkCore.sqlite&lt;br /&gt;
Microsoft.EntityFrameworkCore.tools</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/6334808651374353598/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/6334808651374353598' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/6334808651374353598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/6334808651374353598'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2018/07/sqlitenuget.html' title='SQLiteのNuget'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-9060139640866994656</id><published>2018-06-10T19:33:00.000+09:00</published><updated>2018-06-10T19:33:19.356+09:00</updated><title type='text'>AOLのjoinエラー</title><content type='html'>error CS1502: The best overloaded method match for `string.Join(string, string[])&#39; has some invalid arguments /usr/lib/mono/2.0/mscorlib.dll &lt;br /&gt;
(Location of the symbol related to previous error) &lt;br /&gt;
&lt;br /&gt;
文字列でない配列をジョインするときにエラーになるので型変換が必要&lt;br /&gt;
string.Join(&quot; &quot;, (string[])data.ToArray())</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/9060139640866994656/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/9060139640866994656' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/9060139640866994656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/9060139640866994656'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2018/06/aoljoin.html' title='AOLのjoinエラー'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-8801994961936689800</id><published>2018-06-02T18:23:00.000+09:00</published><updated>2018-06-02T18:23:13.950+09:00</updated><title type='text'>onLoad と DOMContentLoadedの違いメモ</title><content type='html'>window.addEventListener(&quot;load&quot;, function(e) {&lt;br /&gt;
    alert(&quot;load&quot;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
document.addEventListener(&#39;DOMContentLoaded&#39;, function (e) {&lt;br /&gt;
    alert(&quot;DOMContentLoaded&quot;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
loadイベントは、リソースおよびその依存リソースの読み込みが終わると発生します。。&lt;br /&gt;
&lt;a href=&quot;https://developer.mozilla.org/ja/docs/Web/Reference/Events/load&quot;&gt;load&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HTMLのDOMツリーを解析完了した時点で発生する&lt;br /&gt;
&lt;a href=&quot;https://developer.mozilla.org/ja/docs/Web/Reference/Events/DOMContentLoaded&quot;&gt;DOMContentLoaded&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/8801994961936689800/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/8801994961936689800' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/8801994961936689800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/8801994961936689800'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2018/06/onload-domcontentloaded.html' title='onLoad と DOMContentLoadedの違いメモ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-4816877219537698556</id><published>2018-03-25T13:08:00.002+09:00</published><updated>2018-03-25T13:08:48.997+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="azure"/><title type='text'>App Serviceにフォルダ追加</title><content type='html'>App ServiceでImageディレクトリ配下に作ったディレクトリがデプロイで作られないようなので…&lt;br /&gt;
直接作成&lt;br /&gt;
&lt;br /&gt;
azureにログイン&lt;br /&gt;
該当のApp Serviceを選択&lt;br /&gt;
App Service Editorを選択&lt;br /&gt;
（右画面に　移動→　が出るので選択）&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTBIgJSPg7yUi2SoVI_Kb9t6EUyYAlh1S15pkftHN3OEwwVmOHFSG7YSnFFFGbFjYO8-2Fd_e0Mfpb5awYeN2UFN64e0ZKrJZ4NPSBIPBZwaG0mX5Gt2nDm-NTWGhHpGbpJFzy7VFj0-g/s1600/20180325a.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTBIgJSPg7yUi2SoVI_Kb9t6EUyYAlh1S15pkftHN3OEwwVmOHFSG7YSnFFFGbFjYO8-2Fd_e0Mfpb5awYeN2UFN64e0ZKrJZ4NPSBIPBZwaG0mX5Gt2nDm-NTWGhHpGbpJFzy7VFj0-g/s320/20180325a.png&quot; width=&quot;320&quot; height=&quot;121&quot; data-original-width=&quot;800&quot; data-original-height=&quot;302&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
下記画面が開くので該当ディレクトリを選択して右クリックで追加できます&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXG3_a50TRELcrG5MC1zvcAfYrMU9O44M9VGZXoZMw_kOErhyphenhyphen60MRH2B8DmIEM25FmaP1dJtwVva5xwkZPo4E-pkGZxK1n3FktxfE6dDUFUMT1raPKHDdjohJPg_JLvc-0-CNY_ZZSLEU/s1600/20180325b.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXG3_a50TRELcrG5MC1zvcAfYrMU9O44M9VGZXoZMw_kOErhyphenhyphen60MRH2B8DmIEM25FmaP1dJtwVva5xwkZPo4E-pkGZxK1n3FktxfE6dDUFUMT1raPKHDdjohJPg_JLvc-0-CNY_ZZSLEU/s320/20180325b.png&quot; width=&quot;209&quot; height=&quot;320&quot; data-original-width=&quot;255&quot; data-original-height=&quot;390&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/4816877219537698556/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/4816877219537698556' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/4816877219537698556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/4816877219537698556'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2018/03/app-service.html' title='App Serviceにフォルダ追加'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTBIgJSPg7yUi2SoVI_Kb9t6EUyYAlh1S15pkftHN3OEwwVmOHFSG7YSnFFFGbFjYO8-2Fd_e0Mfpb5awYeN2UFN64e0ZKrJZ4NPSBIPBZwaG0mX5Gt2nDm-NTWGhHpGbpJFzy7VFj0-g/s72-c/20180325a.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-1980211186315032681</id><published>2018-03-23T21:14:00.000+09:00</published><updated>2018-03-24T14:43:40.849+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>スクリプトを用いたデータの出力</title><content type='html'>Microsoft SQL Server Management Studioで該当データベースを選択して右クリック&lt;br /&gt;
&lt;br /&gt;
スクリプトの生成　を選択&lt;br /&gt;
&lt;br /&gt;
□説明画面&lt;br /&gt;
次へ&lt;br /&gt;
&lt;br /&gt;
□オブジェクトの選択&lt;br /&gt;
特定のデータベースオブジェクトを選択&lt;br /&gt;
出力対象のテーブルを選択&lt;br /&gt;
次へ&lt;br /&gt;
&lt;br /&gt;
□スクリプト作成オプションの設定&lt;br /&gt;
詳細設定-&gt;スクリプトを作成するデータの種類：データのみ-&gt;OK&lt;br /&gt;
次へ&lt;br /&gt;
&lt;br /&gt;
□概要&lt;br /&gt;
次へ&lt;br /&gt;
&lt;br /&gt;
出力される</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/1980211186315032681/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/1980211186315032681' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/1980211186315032681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/1980211186315032681'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2018/03/blog-post.html' title='スクリプトを用いたデータの出力'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-3558595081794740389</id><published>2018-02-25T12:44:00.003+09:00</published><updated>2018-02-25T12:44:55.427+09:00</updated><title type='text'>Visual Studio ブラウザの追加</title><content type='html'>ASP.NET開発時に開くブラウザの追加。&lt;br /&gt;
Google Chromeのシークレットを追加する。&lt;br /&gt;
&lt;br /&gt;
ブラウザの一覧から、ブラウザーの選択を開く&lt;br /&gt;
追加から&lt;br /&gt;
&lt;br /&gt;
プログラム：&lt;br /&gt;
C:\Users\[User名]\AppData\Local\Google\Chrome\Application\chrome.exe&lt;br /&gt;
&lt;br /&gt;
引数：&lt;br /&gt;
--incognito&lt;br /&gt;
&lt;br /&gt;
名前：&lt;br /&gt;
適当につける&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFbxz2UpXnDzgE-J5TYxw59WfiddiPeinb5iccpkqKY84FyQ3VMttrVoJLV92KxAeoU8a0B6VEIeptJR9k_3FJpVSCbMrlnDlkeSr3ZjD-AbEhSJpFnuSr71hOza4kUKGeTDQVdhNfWZw/s1600/20180225a.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFbxz2UpXnDzgE-J5TYxw59WfiddiPeinb5iccpkqKY84FyQ3VMttrVoJLV92KxAeoU8a0B6VEIeptJR9k_3FJpVSCbMrlnDlkeSr3ZjD-AbEhSJpFnuSr71hOza4kUKGeTDQVdhNfWZw/s320/20180225a.png&quot; width=&quot;320&quot; height=&quot;155&quot; data-original-width=&quot;410&quot; data-original-height=&quot;198&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/3558595081794740389/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/3558595081794740389' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3558595081794740389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3558595081794740389'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2018/02/visual-studio.html' title='Visual Studio ブラウザの追加'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFbxz2UpXnDzgE-J5TYxw59WfiddiPeinb5iccpkqKY84FyQ3VMttrVoJLV92KxAeoU8a0B6VEIeptJR9k_3FJpVSCbMrlnDlkeSr3ZjD-AbEhSJpFnuSr71hOza4kUKGeTDQVdhNfWZw/s72-c/20180225a.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-6879928557597224638</id><published>2017-12-19T06:17:00.001+09:00</published><updated>2017-12-19T06:17:10.529+09:00</updated><title type='text'>DebugModule.bas</title><content type='html'>&lt;pre class=&quot;brush: vb&quot;&gt;Option Explicit
Private Indent          As Integer
Private Prefix          As String
Private FH              As Object
Private FlagNotime          As Boolean
Private FlagDebugPrint  As Boolean

Private Declare Sub Sleep Lib &quot;Kernel32&quot; (ByVal dwMilliseconds As Long)
Sub DebugPrint(ByVal VarName As Variant, Optional ByVal Filename As String = &quot;Debug.txt&quot;, _
               Optional ByVal TypeNameFlag As Boolean = False, Optional ByVal IndentCount As Integer = 4, _
               Optional NotimeFlag As Boolean = False, Optional DebugPrintFlag As Boolean = False)
    &#39;必須：
    &#39;VarName: データ構造を知りたい変数名を指定
    
    &#39;オプション：
    &#39;Indentcount: 配列、コレクション、Dictionaryなどネストして表示されるデータの全角スペースの数
    &#39;TypeNameFlag:全ての型を表示したい時にTrue
    &#39;----------------------------------------------------------------------------------------------
    
    &#39;再帰呼出で、トップの時⇒追記状態でファイルオープンしておく
    If Indent = 0 Then
        FlagNotime = NotimeFlag
        FlagDebugPrint = DebugPrintFlag
        If Not FlagDebugPrint Then Call FileOpen(Filename)
    End If
    
    
    Dim i As Long
    Dim key As Variant
    If TypeName(VarName) = &quot;Byte&quot; Or TypeName(VarName) = &quot;Integer&quot; Or _
       TypeName(VarName) = &quot;Long&quot; Or TypeName(VarName) = &quot;String&quot; Or _
       TypeName(VarName) = &quot;Single&quot; Or TypeName(VarName) = &quot;Double&quot; Or _
       TypeName(VarName) = &quot;Currency&quot; Or TypeName(VarName) = &quot;Date&quot; Or _
       TypeName(VarName) = &quot;Boolean&quot; Or TypeName(VarName) = &quot;Boolean&quot; Then
        
        Call Output(TypeName(VarName), IndentCount, TypeNameFlag, VarName)

    ElseIf TypeName(VarName) = &quot;Empty&quot; Or TypeName(VarName) = &quot;Null&quot; Or _
           TypeName(VarName) = &quot;Nothing&quot; Or TypeName(VarName) = &quot;Unknown&quot; Then
        
        Call Output(TypeName(VarName), IndentCount, TypeNameFlag)
        
    ElseIf 0 &lt; InStr(TypeName(VarName), &quot;()&quot;) Then
        &#39;2次元配列まで対応！3次元以上はNG!
        Dim temp As Integer, Dimension As Integer
        On Error Resume Next
        temp = UBound(VarName, 3)
        If Err.Number = 0 Then
            MsgBox &quot;配列は3次元配列以上は未対応です&quot;
            End
        End If
        
        Err.Clear
        temp = UBound(VarName, 2)
        Dimension = IIf(Err.Number = 0, 2, 1)
        On Error GoTo 0
        
        
        Call Output(TypeName(VarName), IndentCount, TypeNameFlag)
        
        &#39;1次元配列か2次元配列かで処理を分岐
        Indent = Indent + 1
        If Dimension = 1 Then
        &#39;1次元配列の処理
            For i = 0 To UBound(VarName)
                Prefix = &quot;(&quot; &amp; i &amp; &quot;): &quot;
                Call DebugPrint(VarName(i), IndentCount, TypeNameFlag)
            Next
            
        ElseIf Dimension = 2 Then
        &#39;2次元配列の処理
            Dim ii As Long
            For i = 0 To UBound(VarName, 1)
                For ii = 0 To UBound(VarName, 2)
                    Prefix = &quot;(&quot; &amp; i &amp; &quot;,&quot; &amp; ii &amp; &quot;): &quot;
                    Call DebugPrint(VarName(i, ii), IndentCount, TypeNameFlag)
                Next
            Next
        End If
        Indent = Indent - 1
    ElseIf TypeName(VarName) = &quot;Collection&quot; Then

        Call Output(TypeName(VarName), IndentCount, TypeNameFlag)
        
        Indent = Indent + 1
        For i = 1 To VarName.Count
            Prefix = i &amp; &quot;:&quot;
            Call DebugPrint(VarName.Item(i), IndentCount, TypeNameFlag)
        Next
        Indent = Indent - 1
    
    ElseIf TypeName(VarName) = &quot;Dictionary&quot; Then

        Call Output(TypeName(VarName), IndentCount, TypeNameFlag)
        
        Indent = Indent + 1
        For Each key In VarName
            Prefix = &quot;[&quot; &amp; TypeName(key) &amp; &quot;]&quot; &amp; key &amp; &quot; =&gt; &quot;
            Call DebugPrint(VarName.Item(key), IndentCount, TypeNameFlag)
        Next
        Indent = Indent - 1
        
    End If
     
    &#39;再帰呼出で、トップの時⇒追記状態でファイルオープンしておく
    If Indent = 0 And Not FlagDebugPrint Then Call FileClose
End Sub

Sub Output(ByVal TypeVarName As String, ByVal IndentCount As Integer, ByVal TypeNameFlag As Boolean, Optional ByVal VarName As Variant = &quot;&quot;)
    If IndentCount &lt; 0 Then IndentCount = 0
    
    Dim OutPutData As String
    If TypeNameFlag Then
        OutPutData = String(Indent * IndentCount, &quot; &quot;) &amp; Prefix &amp; &quot;[&quot; &amp; TypeVarName &amp; &quot;]&quot; &amp; VarName &amp; vbCrLf
            
        If FlagDebugPrint Then
            Debug.Print Replace(OutPutData, vbCrLf, &quot;&quot;) &#39;改行ははずす
        Else
            FH.Write OutPutData
        End If
    Else
        If 0 &lt; InStrRev(Prefix, &quot;]&quot;) Then
            Prefix = Right(Prefix, Len(Prefix) - InStrRev(Prefix, &quot;]&quot;))
        End If
        
        If 0 &lt; InStr(TypeVarName, &quot;()&quot;) Or TypeVarName = &quot;Collection&quot; Or TypeVarName = &quot;Dictionary&quot; Then
            OutPutData = String(Indent * IndentCount, &quot; &quot;) &amp; Prefix &amp; &quot;[&quot; &amp; TypeVarName &amp; &quot;]&quot; &amp; VarName &amp; vbCrLf
            
            If FlagDebugPrint Then
                Debug.Print Replace(OutPutData, vbCrLf, &quot;&quot;) &#39;改行ははずす
            Else
                FH.Write OutPutData
            End If
        Else
            OutPutData = String(Indent * IndentCount, &quot; &quot;) &amp; Prefix &amp; VarName &amp; vbCrLf
            
            If FlagDebugPrint Then
                Debug.Print Replace(OutPutData, vbCrLf, &quot;&quot;) &#39;改行ははずす
            Else
                FH.Write OutPutData
            End If
        End If
    End If
    
    Prefix = &quot;&quot;
End Sub


Private Sub FileOpen(ByVal Filename As String)
    &#39;.txtが省略されていたら追加する
    If 0 = InStr(Filename, &quot;.txt&quot;) Then Filename = Filename &amp; &quot;.txt&quot;
    
    Dim FSO As Object, FilePath As String
    Set FSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
    

    If FlagNotime Then
        FilePath = ThisWorkbook.Path &amp; &quot;\&quot; &amp; Filename
        Set FH = FSO.OPenTextFile(FilePath, 2, True)
    Else
        FilePath = ThisWorkbook.Path &amp; &quot;\(&quot; &amp; Replace(Time, &quot;:&quot;, &quot;&quot;) &amp; &quot;)&quot; &amp; Filename
        Set FH = FSO.OPenTextFile(FilePath, 8, True)
    End If
    
    Set FSO = Nothing
End Sub

Private Sub FileClose()
    FH.Close
    Set FH = Nothing
    
    Sleep (1000) &#39;同名ファイルに出力されるのを避けるため、１秒時間をおいている
End Sub


&#39;■SampleCode
Private Sub SampleCode1()
    &#39;Dummyデータ
    Dim varString   As String:   varString = &quot;文字列&quot;
    Dim varInteger  As Integer:  varInteger = 3
    Dim varLong     As Long:     varLong = 3
    Dim varDouble   As Double:   varDouble = 3.5
    Dim varBoolean  As Boolean:  varBoolean = True

    &#39;■配列データの出力を行います
    Dim varArray(2) As Variant
        varArray(0) = varString
        varArray(1) = varInteger
        varArray(2) = varBoolean
    
    &#39;※引数にデータ構造を見たい変数名を指定します
    &#39;実行Excelファイルと同階層に (時間)Debug.txt として出力されます
    Call DebugPrint(varArray)
    &#39;-----------------------------
    &#39;[Variant()]
    &#39;　　(0): 文字列
    &#39;　　(1): 3
    &#39;　　(2): True
    &#39;-----------------------------
End Sub

Private Sub SampleCode2()
    &#39;Dummyデータ
    Dim varString   As String:   varString = &quot;文字列&quot;
    Dim varInteger  As Integer:  varInteger = 3
    Dim varLong     As Long:     varLong = 3
    Dim varDouble   As Double:   varDouble = 3.5
    Dim varBoolean  As Boolean:  varBoolean = True

    Dim varArray(2) As Variant
        varArray(0) = varString
        varArray(1) = varInteger
        varArray(2) = varBoolean
    
    &#39;■Dictionaryの出力を行います
    Dim varDic As Object
    Set varDic = CreateObject(&quot;Scripting.Dictionary&quot;)
    varDic.Add &quot;配列1&quot;, varArray
    varDic.Add &quot;配列2&quot;, Array(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    
    &#39;※引数にデータ構造を見たい変数名を指定します
    &#39;実行Excelファイルと同階層に (時間)Debug.txt として出力されます
    Call DebugPrint(varDic)
    &#39;-----------------------------
    &#39;※ファイルの出力結果
    &#39;[Dictionary]
    &#39;配列1 =&gt; [Variant()]
    &#39;　　(0): 文字列
    &#39;　　(1): 3
    &#39;　　(2): True
    &#39;配列2 =&gt; [Variant()]
    &#39;　　(0): a
    &#39;　　(1): b
    &#39;　　(2): c
    &#39;-----------------------------
    
    &#39;対応している変数形式は
    &#39;String/Integer/Long/Single/Double/Currency/Date/Boolean/Byte/Variant
    &#39;上記を用いた、Collection/Dictionary/配列(2次元配列まで)
End Sub

Private Sub SampleCode3()
    &#39;Dummyデータ
    Dim varString   As String:   varString = &quot;文字列&quot;
    Dim varInteger  As Integer:  varInteger = 3
    Dim varLong     As Long:     varLong = 3
    Dim varDouble   As Double:   varDouble = 3.5
    Dim varBoolean  As Boolean:  varBoolean = True

    Dim varArray(2) As Variant
        varArray(0) = varString
        varArray(1) = varInteger
        varArray(2) = varBoolean
    
    Dim varDic As Object
    Set varDic = CreateObject(&quot;Scripting.Dictionary&quot;)
    varDic.Add &quot;配列1&quot;, varArray
    varDic.Add &quot;配列2&quot;, Array(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    
    
    &#39;Q And A
    &#39;■複数出力したとき、何の変数を出力したものか判断がつきにくい！
    &#39;　なんとかしてほしい
    &#39;　⇒Filenameオプションにファイル名を指定してください
    Call DebugPrint(varArray, Filename:=&quot;Array.txt&quot;)
    Call DebugPrint(varDic, Filename:=&quot;Dictionary&quot;) &#39;拡張子は書かなくても自動的.txtになります
End Sub


Private Sub SampleCode4()
    &#39;Dummyデータ
    Dim varString   As String:   varString = &quot;文字列&quot;
    Dim varInteger  As Integer:  varInteger = 3
    Dim varLong     As Long:     varLong = 3
    Dim varDouble   As Double:   varDouble = 3.5
    Dim varBoolean  As Boolean:  varBoolean = True

    Dim varArray(2) As Variant
        varArray(0) = varString
        varArray(1) = varInteger
        varArray(2) = varBoolean
    
    Dim varDic As Object
    Set varDic = CreateObject(&quot;Scripting.Dictionary&quot;)
    varDic.Add &quot;配列1&quot;, varArray
    varDic.Add &quot;配列2&quot;, Array(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    
    
    &#39;Q And A
    &#39;■複数出力なんてしません！なのでファイル名に時間をつけて複数出力するのはやめてくれますか？
    &#39;　何度も何度も消すのがめんどくさい。ゴミ箱がひどいことになる・・・
    &#39;　⇒NotimeFlagオプションをTrueにしてください
    Call DebugPrint(varDic, Filename:=&quot;上書きテスト&quot;)
    Call DebugPrint(varDic, Filename:=&quot;上書きテスト&quot;) &#39;通常だと(時間)上書きテスト.txt が時間ごとに作られる
    Call DebugPrint(varDic, Filename:=&quot;上書きテスト&quot;, NotimeFlag:=True)
    Call DebugPrint(varDic, Filename:=&quot;上書きテスト&quot;, NotimeFlag:=True)
    Call DebugPrint(varDic, Filename:=&quot;上書きテスト&quot;, NotimeFlag:=True) &#39;上書きテスト.txt が一つだけ作られる(一番最後に実行したものだけが残る)
End Sub

Private Sub SampleCode5()
    &#39;Dummyデータ
    Dim varString   As String:   varString = &quot;文字列&quot;
    Dim varInteger  As Integer:  varInteger = 3
    Dim varLong     As Long:     varLong = 3
    Dim varDouble   As Double:   varDouble = 3.5
    Dim varBoolean  As Boolean:  varBoolean = True

    Dim varArray(2) As Variant
        varArray(0) = varString
        varArray(1) = varInteger
        varArray(2) = varBoolean
    
    Dim varDic As Object
    Set varDic = CreateObject(&quot;Scripting.Dictionary&quot;)
    varDic.Add &quot;配列1&quot;, varArray
    varDic.Add &quot;配列2&quot;, Array(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    
    &#39;Q And A
    &#39;■配列/Collection/Dictionaryでインデントされて出力
    &#39;　されますが、あの幅が好みじゃない・・・。
    &#39;　⇒IndentCountオプションを指定してください
    Call DebugPrint(varDic, IndentCount:=5)
    
    &#39;-----------------------------
    &#39;※ファイルの出力結果
    &#39;[Dictionary]
    &#39;　　　　　配列1 =&gt; [Variant()]
    &#39;　　　　　　　　　　(0): 文字列
    &#39;　　　　　　　　　　(1): 3
    &#39;　　　　　　　　　　(2): True
    &#39;　　　　　配列2 =&gt; [Variant()]
    &#39;　　　　　　　　　　(0): a
    &#39;　　　　　　　　　　(1): b
    &#39;　　　　　　　　　　(2): c
    &#39;-----------------------------
End Sub

Private Sub SampleCode6()
    &#39;Dummyデータ
    Dim varString   As String:   varString = &quot;文字列&quot;
    Dim varInteger  As Integer:  varInteger = 3
    Dim varLong     As Long:     varLong = 3
    Dim varDouble   As Double:   varDouble = 3.5
    Dim varBoolean  As Boolean:  varBoolean = True

    Dim varArray(2) As Variant
        varArray(0) = varString
        varArray(1) = varInteger
        varArray(2) = varBoolean
    
    Dim varDic As Object
    Set varDic = CreateObject(&quot;Scripting.Dictionary&quot;)
    varDic.Add &quot;配列1&quot;, varArray
    varDic.Add &quot;配列2&quot;, Array(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    
    
    &#39;Q And A
    &#39;■データの型式を全てみたいです
    &#39;　⇒TypeNameFlagオプションをTrueにしてください
    Call DebugPrint(varDic, TypeNameFlag:=True)
    
    &#39;-----------------------------
    &#39;※ファイルの出力結果
    &#39;[Dictionary]
    &#39;[String] 配列1 &gt;= [Variant()]
    &#39;　　(0): [String]文字列
    &#39;　　(1): [Integer]3
    &#39;　　(2): [Boolean]True
    &#39;[String] 配列2 &gt;= [Variant()]
    &#39;　　(0): [String]a
    &#39;　　(1): [String]b
    &#39;　　(2): [String]c
    &#39;-----------------------------
End Sub

Private Sub SampleCode7()
    &#39;Dummyデータ
    Dim varString   As String:   varString = &quot;文字列&quot;
    Dim varInteger  As Integer:  varInteger = 3
    Dim varLong     As Long:     varLong = 3
    Dim varDouble   As Double:   varDouble = 3.5
    Dim varBoolean  As Boolean:  varBoolean = True

    Dim varArray(2) As Variant
        varArray(0) = varString
        varArray(1) = varInteger
        varArray(2) = varBoolean
    
    Dim varDic As Object
    Set varDic = CreateObject(&quot;Scripting.Dictionary&quot;)
    varDic.Add &quot;配列1&quot;, varArray
    varDic.Add &quot;配列2&quot;, Array(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    
    
    &#39;Q And A
    &#39;■ファイルじゃなくイミディエイトウィンドウにだしてよ
    &#39;　⇒DebugPrintFlagをTrueにしてください
    Call DebugPrint(varDic, DebugPrintFlag:=True)
    
End Sub
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/6879928557597224638/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/6879928557597224638' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/6879928557597224638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/6879928557597224638'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2017/12/debugmodulebas.html' title='DebugModule.bas'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-6720959358862396669</id><published>2017-12-19T06:16:00.000+09:00</published><updated>2017-12-19T06:16:04.273+09:00</updated><title type='text'>xmlObj.cls</title><content type='html'>&lt;pre class=&quot;brush: vb&quot;&gt;Option Explicit

Dim xmlObj      As Object
Dim xmlAttr     As Object
Dim xmlNode     As Object
Dim xmlString   As String

Private Sub Class_Initialize()

    Set xmlObj = CreateObject(&quot;MSXML2.DOMDocument&quot;)
    xmlObj.async = False
    xmlObj.setProperty &quot;SelectionLanguage&quot;, &quot;XPath&quot;
    
    xmlObj.appendChild xmlObj.createProcessingInstruction(&quot;xml&quot;, &quot;version=&#39;1.0&#39; encoding=&#39;UTF-8&#39;&quot;)
End Sub

Private Sub Class_Terminate()
    Set xmlObj = Nothing
End Sub

Public Sub XMLin(ByVal data As Variant)
    
    If TypeName(data) = &quot;String&quot; Then
        Call FileLoad(data)
        
    ElseIf TypeName(data) = &quot;Dictionary&quot; Then
        Call judgeTypeName(data)
        
    Else
        Call Die(&quot;XMLinメソッドは、String型またはDictionary型のみを取ることができます&quot; &amp; vbCrLf &amp; _
                 &quot;引数の型：&quot; &amp; TypeName(data))
    End If
    
End Sub

Public Sub XMLout(ByVal FilePath As String)
    xmlObj.Save FilePath
End Sub

Public Function XPath(ByVal strXPath As String)
    
    &#39;xmlの文字列をロードする
    xmlObj.loadXML xmlString
    
    Set XPath = xmlObj.documentElement.selectNodes(strXPath)
    
End Function


Private Sub FileLoad(ByVal FilePath As Variant)
    
    Dim FH  As Object
    Dim FSO As Object
    
    Set FSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
    
    xmlString = &quot;&quot;
    
    If Not FSO.FileExists(FilePath) Then Call Die(&quot;FileLoadメソッド：ファイルは存在しません&quot; &amp; vbCrLf &amp; &quot;FilePath:&quot; &amp; FilePath)
    
    Set FH = FSO.OPenTextFile(FilePath, 1)
    
    Do While Not FH.AtEndOfStream
        xmlString = xmlString &amp; FH.ReadLine
    
    Loop
    
    FH.Close
    
    Set FH = Nothing
    Set FSO = Nothing
    
End Sub

Private Sub judgeTypeName(ByRef data As Variant)
    
    Dim counter As Long
    Dim key     As Variant
    
    &#39;キーに属性を含んでいる場合を高所して先に属性の登録を行う
    Call AddAttributeNode(data)
    
    
    For Each key In data
        counter = counter + 1
        
        If AddXmlNode(key) Then GoTo NextForLoop

        
        If TypeName(key) = &quot;Dictionary&quot; Then
            Call judgeTypeName(key)
            If counter = data.Count Then _
                Set xmlNode = xmlNode.parentNode
            
        ElseIf TypeName(data(key)) = &quot;Collection&quot; Then
            Call judgeTypeName(data(key))
                
        ElseIf TypeName(data(key)) = &quot;Dictionary&quot; Then
            Call judgeTypeName(data(key))
            
            If counter = data.Count Then _
                Set xmlNode = xmlNode.parentNode
            
        ElseIf TypeName(data(key)) = &quot;String&quot; Then
            Call AddChildText(data(key))
        
        Else
            Call Die(&quot;judgeTypeNameメソッドエラー：&quot;)
            Debug.Print &quot;&quot;
        
        End If
        
NextForLoop:
    Next
    
End Sub

Private Sub AddChildText(ByVal ChildText As String)
    &#39;子要素にテキストを追加
    Set xmlNode = xmlNode.appendChild(xmlObj.createTextNode(ChildText))
    Set xmlNode = xmlNode.parentNode
    Set xmlNode = xmlNode.parentNode
    
End Sub


Private Sub AddAttributeNode(ByRef data As Variant)
    
    Dim key As Variant
    
    &#39;子要素をぶら下げた後に属性処理をすると意図したところと違うところに属性がつくので
    &#39;最初にキーを走査して属性を探しあれば親要素に属性を追加する
    For Each key In data
    
        If TypeName(key) &lt;&gt; &quot;String&quot; Then GoTo NextForEach
        If key = &quot;@&quot; Then
            Call Die(&quot;AddAttributeNodeメソッドエラー：属性名がありません&quot;)
            
        ElseIf Left(key, 1) = &quot;@&quot; Then
            Set xmlAttr = xmlNode.Attributes.setNamedItem(xmlObj.createAttribute(Mid(key, 2, Len(key))))
            xmlAttr.nodeValue = data(key)
        End If

NextForEach:
    Next
    
End Sub

Private Function AddXmlNode(ByRef key As Variant)
    
    If TypeName(key) &lt;&gt; &quot;String&quot; Then
        Exit Function
    
    ElseIf key = &quot;&quot; Then
        Exit Function
    
    End If
    
    
    &#39;キーを処理する
    If xmlNode Is Nothing Then
    &#39;Nothingの時は初なのでルートとして指定
        Set xmlNode = xmlObj.appendChild(xmlObj.CreateElement(key))
    
    Else
    &#39;親要素以外の処理
        If Left(key, 1) &lt;&gt; &quot;@&quot; Then
        &#39;@で始まらない時は、子要素として登録。 False(0)を返す
            Set xmlNode = xmlNode.appendChild(xmlObj.CreateElement(key))
            AddXmlNode = 0
            
       Else
       &#39;@で始まる時は、True(1)を返す
            AddXmlNode = 1
       
       End If
       
    End If
    
End Function

Private Sub Die(ByVal msg As String)
    MsgBox &quot;下記理由により終了します&quot; &amp; vbCrLf &amp; _
           msg
    End
End Sub
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/6720959358862396669/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/6720959358862396669' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/6720959358862396669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/6720959358862396669'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2017/12/xmlobjcls.html' title='xmlObj.cls'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-3753016240095617896</id><published>2017-12-19T06:13:00.002+09:00</published><updated>2018-02-25T12:36:53.319+09:00</updated><title type='text'>Logger</title><content type='html'>&lt;pre class=&quot;brush: vb&quot;&gt;Option Explicit

Dim data()              As String
Dim DataCellObj         As Object
Dim DataSheetObj        As Object
Dim x                   As Long
Dim y                   As Long
Dim DelColumn           As Long
Dim FlagTransposeError  As Boolean

&#39;Setter/Getter
Public Property Let DeleteColumn(ByVal Num As Long)
DelColumn = Num
End Property

Public Property Get DeleteColumn() As Long
DeleteColumn = DelColumn
End Property


Private Sub Class_Initialize()

&#39;初期化
x = -1
y = -1

End Sub

Public Sub BorderLine(Optional ByVal Sht As Worksheet, Optional ByVal Cell As String, _
Optional ByVal LineStyle As Integer = xlContinuous, _
Optional Weight As Integer = xlThin, _
Optional ColorIndex As Integer = xlAutomatic)

Dim BaseRow     As Long
Dim BaseCol     As Long
Dim RangeObj    As Object

If Not Sht Is Nothing Then Set DataSheetObj = Sht
If DataCellObj Is Nothing Then Call Die(&quot;Sheetobjが設定されていません&quot;)

If Cell &lt;&gt; &quot;&quot; Then Set DataCellObj = DataSheetObj.Range(Cell)
If DataCellObj Is Nothing Then Call Die(&quot;開始のセル情報がありません&quot;)

&#39;初期値のままだと出力できないので終了する
If y &lt; 0 Then Exit Sub
    
    BaseRow = DataCellObj.Row
    BaseCol = DataCellObj.Column
    
    Set RangeObj = DataSheetObj.Range(DataSheetObj.Cells(BaseRow, BaseCol), DataSheetObj.Cells(BaseRow + y, BaseCol + x))
    
    RangeObj.Borders(xlEdgeLeft).LineStyle = LineStyle
    RangeObj.Borders(xlEdgeLeft).Weight = Weight
    RangeObj.Borders(xlEdgeLeft).ColorIndex = ColorIndex

    RangeObj.Borders(xlEdgeTop).LineStyle = LineStyle
    RangeObj.Borders(xlEdgeTop).Weight = Weight
    RangeObj.Borders(xlEdgeTop).ColorIndex = ColorIndex
    
    RangeObj.Borders(xlEdgeBottom).LineStyle = LineStyle
    RangeObj.Borders(xlEdgeBottom).Weight = Weight
    RangeObj.Borders(xlEdgeBottom).ColorIndex = ColorIndex
    
    RangeObj.Borders(xlEdgeRight).LineStyle = LineStyle
    RangeObj.Borders(xlEdgeRight).Weight = Weight
    RangeObj.Borders(xlEdgeRight).ColorIndex = ColorIndex
    
    If 0 &lt; x Then
        RangeObj.Borders(xlInsideVertical).LineStyle = LineStyle
        RangeObj.Borders(xlInsideVertical).Weight = Weight
        RangeObj.Borders(xlInsideVertical).ColorIndex = ColorIndex
    End If
    
    If 0 &lt; y Then
        RangeObj.Borders(xlInsideHorizontal).LineStyle = LineStyle
        RangeObj.Borders(xlInsideHorizontal).Weight = Weight
        RangeObj.Borders(xlInsideHorizontal).ColorIndex = ColorIndex
    End If

End Sub

Public Function Count()
    
    If x = -1 And y = -1 Then
    
        Count = 0
    
    Else
    
        &#39;要素数を返す
        Count = UBound(data, 2) + 1

    End If
End Function

Public Function Item(ByVal a As Long, ByVal B As Long, Optional ByVal Str As Variant)

    &#39;引数なし
    If IsMissing(Str) Then
    
        Item = data(a, B)
        
    &#39;引数あり
    Else
    
        data(a, B) = Str
    
    End If

End Function

Public Function Join(ByVal Ele02 As Long, ByVal delimiter As String)
    Dim i    As Long
    Dim temp As String
    
    For i = 0 To UBound(data, 1)
        temp = temp &amp; data(i, Ele02) &amp; IIf(i = UBound(data, 1), &quot;&quot;, delimiter)
    Next

    Join = temp
End Function

Public Function Last()

    &#39;最終要素を返す
    Last = UBound(data, 2)

End Function

Private Function TransposeData()
    Dim S        As Long
    Dim t        As Long
    Dim TPData() As String
    ReDim TPData(y, x)
    
    For S = 0 To y
        For t = 0 To x
            TPData(S, t) = data(t, S)
        Next
    Next
    
    TransposeData = TPData
End Function

Public Function Value() As String()

    &#39;２次元配列自体を返す
    Value = data()

End Function

Public Sub Add(ByRef list As Variant)
    Dim i As Long
    
    &#39;１次元の要素数が確定していない時、要素数の調査をおこなう
    If x = -1 Then
        
        If TypeName(list) = &quot;Variant()&quot; Or TypeName(list) = &quot;String()&quot; Then
            
            x = UBound(list)
        
        Else
            
            x = 0
        
        End If
    
    End If
    
    
    &#39;要素数の再定義
    y = y + 1
    ReDim Preserve data(x, y)
    
    If TypeName(list) = &quot;Variant()&quot; Or TypeName(list) = &quot;String()&quot; Then
        
        For i = 0 To x
        
            &#39;要素数が足りないときは、空文字を指定
            On Error Resume Next
            
            data(i, y) = list(i)
            
            &#39;Transpose関数は255文字を越えたデータを受け取るとエラーとなるので判定する
            If 255 &lt; Len(list(i)) Then FlagTransposeError = True
            
            On Error GoTo 0
        
        Next
        
    Else
    
        data(x, y) = list
    
        &#39;Transpose関数は255文字を越えたデータを受け取るとエラーとなるので判定する
        If 255 &lt; Len(list) Then FlagTransposeError = True
    
    End If

End Sub

Public Sub Clear()
    
    &#39;初期化
    Erase data
    
    DelColumn = -1
    
    x = -1
    y = -1
    
    FlagTransposeError = False

End Sub

Private Sub Die(ByVal msg As String)
    
    MsgBox &quot;下記理由により終了します&quot; &amp; vbCrLf &amp; msg
    End

End Sub

Public Function Output(ByVal Sht As Worksheet, ByVal Cell As String, Optional ByVal KeyIndexNumber As Long = -1)
    Dim BaseRow As Long
    Dim BaseCol As Long
    
    &#39;JuuFukuチェック用の引数が指定されていたらチェックする
    If -1 &lt; KeyIndexNumber Then
        
        Call OverLapCheck(KeyIndexNumber)
                     
    End If
    
    BaseRow = Sht.Range(Cell).Row
    BaseCol = Sht.Range(Cell).Column
    
    &#39;DelColumnが1以上でセットされている時該当列をクリアする
    If 0 &lt; DelColumn Then
        Sht.Range(Sht.Cells(BaseRow, BaseCol), Sht.Cells(65536, BaseCol + DelColumn)).ClearContents
    End If
    
    
    &#39;初期値のままだと出力できないので終了する
    If y &lt; 0 Then Exit Function
    
    If FlagTransposeError Then
        
        Sht.Range(Sht.Cells(BaseRow, BaseCol), Sht.Cells(BaseRow + y, BaseCol + x)) = TransposeData()
    
    Else
    
        Sht.Range(Sht.Cells(BaseRow, BaseCol), Sht.Cells(BaseRow + y, BaseCol + x)) = WorksheetFunction.Transpose(data)
    
    End If
    
    Set DataCellObj = Sht.Range(Cell)
    Set DataSheetObj = Sht
    Set Output = Me
    
End Function

Public Sub Sort(Optional ByVal Element As Variant)
    Dim i As Long
    
    &#39;■引数エラーチェック
    
    If VarType(Element) = vbError Then
        &#39;引数が設定されていないと　VarTypeでErrorとなるのでチェックする
        &#39;引数が設定されていない時は、最初の要素についてSortする
        Element = Array(0)

    ElseIf IsNumeric(Element) Then
        &#39;数字の時、整数値か確認。０以上か確認。
        If CLng(Element) &lt;&gt; Element Or Element &lt; 0 Then
            Call Die(&quot;Sort関数の引数には、0以上の整数を指定してください&quot;)
        
        Else
            Element = Array(CLng(Element))
        End If
    
    ElseIf Not IsArray(Element) Then
        Call Die(&quot;Sortメソッドの引数は、配列を指定してください&quot;)
    
    End If
    
    &#39;引数がセットされていた時、それらはすべて整数で要素数の範囲内かどうかチェックする
    For i = UBound(Element) To 0 Step -1

        Call BubbleSort(Element(i))
            
    Next
    
End Sub

Private Sub BubbleSort(ByVal Element As Long)
    Dim ChangeData As String
    Dim DataA      As String
    Dim DataB      As String
    Dim FlagChange As String
    Dim i          As Long
    Dim ii         As Long
    
    &#39;データがない時ソートができないので終了する
    If Count = 0 Then Exit Sub
    
    Do
        FlagChange = False
        For i = 0 To UBound(data, 2) - 1
            DataA = data(Element, i)
            DataB = data(Element, i + 1)
            
            If DataB &lt; DataA Then
                FlagChange = True
                
                For ii = 0 To UBound(data, 1)
                    ChangeData = data(ii, i)
                    data(ii, i) = data(ii, i + 1)
                    data(ii, i + 1) = ChangeData
                Next
                
            End If
            
        Next
            
        If FlagChange = False Then Exit Do
    Loop
End Sub

Private Sub OverLapCheck(ByVal KeyIndexNumber As Long)

    Dim HashOverLap As Object
    Dim key         As String
    Dim i           As Long
    Dim ii          As Long
    Dim temp()      As String
    
    &#39;** Objectの生成 **
    Set HashOverLap = CreateObject(&quot;Scripting.Dictionary&quot;)
    
    &#39;そもそも二次元配列が空の時はループを抜ける
    If y = -1 Then Exit Sub
    
    y = -1
    
    &#39;JuuFukuCheckする
    For i = 0 To UBound(data, 2)
    
        key = data(KeyIndexNumber, i)
        
        If Not HashOverLap.Exists(key) Then
        
            HashOverLap.Add key, &quot;&quot;
            
            y = y + 1
            
            ReDim Preserve temp(UBound(data, 1), y)
            
            For ii = 0 To UBound(data, 1)
            
                temp(ii, y) = data(ii, i)
              
            Next
                
        End If
        
    Next
    
    &#39;Temp内は重複がチェックされたもの。
    &#39;Dataの内容を書き換える
    ReDim data(UBound(temp, 1), UBound(temp, 2))
    
    data = temp
    
    Set HashOverLap = Nothing
End Sub&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/3753016240095617896/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/3753016240095617896' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3753016240095617896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/3753016240095617896'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2017/12/logger.html' title='Logger'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-7005900220548574853</id><published>2017-11-04T13:07:00.001+09:00</published><updated>2017-11-04T13:07:22.638+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><title type='text'>scanf で charを受け取る</title><content type='html'>char以外の文字を受け取りその後charを受け取る場合&lt;br /&gt;
以下のように書くと期待しない動きになる&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: c&quot;&gt;#include &lt;stdio.h&gt;

int main() {
 int n;
 char a;
 char b;

 scanf(&quot;%d&quot;, &amp;n);
 scanf(&quot;%c&quot;, &amp;a);
 scanf(&quot;%c&quot;, &amp;b);

 return 0;
}&lt;/pre&gt;&lt;br /&gt;
scanfは、3回登場するが、入力は10とaの2回&lt;br /&gt;
&lt;pre class=&quot;brush: text&quot;&gt;10
a&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzkcorGVk5NpsHnSHHJ9rv1r5BlSAYi66dOr-RCfr_iVJ7HmuTs3-5sJhihPJYsRF4-RibqRE-EfRQObHDgmxxkhyphenhyphen3Sb13UIWycJf3hfNtB4u0G0HNy8yDhXI8XedcxgSNeIDjjRwhOxc/s1600/20171104a.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzkcorGVk5NpsHnSHHJ9rv1r5BlSAYi66dOr-RCfr_iVJ7HmuTs3-5sJhihPJYsRF4-RibqRE-EfRQObHDgmxxkhyphenhyphen3Sb13UIWycJf3hfNtB4u0G0HNy8yDhXI8XedcxgSNeIDjjRwhOxc/s320/20171104a.png&quot; width=&quot;320&quot; height=&quot;97&quot; data-original-width=&quot;217&quot; data-original-height=&quot;66&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
最初の変数に10が代入。&lt;br /&gt;
改行はストリームに残っているので、char変数にaに代入される。&lt;br /&gt;
その後、改めて入力したaがchar変数bに代入される。&lt;br /&gt;
&lt;br /&gt;
一度入力した後にcharに代入する場合、改行を毎回捨てる必要がある&lt;br /&gt;
①getchar()で読み捨てる&lt;br /&gt;
&lt;pre class=&quot;brush: c&quot;&gt;#include &lt;stdio.h&gt;

int main() {
 int n;
 char a;
 char b;

 scanf(&quot;%d&quot;, &amp;n);
 (void)getchar();
 scanf(&quot;%c&quot;, &amp;a);
 (void)getchar();
 scanf(&quot;%c&quot;, &amp;b);

 return 0;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
②書式文字列に半角スペースを先頭につけ、最初の改行を読み捨てる&lt;br /&gt;
&lt;pre class=&quot;brush: c&quot;&gt;#include &lt;stdio.h&gt;

int main() {
 int n;
 char a;
 char b;

 scanf(&quot;%d&quot;, &amp;n);
 scanf(&quot; %c&quot;, &amp;a);
 scanf(&quot; %c&quot;, &amp;b);

 return 0;
}&lt;/pre&gt;&lt;br /&gt;
③書式文字列に代入不可(*)を指定して読み飛ばす&lt;br /&gt;
&lt;pre class=&quot;brush: c&quot;&gt;#include &lt;stdio.h&gt;

int main() {
 int n;
 char a;
 char b;

 scanf(&quot;%d&quot;, &amp;n);
 scanf(&quot;%*c%c&quot;, &amp;a);
 scanf(&quot;%*c%c&quot;, &amp;b);

 return 0;
}&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/7005900220548574853/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/7005900220548574853' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/7005900220548574853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/7005900220548574853'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2017/11/scanf-char.html' title='scanf で charを受け取る'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzkcorGVk5NpsHnSHHJ9rv1r5BlSAYi66dOr-RCfr_iVJ7HmuTs3-5sJhihPJYsRF4-RibqRE-EfRQObHDgmxxkhyphenhyphen3Sb13UIWycJf3hfNtB4u0G0HNy8yDhXI8XedcxgSNeIDjjRwhOxc/s72-c/20171104a.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-4078650495053256240</id><published>2017-10-22T20:49:00.001+09:00</published><updated>2017-10-22T20:49:29.206+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><title type='text'>NULL</title><content type='html'>NULLは void型　で値は0&lt;br /&gt;
&lt;br /&gt;
NULLをintに変換すれば0と一緒&lt;br /&gt;
&lt;pre class=&quot;brush: c&quot;&gt;#include&lt;stdio.h&gt;
int main(){
  if((int)NULL == 0){                                                                                                                                 
    printf(&quot;0です\n&quot;);
  }else{
    printf(&quot;0じゃないです\n&quot;);
  }
  return 0;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
0を(void*)として変換すればNULLと一緒&lt;br /&gt;
&lt;pre class=&quot;brush: c&quot;&gt;#include&lt;stdio.h&gt;

int main(){
  if(NULL == (void*)0){                                                                                                                               
    printf(&quot;0です\n&quot;);
  }else{
    printf(&quot;0じゃないです\n&quot;);
  }
  return 0;
}&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/4078650495053256240/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/4078650495053256240' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/4078650495053256240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/4078650495053256240'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2017/10/null.html' title='NULL'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-1881811289680690405</id><published>2017-08-13T00:21:00.003+09:00</published><updated>2017-08-13T00:21:45.134+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>typescriptコンパイル結果</title><content type='html'>案件でTypeScriptが使えなかった時に備え何が何に変換されるかメモ&lt;br /&gt;
&lt;br /&gt;
■class&lt;br /&gt;
.ts&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;class animal { }
&lt;/pre&gt;&lt;br /&gt;
.js&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;var animal = (function () {
    // コンストラクタ
    function animal() {
    }
    return animal;
}());
&lt;/pre&gt;&lt;br /&gt;
■コンストラクタ&lt;br /&gt;
.ts&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;class animal {
    constructor() {
        alert(&quot;const&quot;);
    }
}
&lt;/pre&gt;&lt;br /&gt;
.js&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;var animal = (function () {
    // コンストラクタ
    function animal() {
        alert(&quot;const&quot;);
    }
    return animal;
}());
&lt;/pre&gt;&lt;br /&gt;
■インスタンス変数(public)&lt;br /&gt;
.ts&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;class animal {
    name: string = &quot;default&quot;;
}
&lt;/pre&gt;&lt;br /&gt;
.js&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;var animal = (function () {
    function animal() {
        this.name = &quot;default&quot;;
    }
    return animal;
}());
&lt;/pre&gt;&lt;br /&gt;
■インスタンス変数(private)&lt;br /&gt;
コンパイラ時チェックのみ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
■Getter/Setter&lt;br /&gt;
.ts&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;class animal {
    _name: string = &quot;default&quot;;

    get name() {
        return this._name;
    }

    set name(value: string) {
        this._name = value;
    }
}
&lt;/pre&gt;&lt;br /&gt;
.js&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;var animal = (function () {
    function animal() {
        this._name = &quot;default&quot;;
    }
    Object.defineProperty(animal.prototype, &quot;name&quot;, {
        get: function () {
            return this._name;
        },
        set: function (value) {
            this._name = value;
        },
        enumerable: true,
        configurable: true
    });
    return animal;
}());
&lt;/pre&gt;&lt;br /&gt;
■staticメソッド、変数&lt;br /&gt;
.ts&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;class animal {
    static count: number = 0;

    static Print(): void {
        alert(animal.count);
    }
}
&lt;/pre&gt;&lt;br /&gt;
.js&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;var animal = (function () {
    function animal() {
    }
    animal.Print = function () {
        alert(animal.count);
    };
    animal.count = 0;
    return animal;
}());
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/1881811289680690405/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/1881811289680690405' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/1881811289680690405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/1881811289680690405'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2017/08/typescript.html' title='typescriptコンパイル結果'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8783559460570125755.post-1915545972908219804</id><published>2017-05-31T23:54:00.002+09:00</published><updated>2017-10-22T17:23:23.826+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cplusplus"/><title type='text'>C++メモ</title><content type='html'>■コンストラクタ/デストラクタ&lt;br /&gt;
Sample.h&lt;br /&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#pragma once
class Sample
{
public:
 Sample();
 Sample(int num);
 ~Sample();
};
&lt;/pre&gt;&lt;br /&gt;
Sample.cpp&lt;br /&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include &quot;Sample.h&quot;
#include &lt;stdio.h&gt;

Sample::Sample()
{
 printf(&quot;コンストラクタ\n&quot;);
}

Sample::Sample(int num)
{
 printf(&quot;コンストラクタ引数:%d\n&quot;, num);
}

Sample::~Sample()
{
 printf(&quot;デストラクタ\n&quot;);
}
&lt;/pre&gt;&lt;br /&gt;
main.cpp&lt;br /&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include &quot;stdio.h&quot;
#include &quot;Sample.h&quot;

int main() {
 Sample s1;
 Sample s2(10); 
 
 //他の言語寄りに記載するなら下記かな
 //Sample s1 = Sample();
 //Sample s2 = Sample(10);

 return 0;
}
&lt;/pre&gt;&lt;br /&gt;
■インスタンス変数/メソッド&lt;br /&gt;
Sample.h&lt;br /&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#pragma once
class Sample
{
public:
 Sample(int num1, int num2);
 void Sum();

private:
 int _num1;
 int _num2;
};
&lt;/pre&gt;&lt;br /&gt;
Sample.cpp&lt;br /&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include &quot;Sample.h&quot;
#include &lt;stdio.h&gt;

Sample::Sample(int num1, int num2)
{
 this-&gt;_num1 = num1;
 this-&gt;_num2 = num2;
}

void Sample::Sum() {
 printf(&quot;%d\n&quot;, this-&gt;_num1 + this-&gt;_num2);
}
&lt;/pre&gt;&lt;br /&gt;
main.cpp&lt;br /&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include &quot;stdio.h&quot;
#include &quot;stdio.h&quot;
#include &quot;Sample.h&quot;

int main() {
 Sample s(10, 20);
 s.Sum();

 return 0;
}
&lt;/pre&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://maeyan.blogspot.com/feeds/1915545972908219804/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8783559460570125755/1915545972908219804' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/1915545972908219804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8783559460570125755/posts/default/1915545972908219804'/><link rel='alternate' type='text/html' href='http://maeyan.blogspot.com/2017/05/c_31.html' title='C++メモ'/><author><name>maeyan</name><uri>http://www.blogger.com/profile/09832364527648430343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>