小编Mod*_*ens的帖子

有没有办法获得Firebase Auth用户UID?

我希望通过NodeJS或Javascript API从Firebase获取Auth User(s)UID.我已附上截图,以便您知道我在寻找什么.

在此输入图像描述

希望,你们帮我解决这个问题.

javascript api node.js firebase firebase-authentication

20
推荐指数
3
解决办法
6万
查看次数

如何创建自己的shell来替换e4 RCP中MTrimmedWindow中创建的shell?

有没有办法用一个用户定义的窗口替换由Eclipse RCP为MTrimmedWindow生成的shell?

Eclipse创建一个具有特定样式类型的shell,只能在创建时提供.我想从为MTrimmedWindow创建的shell元素中删除最大化并调整大小.如果有人对上述问题有解决方案,请回复.

eclipse-plugin eclipse-rcp e4

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

IntelliJ IDE(社区版)不支持var声明Java 10

我已经安装了2018.1版本IntelliJ IDEA的(社区版),这增加了对支持Java的10.

当我尝试使用新的"var"来键入局部变量时,IDE会用红色和可爱的短语突出显示它:"无法解析类型"var".请参阅附件 varRed

我已经阅读了另一篇文章,该文章发生了与成员提供可能解决方案完全相同的问题/sf/answers/3480381411/

我也是这样做的,我已经为Java语句创建了该类型的实时模板,但它仍然不起作用.

有些人对此有任何建议吗?我将感谢你的帮助

提前致谢.
在此输入图像描述

java var intellij-idea java-10

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

避免使用嵌套的if语句

我目前有以下代码.我使用嵌套的if语句根据不同的情况返回不同的错误

if(!cipherFileRead.isEmpty() && !freqFileRead.isEmpty() ){

    if(freqChooser.getSelection()!=null){

        if(nearestFreq.isSelected()){
            file.writeToFile(decrypter.nearestFreq(cipherFileRead, freqFileRead), "output.txt");;
        }
        else if (rankingFreq.isSelected()){
            file.writeToFile(decrypter.byRanking(cipherFileRead, freqFileRead), "output.txt");;
        }

        returnMessage = "Succesfully decrypted to output.txt";
    }
    else{
        returnMessage = "Please select decryption type. Decryption unsuccesful";}
}
else{
    returnMessage = "Both files must be loaded and contain text. Decryption unsuccesful.";}

JOptionPane.showMessageDialog(null, returnMessage);
}  
Run Code Online (Sandbox Code Playgroud)

有没有更优雅的方法来实现这一点,没有大量可怕的IF语句?

java

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

无法访问受保护的符号?

我越来越

无法访问受保护的符号TParent.Test

用于以下代码:

在Unit1:

TParent = class
protected
  function Test: TParent;
end;

implementation

function TParent.Test: TParent;
begin
  Result := Self
end;
Run Code Online (Sandbox Code Playgroud)

在第2单元:

uses Unit1;

type

TChild = class(TParent)
end;

implementation

var c: TChild;
begin
  c := TChild.Create;
  c.Test.Test
end;
Run Code Online (Sandbox Code Playgroud)

TChild不应该可以访问返回值吗?

c.Test;
c.Test
Run Code Online (Sandbox Code Playgroud)

当然是有效的.

delphi protected delphi-xe2

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