我现在面临的问题:
有没有什么方法可以作为特定用户运行/调试脚本(如sudo su - user)?
我已经阅读过在PyCharm的远程/调试配置中指定一些Python Interpeter选项,但没有设法获得可行的解决方案.
试图在Kotlin的在线学习工具上运行这个例子:
fun toJSON(collection: Collection<Int>): String {
val str = collection.reduce{ a:String, b:Int -> ""}
return str.toString()
}
Run Code Online (Sandbox Code Playgroud)
但是,它似乎没有编译,吐出这个错误:
Error:(2, 25) Type parameter bound for T in inline fun <S, T : S> Iterable<T>.reduce(operation: (S, T) -> S): S
is not satisfied: inferred type Int is not a subtype of String
有人见过这个吗?...不确定这是否是在线工具的错误,或者它确实是错误的.