小编use*_*435的帖子

PhpStorm显示空间而不是 

我正在使用PhpStorm 2016.2和一个使用刀片模板的项目.在我的Blade模板中,我使用html编码字符 .PhpStorm  在编辑器中显示为一个空格,我希望它显示 不变.

我需要改变什么设置?

phpstorm

18
推荐指数
1
解决办法
1917
查看次数

如何在sum()列和groupBy中使用查询生成器

如何在Laravel中使用查询构建器生成以下SQL语句:

SELECT costType, sum(amountCost) AS amountCost
FROM `itemcosts`
WHERE itemid=2
GROUP BY costType
Run Code Online (Sandbox Code Playgroud)

我已经尝试了几件事,但是我无法sum()使用重命名工作.

我的最新代码:

$query = \DB::table('itemcosts');
$query->select(array('itemcosts.costType'));
$query->sum('itemcosts.amountCost');
$query->where('itemcosts.itemid', $id);
$query->groupBy('itemcosts.costType');
return $query->get();
Run Code Online (Sandbox Code Playgroud)

php laravel-4

8
推荐指数
1
解决办法
2万
查看次数

youtube-dl 下载停止在播放列表上,视频丢失

我正在使用 youtube-dl 从播放列表下载以供离线观看。播放列表的运营商已开始将排定的视频放入播放列表,导致下载失败。当尝试下载播放列表中的视频时,当它尝试下载不可用的视频(预定视频)时,它会失败并且下载中止。

缺少视频时,如何继续下载播放列表?

我的命令:

/share/Multimedia/temp/youtube-dl -f 'best[ext=mp4]' -o "/share/Multimedia/YouTube/TheNational/%(upload_date)s.%(title)s.%(ext)s" --restrict-filenames --dateafter today-3day --no-mtime --download-archive "/share/Multimedia/temp/dllist-thenational.txt" --playlist-end 10 https://www.youtube.com/playlist?list=PLvntPLkd9IMcbAHH-x19G85v_RE-ScYjk
Run Code Online (Sandbox Code Playgroud)

今天的下载结果:

[youtube:playlist] PLvntPLkd9IMcbAHH-x19G85v_RE-ScYjk: Downloading webpage
[download] Downloading playlist: The National | Full Show | Live Streaming Nightly at 9PM ET
[youtube:playlist] playlist The National | Full Show | Live Streaming Nightly at 9PM ET: Downloading 10 videos
[download] Downloading video 1 of 10
[youtube] pZ2AG5roG-A: Downloading webpage
[youtube] pZ2AG5roG-A: Downloading video info webpage
ERROR: This video is unavailable.
Run Code Online (Sandbox Code Playgroud)

我想下载播放列表以忽略丢失的文件并继续播放下一个可用视频。

谢谢。

youtube-dl

5
推荐指数
1
解决办法
4599
查看次数

从esxi4导出ovftool始终定位器不引用对象错误

我正在使用ESXI 4,我有一个VM我想要每周或两周导出到OVF.我正在尝试使用ovf工具并编写脚本以使其更容易.无论我做什么,我总是得到错误"定位器不引用对象".

我的设置是ESXI 4.
虚拟机名称是:SUGARCRM
数据存储路径是:[datastore1] /debian/debian.vmx

根据说明,以下应该有效,但它们对我不起作用.什么是正确的命令语法?

$ ovftool.exe vi://root:mypassword@192.168.1.60/ha-datacenter/?ds=[datastore1]/debian/debian.vmx c:\vm\sugarcrm.ovf
Error: Locator does not refer to an object

$ ovftool.exe vi://root:mypassword@192.168.1.60/ha-datacenter/vm/debian/debian c:\vm\sugarcrm.ovf
Error: Locator does not refer to an object

$ ovftool.exe vi://root:mypassword@192.168.1.60/ha-datacenter/vm/debian/SUGARCRM c:\vm\sugarcrm.ovf
Error: Locator does not refer to an object

$ ovftool.exe vi://root:mypassword@192.168.1.60/ha-datacenter/SUGARCRM c:\vm\sugarcrm.ovf
Error: Locator does not refer to an object
Run Code Online (Sandbox Code Playgroud)

vmware

4
推荐指数
1
解决办法
4324
查看次数

拆分 PHP 单元测试以停止内存不足错误

我有一个使用 phpunit 进行单元测试的商业应用程序。业务应用程序的规模不断扩大,单元测试也在不断增加。当我运行 phpunit 来获取代码覆盖率报告时,我的内存不足。生成包含大量单元测试的代码覆盖率报告的好方法是什么?

运行下面的 phpunit.xml,我在完成之前收到以下错误:

PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1068290 bytes)
Run Code Online (Sandbox Code Playgroud)

我正在使用 PHP5.6 和 Jenkins 来运行这项工作。

<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
  backupStaticAttributes="false"
  bootstrap="./src/bootstrap/autoload.php"
  colors="true"
  convertErrorsToExceptions="true"
  convertNoticesToExceptions="true"
  convertWarningsToExceptions="true"
  processIsolation="false"
  stopOnFailure="false"
  syntaxCheck="false"
>
 <testsuites>
  <testsuite name="module1">
   <directory>./tests/module1</directory>
   <directory>./tests/module2</directory>
   <directory>./tests/module3</directory>
   <directory>./tests/module4</directory>
   <directory>./tests/module5/directory>
   <directory>./tests/module6</directory>
   <directory>./tests/module7</directory>
   <directory>./tests/module8</directory>
  </testsuite>
  <testsuite name="module2">
   <directory>./tests/module9</directory>
   <directory>./tests/module10</directory>
   <directory>./tests/module11</directory>
   <directory>./tests/module12</directory>
   <directory>./tests/module13</directory>
   <directory>./tests/module14</directory>
   <directory>./tests/module15</directory>
   <directory>./tests/module16</directory>
  </testsuite>
 </testsuites>

 <filter>
  <blacklist>
   <directory>./src</directory>
  </blacklist>
  <whitelist>
   <directory>./src/app/module</directory>
  </whitelist>
 </filter>

 <logging>
  <log type="coverage-html" target="build/module" title="module"
   charset="UTF-8" …
Run Code Online (Sandbox Code Playgroud)

php phpunit

4
推荐指数
1
解决办法
3293
查看次数

Jenkins Windows 从机离线

我在 CentOS 7 服务器上有 Jenkins 2.164.3。
我有一个 Windows Server 2003 从属服务器,Java 版本为 1.8.0。
我有 3 个 linux 从机成功工作。
从站上的 Windows 服务已安装并正在运行。
Windows 从属设备使用以下启动方法进行设置“让 jenkins 控制此 Windows 从属设备作为 Windows 服务器”

这个 Jenkins 服务器是一个新服务器,它取代了旧的 jenkins 服务器(大约 3 年前来自 Turnkey linux 的 debian wheezy)。该 Windows 从属服务器用于连接到该旧服务器。要删除此从站到旧服务器的连接,我执行了以下操作: 1. sc 删除
2. 删除文件夹 c:\jenkins 中的文件
3. 重新启动服务器
4. 从新的 jenkins 服务器启动从站,将文件复制到 c :\jenkins 文件夹和已安装的服务。

在我的新 jenkins 服务器上,我设置了 Windows 从属服务器,当我连接时,日志包含以下内容:

[2019-05-27 12:24:07] [windows-slaves] Connecting to 192.168.1.152
Checking if Java exists
java -version returned 1.8.0.
[2019-05-27 12:24:16] …
Run Code Online (Sandbox Code Playgroud)

jenkins

4
推荐指数
1
解决办法
4410
查看次数

根据文件名模式将 S3 存储桶中的文件移动到文件夹

我有一个包含几千个文件的 S3 存储桶,其中文件名始终与模式 {hostname}.{contenttype}.{yyyyMMddHH}.zip 匹配。我想创建一个每天运行一次的脚本,根据文件名中的年份和月份将这些文件移动到文件夹中。

如果我尝试以下 aws-cli 命令

aws s3 mv s3://mybucket/*.202001* s3://mybucket/202001/
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

fatal error: An error occurred (404) when calling the HeadObject operation: Key "*.202001*" does not exist
Run Code Online (Sandbox Code Playgroud)

是否有 aws-cli 命令可以按计划运行以实现此目的?

amazon-s3 aws-cli

0
推荐指数
1
解决办法
764
查看次数

标签 统计

php ×2

amazon-s3 ×1

aws-cli ×1

jenkins ×1

laravel-4 ×1

phpstorm ×1

phpunit ×1

vmware ×1

youtube-dl ×1