小编Tin*_*say的帖子

模块警告 Angular Material 主题应从包含键颜色、版式、密度的地图创建

我正在从 Angular 14 更新到 15 以及 Material UI

\n

看到这个警告,目前还没有找到解决办法。

\n

Angular Material 主题应从包含“颜色”、“版式”、\xc2\xa0\n 和“密度”键的地图创建。颜色值应该是包含“primary”、“accent”和“warn”调色板值的映射。有关更多信息,请参阅https://material.angular.io/guide/theming。\xc2\xa0

\n

有人能指出我正确的方向吗?

\n

我的package.json

\n
{\n  "name": "memphis",\n  "version": "0.0.0",\n  "scripts": {\n    "ng": "ng",\n    "start": "ng serve",\n    "build": "ng build",\n    "test": "ng test",\n    "testci": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng test --karma-config src/karma-ci.conf.js --code-coverage",\n    "testci2": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng test --karma-config src/karma-ci.conf.js --code-coverage",\n    "lint": "ng lint",\n    "e2e": "ng e2e"  },\n  "private": true,\n  "dependencies": {\n    "@amcharts/amcharts4": "^4.10.33",\n    "@angular/animations": "^15.1.2",\n    "@angular/cdk": "^15.1.2",\n    "@angular/common": "^15.1.2",\n    "@angular/compiler": "^15.1.2",\n    "@angular/core": "^15.1.2",\n    "@angular/forms": "^15.1.2",\n …
Run Code Online (Sandbox Code Playgroud)

sass angular-material angular angular15

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

如何使用 Angular 拦截器和管道来获取需要基本身份验证标头的图像的 http 请求

我正在尝试使用 Angular 拦截器和管道通过将图像 src 的基本授权标头传递到远程服务器来访问图像。我正在使用 .json 文件形式的图像路径。它对我不起作用,因为我可能错过了一些东西。

当我从变量获取图像路径时,我不确定如何在图像 src 标记中提供管道名称。

** src="image.imagePath |安全| 异步" **

谁能帮我解决这个问题吗?主要目的是访问远程服务器上存在的图像,这需要角度 UI 中的基本授权。

auth.interceptor.ts

import { Injectable } from '@angular/core';
import {  HttpRequest,  HttpHandler,  HttpEvent,  HttpInterceptor} from '@angular/common/http';
import { Observable } from 'rxjs';

@Injectable()
export class AuthInterceptor implements HttpInterceptor {

  intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {

      request = request.clone(
        {setHeaders: {'Authorization': 'Basic ' + btoa('username:password')}
      });
      
    console.log('processing request', request);
      return next.handle(request);
  }
}
Run Code Online (Sandbox Code Playgroud)

安全.pipe.ts

import { Pipe, PipeTransform } from '@angular/core';
import { HttpClient …
Run Code Online (Sandbox Code Playgroud)

angular-material angular

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

如何从给定的日期集中找到每个月的最少日期

我需要从每个提到的月份的给定日期数组中提取最少的日期。

示例-日期格式为dd / MM / yyyy以下是示例输入

04/11/2019,  11/11/2019, 18/11/2019, 25/11/2019, 02/12/2019, 09/12/2019, 
06/01/2020, 03/02/2020, 10/02/2020, 17/02/2020, 24/02/2020, 02/03/2020, 
09/03/2020, 16/03/2020, 23/03/2020, 30/03/2020, 06/04/2020, 13/04/2020, 
20/04/2020, 27/04/2020
Run Code Online (Sandbox Code Playgroud)

我需要从每个月获取最少的日期:

输出像-

04/11/2019, 02/12/2019, 06/01/2020, 03/02/2020, 02/03/2020, 06/04/2020
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?

java sorting date

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

在postman pre-script中发送Post请求

我正在尝试使用邮递员在预脚本中发送 POST 请求,但收到错误“评估预请求脚本时出现错误:错误:意外标记 '<' at 1:1 ^”。不知道出了什么问题。谁能帮我这个?

pm.sendRequest({
url: 'http://localhost:8001/routes/d6b7a95a-fd91-4f8a-b8f6-10835f30170a',
method: 'PATCH',
headers: {"Content-Type": "application/json"},
body: { 
    mode: 'raw',
    raw:JSON.stringify({
        "protocols":["http","https"],
        "paths":["/target-paymentoriginal"],
        "methods":[]})}  }, 

function (err, response) {  console.log("Updated original route to target-payment"+response.json());  });
Run Code Online (Sandbox Code Playgroud)

postman postman-pre-request-script

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

Kong API网关的最佳日志记录插件,可利用现有的ELK堆栈日志

谁能帮我从所有可用选项(如 Tcp Log、Udp Log、Http Log、File Log、Syslog、Statsd、Loggly 等)中选择一个可以利用现有 ELK 堆栈日志的 Kong API Gateway 日志插件?

kong kong-plugin elk

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

SassError:调色板中不存在色调“100”。可用的色调有:原色、强调色、对比色

我正在从 Angular 12更新到 13。

\n

看到这个错误,目前还没有找到解决办法。有人能指出我正确的方向吗?

\n

我的package.json

\n
{\n  "name": "test-app",\n  "version": "0.0.0",\n  "scripts": {\n    "ng": "ng",\n    "start": "ng serve",\n    "build": "ng build",\n    "test": "ng test",\n    "testci": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng test --karma-config src/karma-ci.conf.js --code-coverage",\n    "testci2": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng test --karma-config src/karma-ci.conf.js --code-coverage",\n    "lint": "ng lint",\n    "e2e": "ng e2e"\n  },\n  "private": true,\n  "dependencies": {\n    "@amcharts/amcharts4": "^4.3.13",\n    "@angular/animations": "^12.2.17",\n    "@angular/cdk": "^12.2.13",\n    "@angular/common": "^12.2.17",\n    "@angular/compiler": "^12.2.17",\n    "@angular/core": "^12.2.17",\n    "@angular/forms": "^12.2.17",\n    "@angular/material": "^12.2.13",\n    "@angular/material-moment-adapter": "^12.2.13",\n    "@angular/platform-browser": "^12.2.17",\n    "@angular/platform-browser-dynamic": "^12.2.17",\n    "@angular/router": "^12.2.17",\n    "@mat-datetimepicker/core": …
Run Code Online (Sandbox Code Playgroud)

css sass angular-material angular13

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

.net core 3.1 Bearer error="invalid_token", error_description="受众'空'无效"

我有 3 个项目 1-Angular SPA 2-Web API 项目核心 3.1,3-IdentityServer with Core 3.1 但我收到以下错误

> www-authenticate: Bearer error="invalid_token", error_description="The audience 'empty' is invalid"
Run Code Online (Sandbox Code Playgroud)

这是我的 API 启动

 public void ConfigureServices(IServiceCollection services)
        {
            services.Configure<SchemaRegistryConfig>(Configuration.GetSection("SchemaRegistryConfig"));


            //identity server

            services.AddAuthentication(options =>
                {
                    options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
                    options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
                })
                .AddJwtBearer("Bearer", options =>
                {
                    options.Authority = "https://localhost:5002/";
                    options.RequireHttpsMetadata = false;
                    options.Audience = "Api";
                });


            IdentityModelEventSource.ShowPII = true;

           
            services.AddCors(c =>
            {
                c.AddPolicy("AllowOrigin", options => options.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
            });

            services.AddMvc(config =>
            {
                config.Filters.Add(typeof(UnhandledExceptionFilter));
                config.EnableEndpointRouting = false;
            }).SetCompatibilityVersion(CompatibilityVersion.Latest);

            services.AddServices(Configuration);
            services.AddHealthChecksUI();                
            
          
        }

        
        [Obsolete] …
Run Code Online (Sandbox Code Playgroud)

jwt asp.net-identity .net-core identityserver4

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

在整数索引POI Java中翻译letter(char)索引

如何将Excel单元格AA转换为26,AB转换为27?Apache POI是否可以使用字母中的列索引并将其转换为整数表示形式?

如果我将“ AA”作为参数传递给输入函数,则要获取索引的整数值,它将返回26。

java apache-poi

0
推荐指数
1
解决办法
28
查看次数