为什么这两个命令的行为不同?
在生产模式下启动Play并启动dev模式有何不同?
activator run -Dconfig.file=/myConfig.conf # works
activator "run -Dconfig.file=/myConfig.conf" # works
activator "start -Dconfig.file=/myConfig.conf" # Works
activator start -Dconfig.file=/myConfig.conf # Doesn't, config file not found
Run Code Online (Sandbox Code Playgroud) 我有一个奇怪的问题,即能够从命令行运行bash脚本,但不能从root的crontab条目运行.我正在运行Ubuntu 12.04.
* * * * 1-5 root /home/xxxxxx/jmeter/VerificationService-0.0.1-SNAPSHOT/jmeter-cron-randomise.sh >> /home/xxxxxxx/jmeter/VerificationService-0.0.1-SNAPSHOT/cron.log
Run Code Online (Sandbox Code Playgroud)
如果我使用bash从cmd行运行脚本,它可以正常工作但sh失败并出现以下错误:
> jmeter-cron-randomise.sh: 7: jmeter-cron-randomise.sh: arithmetic
> expression: expecting primary: " % 1 "
Run Code Online (Sandbox Code Playgroud)
谷歌搜索了问题,似乎标准shell没有像bash一样的数学运算符,如%(模数).我不确定为什么cron作业在脚本中失败了?我假设它是因为它没有使用bash shell?它肯定是由cron守护进程触发的(可以在/ var/log/syslog中看到它).任何帮助非常感谢.
我有一个名为"HomeCtrl"的控制器,它计算{{total}} 绑定变量中用户的总数,如下所示:
.controller('HomeCtrl', function($scope, $http){
$scope.total = 0;
});
Run Code Online (Sandbox Code Playgroud)
在我看来,我试图通过{{total}}在<div>标签上传递属性的值来在动画小部件中显示我的总数,如下所示:
<div ng-controller="HomeCtrl" ng-init="init('users')">
<div class="xe-widget xe-counter xe-counter-green" xe-counter
data-count=".num" data-from="1"
data-to= "{{total}}"
data-suffix="users" data-duration="3" data-easing="true">
<div class="xe-icon">
<i class="linecons-user"></i>
</div>
<div class="xe-label">
<strong class="num">1k</strong>
<span>Users Total </span>
</div>
</div>
<center> <b> Total utilisateurs : {{total}} </b> </center>
Run Code Online (Sandbox Code Playgroud)
这是widget指令:
.directive('xeCounter', function(){
return {
restrict: 'EAC',
link: function(scope, el, attrs)
{
var $el = angular.element(el),
sm = scrollMonitor.create(el);
sm.fullyEnterViewport(function()
{
var opts = {
useEasing: attrDefault($el, 'easing', …Run Code Online (Sandbox Code Playgroud) scala ×2
angularjs ×1
bash ×1
cron ×1
crontab ×1
data-binding ×1
javascript ×1
jquery ×1
sbt-web ×1
scala.js ×1