这是我的第一个Web服务器管理经验,我想构建使用nginx作为Web服务器的docker容器.在所有docker教程daemon off;选项被放入主.conf文件但是省略了关于它的说明.
我在互联网上搜索它,我不明白daemon on;和daemon off;选项之间有什么区别.有人提到daemon off;是生产,为什么?
你能解释一下,这两个选项有什么区别,为什么我应该用于daemon off;制作?
我刚开始学习iOS编程,我的继承问题.有2个文件.
第一个文件
头
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController {
int x;
}
@end
Run Code Online (Sandbox Code Playgroud)
执行:
#import "ViewController.h"
#import "NewClass.h"
@implementation ViewController
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
x = 999;
NewClass *myClass = [[[NewClass alloc] init] autorelease];
}
@end
Run Code Online (Sandbox Code Playgroud)
第二档
标题:
#import "ViewController.h"
@interface NewClass : ViewController
@end
Run Code Online (Sandbox Code Playgroud)
执行:
#import "NewClass.h"
@implementation NewClass
-(id)init {
self = [super init];
if (self != nil) {
NSLog(@"%i",x);
}
return self;
}
@end
Run Code Online (Sandbox Code Playgroud)
在ViewController中我将x设置为999,而在NewClass中我想得到它,但是当我调用NSLog(@"%i",x);它时,它会给我0.
我在哪里弄错了?