木曜日, 10月 27, 2011

C#: TimeZoneInfo.GetSystemTimeZones()

TimeZoneInfo.GetSystemTimeZones() returns a reference to a same instance, no matter how many times it is called.

When the time zone list is added to combo boxes, they select the same values.

comboBox1.DataSource = TimeZoneInfo.GetSystemTimeZones();
comboBox2.DataSource = TimeZoneInfo.GetSystemTimeZones();

The Collection class must be copied to some other forms.

System.Collections.ObjectModel.ReadOnlyCollection list 
= TimeZoneInfo.GetSystemTimeZones();
TimeZoneInfo[] tzList = list.ToArray();
comboBox1.Items.AddRange(tzList);
comboBox2.Items.AddRange(tzList);

Laravel サイトのアップグレード

 Laravel のサイトをアップグレードする機会がありましたので、その方法をここで書いておきたいと思います。かなり構成というか書き方が変わってきているので注意が必要です。 1. 新しいLaravelプロジェクトの作成 まずはクリーンなLaravel環境を作成します。 compo...