2016年6月6日 星期一

Atmel Studio 7 啟動時 Error ("ErrorListPackage did not load correctly") 解決方式

參考:
http://atmel.force.com/support/articles/en_US/Workaround/Installing-Visual-Studio-2015-Update-1-leads-to-Atmel-Studio-no-longer-starting

Root Cause
The Visual Studio 2015 Update 1 updates a dll that is shared between Atmel Studio and Visual Studio, without providing the correct dll load redirect information. Until we have had the chance to verify that this new dll (version 1.1.37) works with Atmel Studio, we suggest downloading the previous version (1.1.36) and place it in a load path for Atmel Studio with higher load precedence than the Visual Studio load path.
Workaround
This issue is fixed in Atmel Studio 7.0.790 and newer.

If you are using an older version, use to following workaournd:
  1. Download System.Collections.Immutable (1.1.36) from nuget.org
  2. The file downloaded is a zip file with a .nupkg extension, rename the file to .zip 
  3. Open the zip file, go to the lib folder and into a folder called portable-net45%2Bwin8%2Bwp8%2Bwpa81
  4. Copy the System.Collection.Immutable.dll file into one of the Atmel Studio load folders
    1. We suggest using '<installdir>\Extensions\Application', which might be 'C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application' on your machine

使用 python 計算加入天數後的日期


要算出 2000/1/1 後的 100 天是幾月幾號?

import datetime
first_date = datetime.date(2000,1,1)
delta_day = datetime.timedelta(days=100)
cal_date = first_date+delta_day
print(cal_date)