小编Sib*_*enu的帖子

如何解决这个错误?-'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
查看次数

如何读取环境变量在ASP.NET核心2.0 + Docker中?

我有ASP.NET核心2.0 webAPI和使用Mysql数据库.所以我在application.json文件中配置"ConnectionString" .当我在本地运行它时,我能够读取连接字符串并且应用程序正常运行.但是当我尝试使用Docker工具箱部署到docker时,情况并非如此.我写了三个文件: -

  1. Dockerfile
  2. DockerCompose
  3. Proxy.Conf

我正在使用docker compose文件,因为我必须在ngnix服务器上运行.我能够构建图像,并运行它.现在我试图覆盖docker-compose文件中的连接字符串,但它没有被覆盖.

DockerFile

FROM microsoft/aspnetcore:2.0
ARG source
WORKDIR /app
COPY $source .
EXPOSE 5000
ENTRYPOINT ["dotnet", "xx.dll"]
Run Code Online (Sandbox Code Playgroud)

泊坞窗,compose.yaml

version: '2'
services:
    app:
        container_name: cp-api
        build: .
        environment:
        - "ConnectionStrings:Test=server=192.168.99.101; port=3306; user=root; password=X123; database=TestDb; TreatTinyAsBoolean=true;"
    rev-proxy:
        container_name: rev-proxy
        image: nginx
        ports:
         - "9090:8080"
        volumes:
         - ./proxy.conf:/etc/nginx/conf.d/default.conf`
Run Code Online (Sandbox Code Playgroud)

Proxy.conf

server {
    listen 8080;

    location / {
      proxy_pass http://cp-api:5000;
    }
}
Run Code Online (Sandbox Code Playgroud)

appsetting.json: -

{
  "ConnectionStrings": {
    "EcallDbNextGen": "server =192.168.99.100; port =3306; user =root; password =xxx; …
Run Code Online (Sandbox Code Playgroud)

asp.net environment-variables docker dockerfile docker-compose

6
推荐指数
0
解决办法
3747
查看次数

MessagingEntityNotFoundException:找不到消息实体“ihsuprodsgres029dednamespace:eventhub:”

我只是尝试使用 Azure IOT Hub 将我的设备连接到云。但我收到如下错误。

MessagingEntityNotFoundException:找不到消息实体“ihsuprodsgres029dednamespace:eventhub:iothub-ehub-”。TrackingId:4772b610-8ff3-4709-8ea9-ffcd5784fe1c_B4,SystemTracker:ihsuprodsgres029dednamespace:eventhub:iothub-ehub-sibeeshiot-176205-a588b66686~16383 | team01,时间戳:2017年6月23日3:07:54 PM TrackingId:41110b704d814af497fd9924da6714d8_G4,SystemTracker :gateway2,时间戳:6/23/2017 3:07:55 PM,参考 ID:41110b704d814af497fd9924da6714d8_G4

如果您遇到过同样的问题,您能帮我解决一下吗?下面是我正在尝试的代码。

static void Main(string[] args) {
    Console.WriteLine("Receive messages. Ctrl-C to exit.\n");
    eventHubClient = EventHubClient.CreateFromConnectionString(connectionString, iotHubD2cEndpoint);

    var d2cPartitions = eventHubClient.GetRuntimeInformation().PartitionIds;

    CancellationTokenSource cts = new CancellationTokenSource();

    System.Console.CancelKeyPress += (s, e) = >{
        e.Cancel = true;
        cts.Cancel();
        Console.WriteLine("Exiting...");
    };

    var tasks = new List < Task > ();
    foreach(string partition in d2cPartitions) {
        tasks.Add(ReceiveMessagesFromDeviceAsync(partition, cts.Token));
    }
    Task.WaitAll(tasks.ToArray());
}
private static async Task ReceiveMessagesFromDeviceAsync(string partition, CancellationToken ct) {
    var eventHubReceiver …
Run Code Online (Sandbox Code Playgroud)

c# azure azure-web-app-service azure-iot-hub azure-iot-sdk

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

文件:'package.json' 严重性:'警告'消息:'加载引用时出现问题'':无法从''加载架构:无法连接到

我的 VSCode 中出现一个奇怪的错误,如下所示。

文件:'file:///d%3A/SVenu/FullStackDevelopment/ProjectCode_Skeleton_University_ERP_v2/assoc/package.json' 严重性:'警告'消息:'加载引用时出现问题' http://json.schemastore.org/package ':无法从“ http://json.schemastore.org/package ”加载架构:无法连接到 http://json.schemastore.org/package。错误:连接 ECONNREFUSED 137.117.17.70:80' 位于:'1,1' 源:''

在此输入图像描述

谁能告诉我这个问题的原因是什么?

这是我的package.json文件内容。

{
  "name": "Server",
  "version": "1.0.0",
  "description": "Server",
  "main": "server.js",
  "scripts": {
    "test": "mocha"
  },
  "repository": {
    "type": "git",
    "url": "git"
  },
  "keywords": [
    "Server"
  ],
  "dependencies": {
    "body-parser": "^1.12.4",
    "cors": "^2.7.1",
    "express": "^4.11.0",
    "http-status": "^0.2.0",
    "mongoose": "^4.4.12"
  },
  "devDependencies": {
    "chai": "^4.1.2",
    "mocha": "^4.0.1"
  }
}
Run Code Online (Sandbox Code Playgroud)

node.js npm package.json visual-studio-code npm-install

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

如何在jenkinsfile中硬链接文件

我的总体目标是,从S3同步文件,然后硬链接以避免"多个副本"并在构建docker容器时节省空间.这是我到目前为止所拥有的

withAWS(region: 'us-east-1') {
    s3Download(
        bucket: 'artifacts.mydomain.tld',
        file: "${env.ORACLE_RPM}",
        path: "${env.HOME}/${env.ORACLE_RPM}",
    )
    script {
        linkBlocking("etc/docker/${env.PROJECT}/${env.ORACLE_RPM}", "${env.HOME}/${env.ORACLE_RPM}")
    }
}
Run Code Online (Sandbox Code Playgroud)

这些s3Download作品虽然我不确定如果有更新的版本可以更新文件.

但是,当我尝试使用FileSystem该类时,我实际上无法找出正确的调用约定,构造函数至少似乎未被记录.

groovy jenkins-pipeline jenkins-declarative-pipeline

5
推荐指数
0
解决办法
320
查看次数

系统.安全.加密.SHA256Cng .NET Core

我有一个 .net core 应用程序作为控制台,我正在尝试从 Azure Db 获取一些值。该代码在 .NET Framework(标准)上完美运行,我总是能获取数据,但我需要使用 .NET Core。简而言之,我有一种从另一个(.dll)获取配置的方法,每次遇到异常时:

例外

System.AggregateException: 'One or more errors occurred. (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.)'
Run Code Online (Sandbox Code Playgroud)

我知道.NET Core有System.Core,但它没有“SHA256Cng”,只有“SHA256”。也许我可以使用 .net Framework .dll 还是有其他方法来解决这个问题?附言。仅需要使用 .NET Core(.net 控制台应用程序和其他)。

方法

public ITenantConfigurationProvider CreateTenantConfigurationProvider(ITenantClient client, string tenantId)
        {
            return client.GetConfigAsync(tenantId).Result;
        }
Run Code Online (Sandbox Code Playgroud)

c# dll sha256 azure .net-core

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

出现一个或多个错误,无法启动调试适配器 Visual Studio 2019

从今天早上开始,我的 Visual Studio 表现得很奇怪。每当我运行项目时,我都会收到错误“一个或多个错误无法启动调试适配器”。

在此处输入图片说明

我运行我的项目配置文件,而不是在 IIS Express 配置文件中运行它。这是我的launchSettings.json文件。

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:65498",
      "sslPort": 44318
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "<ProjectName>": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "https://localhost:5001;http://localhost:5000"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

当我检查输出窗口时,这就是我得到的。

程序“[22052] .exe”已退出,代码为 -1 (0xffffffff)。

我注意到的另一件事是打开了一个没有任何 URL 的新浏览器选项卡,只是一个about:blank页面。

ide development-environment visual-studio asp.net-core visual-studio-2019

5
推荐指数
2
解决办法
4164
查看次数

找不到模块“prismjs/components/prism-core”vue-prism-editor 的声明文件

我只是尝试在我的应用程序中使用这个包(vue-prism-editorvuejs 3,但我总是收到如前所述的错误。

TS7016: Could not find a declaration file for module 'prismjs/components/prism-core'. 'C:/Sibeesh/GitHub/vue-resume/node_modules/prismjs/components/prism-core.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/prismjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'prismjs/components/prism-core';` 
Run Code Online (Sandbox Code Playgroud)

我确实安装了,@types/prismjs但没有运气。我跟着自述文件中提到的步骤进行了完全相同的尝试。

下面是我的package.json文件。

{
  "name": "vue-resume",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "jsoneditor": "^9.2.0",
    "vue": "^3.0.0",
    "vue-class-component": "^8.0.0-0",
    "vue-prism-editor": "^2.0.0-alpha.2", …
Run Code Online (Sandbox Code Playgroud)

vue.js vue-component vuejs2 vuejs3 vue-prism-editor

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

如何使框在 `.flex-col` Tailwindcss 中居中对齐?

我想.flex-col使用顺风 CSS 使这个框对齐到内部中心。

在此输入图像描述

我努力了:

<div data-v-bca28ca2="" data-v-925ac5ae="" class="flex justify-center flex-col">
    <a data-v-bca28ca2="" class="w-full md:w-1/2 lg:w-1/4 my-2 py-4 text-center border-2 rounded">
        <div data-v-bca28ca2="" class="flex ml-4">
            <label data-v-bca28ca2="" class="fa fa-circle-o"></label> <span data-v-bca28ca2="" class="w-full">Client Services</span></div>
    </a>
    <a data-v-bca28ca2="" class="w-full md:w-1/2 lg:w-1/4 my-2 py-4 text-center border-2 rounded">
        <div data-v-bca28ca2="" class="flex ml-4">
            <label data-v-bca28ca2="" class="fa fa-circle-o"></label> <span data-v-bca28ca2="" class="w-full">Human Capital</span></div>
    </a>
    <a data-v-bca28ca2="" class="w-full md:w-1/2 lg:w-1/4 my-2 py-4 text-center border-2 rounded">
        <div data-v-bca28ca2="" class="flex ml-4">
            <label data-v-bca28ca2="" class="fa fa-circle-o"></label> <span data-v-bca28ca2="" class="w-full">Media</span></div>
    </a> …
Run Code Online (Sandbox Code Playgroud)

html css flexbox tailwind-css

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

使用ngFor的角度动态表

我想知道是否可以从JSON数据创建动态HTML表.列和标头的数量应根据JSON中的键进行更改.例如,这个JSON应该创建这个表:

{
     color: "green", code: "#JSH810"
 }

 ,
 {
     color: "red", code: "#HF59LD"
 }

 ...
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

这个JSON应该创建这个表:

{
    id: "1", type: "bus", make: "VW", color: "white"
}

,
{
    id: "2", type: "taxi", make: "BMW", color: "blue"
}

...
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

这必须是100%动态,因为我想显示数百个不同的JSON对象,因此HTML页面中不应对任何内容进行硬编码.

html ngfor angular

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