在我的公司,我们有一个Python应用程序,它公开rest API。我需要定期检查API是否正常工作,并在其响应中返回正确的数据。到目前为止,我设法配置了Stackdriver正常运行时间检查-检查状态,但是,例如,我如何检查response "data“属性是否不是空数组(空数组无效)
{data:[]} //not valid - should have at least 1 item
正常运行时间检查是一个很好的工具吗?
我在表格上装了个摄像头。为了简洁起见,我想在退出应用程序时终止流。因此,我在FormClosed事件中添加了以下内容:
private void Mainform_FormClosed(object sender, FormClosedEventArgs e)
{
// When the window is closed then shut down the webcam
if (FinalVideoSource.IsRunning)
{
FinalVideoSource.Stop();
}
MessageBox.Show(&
我安装了symfony2和FOSUserBundle。两者都工作正常,但是当我访问FOSUserBundle的注册页面时,它正在使用SwiftMailer作为电子邮件确认,我立即得到以下错误。
Fatal error: Class 'Swift_Mailer' not found in /home/public_html/cache/dev/appDevDebugProjectContainer.php on line 1331
1331行的代码如下:
return $this->services['mailer'] = new \Swift_Mailer