メモメモ
Span<T>大事
":memory:"で指定して ";mode=memory;cache=shared"; を付けて使う
public abstract class SqliteBase { public string ConnectionString; protected SqliteBase() { SQLiteConnectionStringBuilder builder = new SQLiteConnectionStringBuilder { DataSource = ":memory:", ForeignKeys = true, DefaultTimeout = 3, DateTimeKind = DateTimeKind.Utc, Pooling = false }; ConnectionString = builder.ConnectionString + ";mode=memory;cache=shared"; } private DbConnection _MemoryConnection; protected DbConnection GetConnection() { try { if (_MemoryConnection == null) { _MemoryConnection = new SQLiteConnection(ConnectionString); _MemoryConnection.Open(); } DbConnection dbConnection = new SQLiteConnection(ConnectionString); dbConnection.Open(); return dbConnection; }
右クリックから「全バックアップ」でzipファイル作成。
exeも含めた全てのファイルがはいってるので、これで上書きすれば復活
Offset()使う
Sub Sample1() Dim FoundCell As Range Set FoundCell = Range("A:A").Find("田中") If Not FoundCell Is Nothing Then MsgBox FoundCell.Offset(0, 1) End If End Sub
Sub Sample2() Dim FoundCell As Range ''またはバリアント型(Variant)とする Set FoundCell = Range("A1").CurrentRegion.Find(What:="土屋") If FoundCell Is Nothing Then MsgBox "検索に失敗しました" Else FoundCell.Select End If End Sub
数字+英字ならVal()を使うと数字部分だけ取れる
Sub Sample1() MsgBox Val("123ABC") End Sub
英字+数字ならひっくり返してから数字部分だけとり、Replaceで数字部分だけ消しちゃう
dim moji moji = "ABC123" MdgBox Replace(moji, StrReverse(Val(StrReverse(moji))), "")
なんとBIOS設定(UEFI)からいじらないといけない
windows10から
設定>更新とセキュリティ>回復>PCの起動をカスタマイズする の「今すぐ再起動」をクリック
オプションメニューが開くのでトラブルシューティング>詳細オプション>UEFI ファームウェア設定を選択
BIOS のメニューになるので「Configuration」タブを選択し、「Hotkey Mode」を選択して「Disabled(無効)」にします。
yyyymmdd 形式の文字列を DateTime に変換
var dt = System.DateTime.ParseExact("20171231", "yyyyMMdd", null);
ほかにもいろんなパターンで指定可能
DateTime utc_input = System.DateTime.UtcNow; TimeZoneInfo jstZoneInfo = System.TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time"); DateTime jst = System.TimeZoneInfo.ConvertTimeFromUtc(utc_input, jstZoneInfo);