VirtualBox(5.1.16)+Vagrant(1.9.2)で共有フォルダがマウントできない
(2017-03-23追記)
VirtualBoxのバグだったようです。
VirtualBoxのバージョンを5.1.14に落とすか、5.1.18に上げれば解決します。
Windows10環境でVirtualBox5.1.16とVagrant1.9.2で仮想環境構築しようとしたら、 こんな感じのエラーが出てマウントできない。。。
Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attempted was: mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant The error output from the command was: : No such file or directory
対処法がなかなか見つからなくてこれで一日溶けた…(´・ω・`)
対処法
C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.9.2\lib\vagrant\util\platform.rb
206行目にある
"\\\\?\\" + path.gsub("/", "\\")
を path.gsub("/","\\")
に置き換える。
ファイルの場所が場所なので、エディタは要管理者権限
情報源
ここにに対処法乗ってました。 stackoverflow.com
一文字取り出してint型
今日の躓き備忘録
string型文字列の中に入っている数字を1文字取り出してint型変数に格納
string str = "123";
int d;
d = int.Parse(str[0].ToString());
Console.WriteLine(d);
d = str[0] - '0';
Console.WriteLine(d);
どっちでも結果は同じ。
d = str[0];
だと、'1'のアスキーコード(10進数表記で49)が数値として入る。
HHKBが…
7月末に買ったHHKB Pro2が壊れた。
左◇キーが根本から折れてる(-_-;)
しかも、接着剤らしきもので補修されてた跡があって残骸が取れない。。
新品で買ったのに補修跡ってなんなの。。。
取り敢えずメーカーにメール投げたけど、保証効くのかな?
普通に使ってたハズなのにこんなに早く壊れるなんて。。。
DecimalとかMath.Roundとか
C#で色々やってたら、有効桁数とか、四捨五入で躓いたので備忘録
・有効桁数 28 ~ 29
・サフィックス m または M を使用
Math.Round メソッド (Decimal, MidpointRounding) (System)
・Math.Round(Decimal)では四捨五入にならない
・四捨五入の場合はMath.Round(Decimal,MidpointRounding.AwayFromZero)
Roundは言語によって実装が異なるから気をつけないとダメぽい。。。