我已经使用以下命令成功添加了我的服务帐户。
gcloud auth activate-service-account --key-file=mycredentialsialreadyhad.json
现在我无法从中删除或注销。
任何帮助将不胜感激。
编辑:我试过这个命令并得到错误
- gcloud 身份验证撤销
错误:(gcloud.auth.revoke) 无法撤销 GCE 提供的凭据。
- gcloud 配置配置删除默认值
错误:(gcloud.config.configurations.delete) 删除命名配置失败,因为配置 [default] 设置为活动状态。使用
gcloud config configurations activate
更改活动配置。
编辑 2:这个 gcloud cli 在 GCP ubuntu VM 上
Google 即将停止用于 Web 的 Google 登录 JavaScript 平台库。但 Cognito 仍在使用旧库。那么如何使用我的 React Web 应用程序实现一键注册呢?
javascript amazon-web-services google-oauth amazon-cognito google-signin
创建一个接收整数作为参数并返回字符串的函数,例如:
这可以使用 3 个 if 语句来完成,如下所示,但是可以只使用 2 个 if 语句来完成吗?
const intToStr = (intVal) => {
if (intVal % 4 == 0 && intVal % 7 == 0) {
return "FooBar";
}
if (intVal % 7 == 0) {
return "Bar";
}
if (intVal % 4 == 0) {
return "Foo";
}
}
console.log(intToStr(4*7));
console.log(intToStr(7));
console.log(intToStr(4));
Run Code Online (Sandbox Code Playgroud)