我有一个Android应用程序存储在我的笔记隐藏的应用数据.我想导出我的笔记,所以问题很简单:
如何在Google云端硬盘中访问特定应用的隐藏应用数据?
我是scala的新手,match
现在我正在学习这个关键字.
我想知道我们是否可以使用关键字match
来检查类的类型.我的代码是:
object Main {
def main(args: Array[String]) {
val x = "AA"
checkType(x)
}
def checkType(cls: AnyRef) {
cls match {
case String => println("is a String")
case Date => println("is a Date")
case _ => println("others")
}
}
}
Run Code Online (Sandbox Code Playgroud)
代码无法编译,因此,这是不可能的?什么是scala-way来检查类的类型?是吗:
if(cls.isInstanceOf[String]) { ... }
else if(cls.isInstanceOf[Date]) { ... }
else { ... }
Run Code Online (Sandbox Code Playgroud)
对?
我按照此网址https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu中的说明进行操作, 并且在键入命令时
sudo apt-get update && sudo apt-get install google-cloud-sdk
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
E:Malformed line 5 in source list/etc/apt/sources.list.d/google-cloud-sdk.list(dist parse).
E: The list of sources could not be read.
Run Code Online (Sandbox Code Playgroud)
我在virtualenv中编写了以上命令。我不明白为什么会发生此错误。其他所有步骤均已完成,因此我无法理解为什么会发生这种情况。我该如何解决?