Solution 1
Steps:
- Open “Run" Window (win + R), paste and run the following path,
%systemroot%\System32\inetsrv\config
- Click the
Continues
button to get the access - Reload project
Solution 2
Run Visual Studio as Administrator
Steps:
%systemroot%\System32\inetsrv\config
Continues
button to get the access
Run Visual Studio as Administrator
升級到macOS Sierra後,會發現「系統偏好設定」-》「安全性與隱私」-》「一般」->「允許以下來源的App」中的「任何來源」消失了。
Init: UIImage(data: NSData)
let url = NSURL(string: "http://getbootstrap.com/assets/img/devices.png") let data = NSData(contentsOfURL: url!) UIImage(data: data!)
Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
出現以上錯誤,可能是因為在Project中刪除了默認的storyboard並重新建立
在“Attributes inspector”中tick中 “Is Initial View Controller”
在Project Folder中建立Podfile
,配置如下:
platform :ios, '8.0' use_frameworks! target 'MyApp' do pod 'AFNetworking', '~> 2.6' pod 'ORStackView', '~> 3.0' pod 'SwiftyJSON', '~> 2.3' end
enum 不同類型之間的轉換
enum Days {Sun=1, Mon, Tue, Wed, Thu, Fri, Sat};
int dayInterger = (int)Days.Sun; // dayInterger = 1;
using (FolderBrowserDialog folderBrowser = new FolderBrowserDialog()) { if (folderBrowser.ShowDialog() == DialogResult.OK) { // get folderBrowser.SelectedPath } }
The Apache log4net library is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent Apache log4j™ framework to the Microsoft® .NET runtime. We have kept the framework similar in spirit to the original log4j while taking advantage of new features in the .NET runtime. For more information on log4net see the features document.
void DoWork (string p1, object p2) { // code } void DoWork (object p) { // code }
new Thread(() => DoWork("P1", "P2").Start();