我是JS的新手,我想知道如何在字符串中打印var,我发现应该是这样的:
var user = {
name: "Mike",
sayHi:() => {
console.log('Hi, I\'m ${name}');
}
};
user.sayHi()
Run Code Online (Sandbox Code Playgroud)
但我得到: Hi, I'm ${name}
我正在尝试在我的应用中使用Firebase。我通过一个新项目在线执行这些步骤。
当我尝试FirebaseApp.configure()在我的appdelegate中编写时
,Thread 1: signal SIGABRT
如果我删除它,它会给我一个
可以运行的应用程序。
我的项目目录中确实有GoogleService-info.plist。
我的podfile看起来像这样:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'FireBaseTest' do
# Comment the next line if you're not using Swift and don't want to
use dynamic frameworks
use_frameworks!
# Pods for FireBaseTest
pod 'Firebase/Core'
end
Run Code Online (Sandbox Code Playgroud) 我正试图从perl到bash返回一个数组.
我的perl脚本有一个数组然后我用 return(@arr)
从我使用的bash脚本
VAR = `perl....
Run Code Online (Sandbox Code Playgroud)
当我回显VAR时,我将aray作为一个长字符串,所有数组变量连接都没有空格.
谢谢
我正在尝试使用表视图并在 func 中:
cellForRowAt我收到一个错误:Cannot convert value of type 'IndexPath.Type' to expected argument type 'IndexPath'
我的代码是:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cellDish:DishTableViewCell = tableView.dequeueReusableCell(withIdentifier: "cellDish", for: IndexPath) as! DishTableViewCell
return cellDish
}
Run Code Online (Sandbox Code Playgroud)