小编Sib*_*enu的帖子

致命:'commit.gpgsign' gitkraken 和 gitclients 的错误布尔配置值 'null'

我使用GitKraken作为我的 git 客户端,它总是工作正常,但几天来,fatal: bad boolean config value 'null' for 'commit.gpgsign'当我使用任何其他 git 客户端时,我会收到错误。我已经尝试过cmdvscodePowerShellvscodeGit GUI我也卸载GitKraken并尝试过,但我想它以某种方式保留了设置。您曾经遇到过这个问题吗?

git git-gui visual-studio-code azure-devops gitkraken

9
推荐指数
1
解决办法
3925
查看次数

webpack options 有一个未知属性“hotOnly”。选项对象无效。开发服务器已使用选项对象初始化

npx webpack-dev-server --mode development我正在我的应用程序中运行该命令react并收到上述错误。

[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'hotOnly'. These properties are valid:
Run Code Online (Sandbox Code Playgroud)

下面是我的webpack.config.js文件。

const path = require("path");
const webpack = require("webpack");

module.exports = {
  entry: "./src/index.js",
  mode: "development",
  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /(node_modules)/,
        loader: "babel-loader",
        options: {
          presets: ["@babel/env"],
        },
      },
      {
        test: /\.css$/,
        use: ["style-loader", "css-loader"],
      }, …
Run Code Online (Sandbox Code Playgroud)

build ecmascript-6 reactjs webpack webpack-dev-server

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

Angular translate service, interpolate params in nested json

In angular translation service, interpolating params in normal translation json works well. But in nested json, interpolating params is not working.

My JSON:

  "SampleField": {
    "SampleValidation": {
      "MIN": "Value should not be less than {{min}}", 
      "MAX": "Value should not be more than {{max}}", 
    }
  }
Run Code Online (Sandbox Code Playgroud)

My Angular Code:

ngOnInit(): void {
  this.translateService.get('SampleField.Validation', {
    // using hard coded value just as a sample
    min: 0, max: 2000
  }).subscribe(translation => {
    console.log(translation);
  });
}
Run Code Online (Sandbox Code Playgroud)

Expected Output:

{
    MIN: "Value should not be …
Run Code Online (Sandbox Code Playgroud)

javascript angular-translate ngx-translate angular

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

将vee-validate/HTML属性添加到插槽中的输入元素

在我的应用程序中,我有很多表单,大多数输入看起来都是这样的:

<div class="form-group">
    <label for="language">{{ $t('form.language')}}</label>
    <input type="text" class="form-control" id="language" name="form.language" v-model="language" v-validate.initial="'required'" :data-vv-as="$t('form.language')" />
    <span class="invalid-feedback">{{ errors.first('language') }}</span>
</div>
Run Code Online (Sandbox Code Playgroud)

这一遍又一遍地重复.唯一真正改变的是字段名称和输入类型.有时它是一个选择,有时它是一个更复杂的组件而不是简单的HTML组件.

我的想法是创建一些包装器组件.所以我不必复制所有这些,只需使用类似的东西:

<form-group name="language">
    <input type="text" v-model="form.language">
</form-group>
Run Code Online (Sandbox Code Playgroud)

我尝试以这种方式实现它,但它不起作用:

<template>
    <div class="form-group">
        <label :for="name">{{ $t('form.' + name)}}</label>
        <slot class="form-control"
              :id="name"
              :data-vv-name="name"
              v-validate.initial="'required'"
              :data-vv-as="$t('form.'+ name)">
        </slot>
        <span class="invalid-feedback">{{ errors.first(name) }}</span>
    </div>
</template>

<script>
    export default {
        props: ['name']
    }
</script>
Run Code Online (Sandbox Code Playgroud)

你有什么想法?问题是我无法轻松地将mixins和props传递给slotted元素/组件.

javascript vue.js vue-component vuejs2 vee-validate

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

值不能为空.参数名称:Visual Studio 2017中的userContext

我面临一个奇怪的问题,当点击工具菜单下的扩展和更新时,收到一条消息"值不能为空.参数名称为userContext".

在此输入图像描述

请告诉我这个问题的解决方法是什么.谢谢.

windows-update visual-studio windows-7 windows-10 visual-studio-2017

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

Assembly.Load和Assembly.LoadFrom差异?

我的应用程序通过AppDomain.CurrentDomain.AssemblyResolve事件加载它需要的程序集.程序集是执行程序集的资源.

private static Assembly OnResolveAssembly(object sender, ResolveEventArgs args)
{
    var executingAssembly = Assembly.GetExecutingAssembly();
    var assemblyName = new AssemblyName(args.Name);
    var resPath = assemblyName.Name + ".dll";

    using (var stream = executingAssembly.GetManifestResourceStream(resPath))
    {
        if (stream != null)
        {
            byte[] buffer = new byte[stream.Length];
            stream.Read(buffer, 0, buffer.Length);

            return Assembly.Load(buffer);
        }
    }

    return null;
}
Run Code Online (Sandbox Code Playgroud)

通常这工作正常,但正在加载的程序集包含某些控件的默认样式,这些控件将不会被应用.但是,如果我不通过Assembly.Load加载程序集,但将其保存到文件并通过Assembly.LoadFrom一切正常加载它.

那些有什么区别?为什么在直接从内存加载程序集时不起作用 - 或者为什么在首次将其保存到磁盘然后加载它时它Assembly.LoadFrom是否有效?

我很困惑,我想直接从内存加载程序集而不先保存它们.

c# wpf .net-assembly

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

如何解决这个错误?-'Resource.Layout'不包含axml文件的定义

Xamarin的新手,目前正在使用Youtube的教程构建一个非常简单的应用程序。即使在我认真遵循所有说明的情况下,遇到错误时,也只是在视频中间。甚至视频中的讲师也能够成功运行他的应用

单击此以获得图像参考

这是我得到错误的代码:

var view = inflater.Inflate(Resource.Layout.SignUp, container, false);
Run Code Online (Sandbox Code Playgroud)

xamarin.android android-fragments xamarin

6
推荐指数
3
解决办法
4305
查看次数

vscode 中的launch.json 中不允许使用属性参数

我只是想一些基本的配置添加到我的launch.json文件vscode,但我得到一个错误的属性参数表是不允许的。下面是我的配置。

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "attach",
            "name": "index",         
            "args": [
                "src/index.ts"
            ],
            "cwd": "${workspaceFolder}"           
        }
    ],
    "compounds": []
}
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

json typescript visual-studio-code vscode-settings vscode-debugger

6
推荐指数
1
解决办法
9062
查看次数

Microsoft 图返回“访问令牌为空”

我发布了这个请求:

 
POST https://login.microsoftonline.com:443/{my-tennant-here}/oauth2/v2.0/token HTTP/1.1
Host: login.microsoftonline.com 
Content-Type: application/x-www-form-urlencoded

client_id={client id here}
&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default
&client_secret={client secret here}
&grant_type=client_credentials
 

这将返回:

 
{
  "token_type": "Bearer",
  "expires_in": 3599,
  "ext_expires_in": 0,
  "access_token": "eyJ0eX......
}
 

我已经使用 jwt.io 解码了令牌,它绝对不是空的。它包含 14 个声明。aud, iss, tid 等...

然后我在此请求中使用访问令牌

 
GET https://graph.microsoft.com/v1.0/users
Athorization: Bearer eyJ0eX...
 

然后我得到一个 401 Unauthorized 这个机构:

 
{
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "Access token is empty.",
    "innerError": {
      "request-id": "",
      "date": "2018-08-14T15:41:44"
    }
  }
}
 

预期结果是 200 Ok,正文包含用户列表

这是否仅仅意味着我的应用程序未经授权,并且错误消息只是具有误导性(访问令牌为空)?还是我做错了什么?

更新:我注意到虽然令牌确实包含声明,但它没有范围声明,这对我来说似乎有点奇怪。我会假设它具有 User.Read.All 范围。应用程序(客户端 ID/客户端机密)应该具有此权限。我收到的令牌中的声明具有以下声明:

 
aud: "https://graph.microsoft.com",
iss: "https://sts.windows.net/my tennant …
Run Code Online (Sandbox Code Playgroud)

authentication azure azure-active-directory azure-ad-msal microsoft-graph-api

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

错误:与 Azure DevOps 中的指定模式 Azure Function Release Pipeline 匹配的包不止一个

我已经成功地build为我的Azure Functionin配置了管道配置Azure DevOps。现在我正在配置一个带有Azure App Service Deploy任务的发布管道,我总是收到一个错误为“ Error: More than one package matched with specified pattern: d:\a\r1\a\**\*.zip. Please restrain the search pattern.

在此处输入图片说明

有人遇到过这个问题吗?任何帮助都非常感谢。

devops azure-devops azure-functions azure-pipelines azure-pipelines-release-pipeline

6
推荐指数
1
解决办法
3825
查看次数