小编Nov*_*ovo的帖子

React Native macOS 菜单栏应用程序是否可行?

目前有什么方法可以在 macOS 菜单栏中创建一个在后台运行的 React Native 应用程序吗?

macos native reactjs react-native

7
推荐指数
2
解决办法
1445
查看次数

使用Firebase注册电子邮件/密码时出现“发生网络错误”错误

我正在按照Firebase在其官方文档中指定的电子邮件/密码注册设置进行操作;但是,在继续进行身份验证时,我一直收到“发生网络错误”错误。

验证码:

window.onload = function() {
  const config = {
        apiKey: "",
    authDomain: "",
    databaseURL: "",
    storageBucket: "",
    messagingSenderId: ""
  };
  firebase.initializeApp(config);
  const btnSignUp = document.getElementById('btnSignUp');

  btnSignUp.addEventListener('click', function() {
    const inputEmail = document.getElementById('username-input');
    const inputPassword = document.getElementById('password-input');

    const email = inputEmail.value;
    const password = inputPassword.value;
    firebase.auth().createUserWithEmailAndPassword(email,    password).catch(function(error) {
        console.log(error);
    });
  });
};
Run Code Online (Sandbox Code Playgroud)

控制台错误:

A network error (such as timeout, interrupted connection or unreachable host) has occurred.
Run Code Online (Sandbox Code Playgroud)

javascript oauth firebase firebase-authentication

1
推荐指数
1
解决办法
3247
查看次数

为什么init方法以"return self"结尾?而不是"返回0;"?

我为什么要"回归自我"; 在课程结束而不是"返回0;"?这两个陈述有什么区别?

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    //Call the init method implemented by the superclass
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
       //Create two arrays and make the pointers point to them
       questions = [[NSMutableArray alloc] init];
       answers = [[NSMutableArray alloc] init];

       //Add questions and answers to the arrays
       [questions addObject:@"What is 7 + 7?"];
       [answers addObject:@"14"];

       [questions addObject:@"What is the capital of Vermont?"];
       [answers addObject:@"Montpelier"];

       [questions addObject:@"From what is cognac made?"];
       [answers addObject:@"Grapes"];

   }

   // Return the …
Run Code Online (Sandbox Code Playgroud)

objective-c ios

-4
推荐指数
1
解决办法
458
查看次数