小编Fra*_*nni的帖子

在Terminal/iTerm中使用HotKey切换不透明度

有没有办法设置热键来改变终端或iTerm的不透明度?我通常使用低百分比的不透明度,能够快速打开和关闭会很好.

编辑:没有一些可定制性,Cmd + U基本上是相同的

transparency terminate opacity iterm2

9
推荐指数
2
解决办法
2694
查看次数

多个$ http.get请求w /每个JSON文件在HTML中被h1拆分

我正在构建我的第一个Angular应用程序,使用$ http.get从github中提取原始json文件,每个json文件的输出在HTML中的标题之间分配.我的代码正在工作,但是非常冗余,我希望它可以被重构.

我的控制器看起来像这样:

.controller('mycontroller', function($scope, $http) {
  var firstUrl ='https://raw.githubusercontent.com/user/repo/master/first.json';
  var secondUrl ='https://raw.githubusercontent.com/user/repo/master/second.json';
  var thirdUrl ='https://raw.githubusercontent.com/user/repo/master/third.json';
  var fourthUrl ='https://raw.githubusercontent.com/user/repo/master/fourth.json';
  var fifthUrl ='https://raw.githubusercontent.com/user/repo/master/fifth.json';
  var sixthUrl ='https://raw.githubusercontent.com/user/repo/master/sixth.json';

  $http.get(firstUrl).success(function(data) {
      $scope.firsts = data;
  });

  $http.get(secondUrl).success(function(data) {
      $scope.seconds = data;
  });

  $http.get(thirdUrl).success(function(data) {
      $scope.thirds = data;
  });

  $http.get(fourthUrl).success(function(data) {
    $scope.fourths = data;
  });

  $http.get(fifthUrl).success(function(data) {
    $scope.fifths = data;
  });

  $http.get(sixthUrl).success(function(data) {
    $scope.sixths = data;
  });
});
Run Code Online (Sandbox Code Playgroud)

我的HTML看起来像这样:

 <div ng-controller="mycontroller" id="content" class="container">
          <br/>
          <div ng-repeat="first in firsts" class="panel panel-default">
              <h1 id="first">first</h1>
              <div class="panel-heading">
                  <h1><a href="{{first.url}}">{{first.company}}</a></h1> …
Run Code Online (Sandbox Code Playgroud)

html javascript json angularjs

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

标签 统计

angularjs ×1

html ×1

iterm2 ×1

javascript ×1

json ×1

opacity ×1

terminate ×1

transparency ×1