小编Geo*_*nos的帖子

docker compose和kubernetes之间有什么区别?

虽然潜入Docker,Google Cloud和Kubernetes,但还没有清楚地理解它们中的所有三个,在我看来这些产品是重叠的,但它们不兼容.

例如,需要重新编写docker-compose文件,以便可以将应用程序部署到Kubernetes.

有人可以提供一个高级粗略描述Docker,Docker-Compose,Docker Cloud和Kubernetes重叠的位置以及哪一个依赖于另一个?

docker kubernetes docker-compose

236
推荐指数
5
解决办法
4万
查看次数

在Bash命令提示符下添加git branch

我尝试在bash提示符下添加我正在处理(签出)的git分支但没有成功..(同时保持我当前的路径显示活动目录/文件完好无损)我家里有一个.bashrc文件,但我也看到很多人提到.profile文件..

git bash ubuntu

159
推荐指数
8
解决办法
11万
查看次数

当position:fixed应用时,是否可以保持父元素的宽度?

当我们应用于position:fixed一个元素时,它被取出文档的正常流程,因此它不尊重它的父元素宽度.如果将其声明为百分比,是否有办法使其继承父级的宽度?(下面的工作用例)

let widthis = $('.box').width();
$('.dimensions').text(`width is ${widthis}`);

$('button').on('click', function() {
  $('.box').toggleClass('fixed');
  let widthis = $('.box').width();
  $('.dimensions').text(`width is ${widthis}`);
});
Run Code Online (Sandbox Code Playgroud)
.container {
  max-width: 500px;
  height: 1000px;
}

.box {
  background-color: lightgreen;
}

.fixed {
  position: fixed;
}

.col-1 {
  border: 1px solid red;
  float: left;
  width: 29%;
}

.col-2 {
  border: 1px solid pink;
  float: left;
  width: 69%;
}
Run Code Online (Sandbox Code Playgroud)
<link href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Click this to toggle position fixed for the …
Run Code Online (Sandbox Code Playgroud)

css position css-position

49
推荐指数
4
解决办法
5万
查看次数

如何同时编辑单词的所有突出显示的实例?

在Notepad ++中,无论何时在HTML文档(或CSS)中选择任何单词,都会自动突出显示类似的单词.

我可以使用快捷方式一次编辑所有这些突出显示的片段吗?

在Notepad ++中突出显示了

keyboard-shortcuts notepad++

31
推荐指数
3
解决办法
5万
查看次数

CSS特异性,媒体查询和最小宽度

我正在重新设计我的博客,其中考虑了响应式网页设计,以及"移动优先"方法 - 简而言之,我正在尝试使用min-width来避免任何类型的复制或css ..没有显示:无等等.

我的问题是,当我确实需要覆盖CSS值时,较低的最小宽度优先.例:

@media only screen and (min-width: 600px) {
    h2 { font-size: 2.2em; }
}

@media only screen and (min-width: 320px) {
    h2 { font: normal 1.7em/2.1em Helvetica, sans-serif; }
}
Run Code Online (Sandbox Code Playgroud)

我期待当我在600px及以上的分辨率下得到2.2em h2,但我得到1.7em ..在我的开发工具中,我看到2.2em声明在那里,但另一个优先.这没有意义!

我可以继续使用最小宽度并有效地覆盖较高分辨率的声明而不使用更强的选择器或最大宽度..?

css css-specificity css3 media-queries

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

WebDriverError:已断开连接:无法连接到渲染器

元 -

操作系统:OSX 10.12.6(16G29)

~./node_modules/chromedriver/bin/chromedriver  -v
ChromeDriver 2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061)

~ $ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7/Contents/Home

~ $ node -v
v6.11.2
Run Code Online (Sandbox Code Playgroud)

浏览器:

Chrome版本62.0.3202.62(官方版)(64位)

浏览器版本:

62.0.3202.62(官方版)(64位)

预期行为 -

应该启动Chrome会话,脚本应该执行到最后

实际行为 -

浏览器已启动,但脚本已崩溃.

码:

> ucb-client@2.97.3 selenium-local /Users/Georgios/Development/rocket-internet/ucb-client
> node test/automation-tests/testcases/happy-path/Local_Guest_Cash.js

/Users/Georgios/Development/rocket-internet/ucb-client/node_modules/selenium-webdriver/lib/promise.js:2634
        throw error;
        ^

WebDriverError: disconnected: unable to connect to renderer
  (Session info: chrome=62.0.3202.62)
  (Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X 10.12.6 x86_64)
    at WebDriverError (/Users/Georgios/Development/rocket-internet/ucb-client/node_modules/selenium-webdriver/lib/error.js:27:5)
    at Object.checkLegacyResponse (/Users/Georgios/Development/rocket-internet/ucb-client/node_modules/selenium-webdriver/lib/error.js:529:15)
    at parseHttpResponse (/Users/Georgios/Development/rocket-internet/ucb-client/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/Users/Georgios/Development/rocket-internet/ucb-client/node_modules/selenium-webdriver/lib/http.js:441:30)
    at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.manage().window().setSize(1280, 720)
    at thenableWebDriverProxy.schedule …
Run Code Online (Sandbox Code Playgroud)

selenium selenium-chromedriver selenium-webdriver

22
推荐指数
2
解决办法
3万
查看次数

更改开发人员工具Font Face(系列)

经过几个小时的研究,我放弃了.

是否有任何直接的方法来破解Dev Tools并更改他们使用的字体系列?我花了很多时间看着这个窗口,所以如果我能使用我选择的等宽字体,我会很高兴.

google-chrome-devtools

15
推荐指数
3
解决办法
1万
查看次数

如何在流星期间准备好DOM后执行辅助函数

我有一个<li>使用Meteor.startup填充find()的列表,如下所示.然后我<li>使用data()获取这些数据的所有数据属性并将其放入一个对象并尝试返回/ console.log,以便我可以看到它是否有效.但是我得到null了结果.

    Meteor.startup(function () {
    Template.messages.lists = function () {
        var allitems = lists.find();
        return allitems;
    };
    var map;
    map = new GMaps({
        div: '#map_canvas',
        lat: -12.043333,
        lng: -77.028333
    });
    var lat = map.getCenter().lat();
    var lng = map.getCenter().lng();
    map.addMarker({
        lat: lat,
        lng: lng,
        draggable: true,
        title: 'Test',
        dragend: function (e) {
            $('#lat').val(this.getPosition().lat());
            $('#lng').val(this.getPosition().lng());
        }
    });
    console.log(getMarkers());
});


function getMarkers() {
    var coordinates = {};
    coordinates = $('li.message').data();
    return coordinates;
}
Run Code Online (Sandbox Code Playgroud)

我直接在我的控制台中尝试了相同的操作 - 我得到了一个对象 - …

javascript meteor

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

在Meteor中提交表单而不使用额外内容

我想在我的Meteor html模板中有一个表单,并在提交时将该数据插入我的MongoDB列表.我的问题是:

  • 这可能不使用额外的包吗?我可以只添加一个HTML表单作为模板吗?
  • on submit事件是否适用于最新的Meteor?
  • 我已经读过,我们可以使用click事件作为提交按钮:你能告诉我如何在DOM中查找输入元素的值吗?(不使用jQuery?)

forms onsubmit meteor

12
推荐指数
3
解决办法
1万
查看次数

即使内容小于视口,min-height 100vh也会创建垂直滚动条

我正在申请min-height: 100vh;一个flexbox容器,当我使用时,我得到一个垂直滚动条justify-content: space-around;

我不想强制高度,但我不明白为什么滚动条在那里,因为内容的尺寸小于视口.

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
}
.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
Run Code Online (Sandbox Code Playgroud)
<link href="https://necolas.github.io/normalize.css/5.0.0/normalize.css" rel="stylesheet"/>
<div class="wrapper">
  <div>
    <h1>min-height: 100vh;</h1>
    <h2>why is there a scrollbar here?</h2>
  </div>
  <div>
    Be sure to expand window. 
    <a href="#">skill one</a>
    <a href="#">skill one</a>
    <a href="#">skill one</a>
    <a href="#">skill one</a>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

html css flexbox viewport-units

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