我们使用Stackdriver作为我们拥有的Docker环境的日志代理.有效负载的形式如下:
structPayload: {
container: {…}
data: "[2016-11-16 08:15:49] INFO Domain xxx apiKey validation passed."
instance: {…}
}
Run Code Online (Sandbox Code Playgroud)
在查看日志时,Web视图会给我:
{ "容器":{ "ID": "XXX", "创造": "2016-11-15T05:35:05.533105502Z",...
有没有办法让网页视图给我列出的容器数据,因为点击它打开所有事件只是愚蠢和耗时..有时随机在给我只是数据,但我无法想象它出来怎么做..
这是使用Python SDK版本1.8.0.
我的远程API工作正常remote_api_shell.py,但在尝试从python脚本中访问时不起作用.我正在使用谷歌的示例代码:
from google.appengine.ext.remote_api import remote_api_stub
import getpass
def auth_func():
return (raw_input('Username:'), getpass.getpass('Password:'))
remote_api_stub.ConfigureRemoteApi(None, '/_ah/remote_api', auth_func,
'localhost:8080')
Run Code Online (Sandbox Code Playgroud)
而且我也导入fix_sys_path()从dev_appserver.py设置我sys.path正确的谷歌应用程序引擎SDK:
import dev_appserver
dev_appserver.fix_sys_path()
Run Code Online (Sandbox Code Playgroud)
除了其他路径之外,我还将以下行添加到sys.path:
'/google_appengine_1.8.0/lib/fancy_urllib'
Run Code Online (Sandbox Code Playgroud)
但是,调用上面的调用时会抛出以下错误remote_api_stub.ConfigureRemoteApi():
opener.add_handler(fancy_urllib.FancyProxyHandler())
AttributeError: 'module' object has no attribute 'FancyProxyHandler'
Run Code Online (Sandbox Code Playgroud) 我正在开发Flutter应用。当我cloud_firestore和firebase_auth分别使用它们时,我的应用程序可以与和软件包一起正常工作。但是,当我将它们都包含在pubspecs.yaml文件中时,构建将失败,并显示以下消息:
注意:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.4/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/ CloudFirestorePlugin.java使用未经检查或不安全的操作。注意:使用-Xlint:unchecked重新编译以获取详细信息。注意:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.18/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin。 java使用或覆盖已弃用的API。注意:有关详细信息,请使用-Xlint:deprecation重新编译。注意:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.18/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin。 Java使用未经检查或不安全的操作。注意:使用-Xlint:unchecked重新编译以获取详细信息。注意:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin。 Java使用未经检查或不安全的操作。注意:使用-Xlint:unchecked重新编译以获取详细信息。
失败:构建失败,发生异常。
java.lang.RuntimeException:java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex
这是我的pubspec.yaml文件中的依赖关系:
dependencies:
flutter:
sdk: flutter
firebase_auth: ^0.5.18
cloud_firestore: ^0.7.4
Run Code Online (Sandbox Code Playgroud)
我检查了软件包的版本,它们似乎都是最新版本。
解决此问题的任何帮助将不胜感激!
这可能与这个问题有关,但我不确定。
android firebase firebase-authentication flutter google-cloud-firestore
我正在尝试使用Cloud Functions将这些数据传递到文档的字段中:
[ [ '-LXRXPFgA6sC9Mg0GQMt', 1, 'Sushi premium' ], [ '-LXRSAp3jpB8EUbZU-0c', 1, 'Caramel Glazed Donuts' ] ]
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
错误:3 INVALID_ARGUMENT:无法在数组值中转换数组值。在Object.onReceiveStatus(/ user_code / node_modules / firebase-admin / node_modules / grpc / src /下的Object.exports.createStatusError(/user_code/node_modules/firebase-admin/node_modules/grpc/src/common.js:91:15)下在InterceptingListener._callNext(/user_code/node_modules/firebase-admin/node_modules/grpc/src/client_interceptors.js:568:42)处的InterceptingListener.onReceiveStatus(/ user_code / node_modules / firebase-admin /回调时的node_modules / grpc / src / client_interceptors.js:618:8)(/user_code/node_modules/firebase-admin/node_modules/grpc/src/client_interceptors.js:845:24)
我的期望:我期望它是有效的。为什么这无效?我做错什么了吗?
我需要将用户上传到我网站的所有文档存储在一个 Drive 帐户中。
这些文档位于用户的计算机上。他们没有也不想拥有 Google Drive 帐户。
目前尚不清楚“Google Drive API”是否可以实现这一点,或者我是否需要仅存储文件更昂贵的“Google Cloud Storage API”。
所述API必须为每个用户的文档创建一个文件夹。
除此之外,我还需要 G Suite 帐户吗?
感谢一百万的帮助
cloud-storage google-cloud-storage google-drive-api google-workspace
我正在尝试按照Google 提供的示例将 Cloud Functions 脚本连接到带有 Python 和 MySQL 实例的 Cloud SQL。
我在项目中创建了一个 Cloud SQL 实例,然后创建了一个 Cloud Function,我将整个脚本从链接粘贴到内联编辑器中。我将环境变量设置为连接到 Cloud SQL 所需的环境变量,但出现错误。
为了完成这项工作,我是否缺少一些明显的东西?
错误:函数崩溃。详细信息:(2003 年,“无法连接到 'localhost' 上的 MySQL 服务器([Errno 111] 连接被拒绝)”)
回溯(最近一次调用):文件“/env/local/lib/python3.7/site-packages/pymysql/connections.py”,第 582 行,在 connect **kwargs 中)文件“/opt/python3.7/ lib/python3.7/socket.py", line 727, in create_connection raise err File "/opt/python3.7/lib/python3.7/socket.py", line 716, in create_connection sock.connect(sa) ConnectionRefusedError : [Errno 111] Connection denied 在处理上述异常的过程中,又发生了一个异常: Traceback (most recent call last): File "/user_code/main.py", line 49, in mysql_demo mysql_conn = pymysql.connect(**mysql_config )文件“/env/local/lib/python3.7/site-packages/pymysql/ INIT py”为,线94,在连接返回连接(*指定参数时,** kwargs)文件“/ env的/本地/ LIB …
python google-cloud-sql google-cloud-platform google-cloud-functions
我正在尝试在 python 中运行以下脚本,它将视频文件转换为文本:
from google.cloud import speech_v1p1beta1 as speech
client = speech.SpeechClient()
with open(speech_file, 'rb') as audio_file:
content = audio_file.read()
audio = speech.types.RecognitionAudio(content=content)
config = speech.types.RecognitionConfig(
encoding=speech.enums.RecognitionConfig.AudioEncoding.LINEAR16,
sample_rate_hertz=16000,
language_code='en-US',
model='video')
response = client.recognize(config, audio)
for i, result in enumerate(response.results):
alternative = result.alternatives[0]
print('-' * 20)
print('First alternative of result {}'.format(i))
print(u'Transcript: {}'.format(alternative.transcript))
Run Code Online (Sandbox Code Playgroud)
当我运行此脚本时,出现以下错误:
导入错误:无法导入名称“speech_v1p1beta1”
对于如何解决这个问题,有任何的建议吗?
每次我尝试通过SSH输入Google Compute Engine中的VM实例时,都会出现此错误:
权限被拒绝(公钥,gssapi-keyex,gssapi-with-mic)。
我尝试了以下提到的步骤:
使用命令ssh-keygen -t rsa -f〜/ .ssh / [文件名] -C [用户名]生成ssh密钥
将公钥复制到实例ssh列表中。
可能是问题所在,还是我缺少一些步骤?
我对如何解决这个问题感到困惑。
GAE 似乎希望每个客户端库都使用范围为 http.Request 的 context.Context。
我以前有过做这样的事情的经验:
main.go
type server struct {
db *firestore.Client
}
func main() {
// Setup server
s := &server{db: NewFirestoreClient()}
// Setup Router
http.HandleFunc("/people", s.peopleHandler())
// Starts the server to receive requests
appengine.Main()
}
func (s *server) peopleHandler() http.HandlerFunc {
// pass context in this closure from main?
return func(w http.ResponseWriter, r *http.Request) {
ctx := r.Context() // appengine.NewContext(r) but should it inherit from background somehow?
s.person(ctx, 1)
// ...
}
}
func (s *server) …Run Code Online (Sandbox Code Playgroud) 有什么方法可以在 StackOverflow 中创建一个类似于此处可用的相同标签系统的 EditText 吗?
或任何图书馆出于同样的目的?
我想在我的应用程序中做类似的事情:
我已经有一个 EditText 字段,用户输入一个主题,例如“java”,然后,当用户输入“;”时,我想用颜色、蓝色或灰色标记该词,例如突出显示它是一个标签。然后,用户可以输入另一个标签,即“android”,或者可以像文本一样删除前一个标签。
如何获取Google Big Query中两个时间戳字段之间的天数差异?
我知道的唯一功能是Datediff,该功能仅在旧版SQL中有效,但在标准SQL中。
例如:20180115与20180220之间的差是36天。