小编Ext*_*ion的帖子

我怎么能只提取一种产品风味?

问题:

当我执行gradle lint时,它会产生两种产品味道.一个没有准备好,所以它总是失败(并非所有的字符串都存在).

我想要的是:

我真的想要一些选择,只说这种产品的味道

gradle android-lint build.gradle android-gradle-plugin

7
推荐指数
1
解决办法
2132
查看次数

创建具有透明边框的按钮,该按钮仅位于按钮的第二部分

想要实现

我有一个0.8透明的标题和一个相同颜色的边框为0.8的按钮.

按钮需要对齐,以使中心等于标题的底部.

好

问题

当您在一个相同颜色的标题上放置一个0.8透明边框,并且0.8透明度时,它会变得更暗. 错误

可能解决方案

https://jsfiddle.net/extranion/fnz1ccf0/2/

* { 
    margin:0; padding:0; 
}
body { 
    background-image: url("http://gallery.photo.net/photo/8551440-md.jpg");
}
button { 
    background:none; border:none; 
}

header { 
    height:100px; 
    background-color: rgba(41, 52, 61, .8); 
}

.contact { 
    float:right; 
    height:100px; 
    width:200px; 
    position:relative; 
}

.wrap-btn { 
    position:absolute; 
    top:100%; 
    left:50px; 
    height:30px; 
    width:100px; 
    border-radius: 0 0 20px 20px; 
    background-color: rgba(41, 52, 61, .8); 
}
button { 
    position:absolute; 
    bottom:10px; 
    left:10px; 
    width:80px; 
    height:40px; 
    background:orange; 
    border-radius:15px; 
}
Run Code Online (Sandbox Code Playgroud)
<body>
    <header>
        <div class="contact">
            lorem ipsum
            <div class="wrap-btn">
                <button>inloggen</button>
            </div>
        </div>
    </header>
</body>
Run Code Online (Sandbox Code Playgroud)

题 …

css

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

如何在Swagger中为所有路径添加401响应

我有一个休息api,我想在Swagger中记录.在所有请求中,API都可以使用401响应.

因此,不是为每条路径一次又一次地再次定义401(不是那么干).我想定义所有路径都可以返回401.

这可能吗?

response swagger

4
推荐指数
2
解决办法
3172
查看次数

eslint解析错误:解析错误:意外的令牌=>

我正在使用支持ES6的节点v7.10.0,因此我没有透露我的代码.

ESLint v3.19.0 Parsing error: Unexpected token =>在以下代码中给出错误.

给出错误:

module.exports = {

    index: async (req, res) => {
        await functionThatReturnsSomePromise();
  }
}
Run Code Online (Sandbox Code Playgroud)

此外,当我只使用功能时,它会因错误而失败 Parsing error: Unexpected token function

给出错误:

module.exports = {

    index: async function(req, res) {
        await functionThatReturnsSomePromise();
  }
}
Run Code Online (Sandbox Code Playgroud)

当我定义这样的类时,linter不会抱怨它:

没有错误:

class test {

    testing() {
        async () => {
            console.log('test');
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

.eslintrc

{
  "extends": "eslint:recommended",
  "ecmaFeatures": {
    "binaryLiterals": true,                    // enable binary literals
     "blockBindings": true,                      // enable let and const (aka block bindings)
     "defaultParams": …
Run Code Online (Sandbox Code Playgroud)

asynchronous node.js async-await eslint

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