小编Dom*_*Dom的帖子

在辅助监视器上显示Windows窗体?

我正在尝试在辅助监视器上设置Windows窗体,如下所示:

private void button1_Click(object sender, EventArgs e)
{
    MatrixView n = new MatrixView();
    Screen[] screens = Screen.AllScreens;
    setFormLocation(n, screens[1]);
    n.Show();
}

private void setFormLocation(Form form, Screen screen)
{
    // first method
    Rectangle bounds = screen.Bounds;
    form.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height);

    // second method
    //Point location = screen.Bounds.Location;
    //Size size = screen.Bounds.Size;

    //form.Left = location.X;
    //form.Top = location.Y;
    //form.Width = size.Width;
    //form.Height = size.Height;
}
Run Code Online (Sandbox Code Playgroud)

边界的属性似乎是正确的,但在我尝试的两种方法中,这最大化了主监视器上的表单.有任何想法吗?

c# multiple-monitors winforms setbounds

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

如何在完成后删除Azure管道工件?

我有以下管道结构:

Job A --> Generate build files
Parallel:
  Job B --> Uses the build files
  Job C --> Uses the build files
Job D --> Publishes the build files
Job E --> Release
On finish, I want to delete the build files completely
Run Code Online (Sandbox Code Playgroud)

我不相信使用工件(因为上传/下载所花费的时间),但我似乎需要使用它才能跨作业使用文件

在管道结束时,我实际上不需要保留构建文件(又名工件),那么我如何在管道完成时简单地删除它们呢?

我正在使用azure-pipelines.yml

azure-devops azure-pipelines azure-pipelines-tasks azure-pipelines-yaml

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

类型错误:domain.enter 不是函数

描述我试图迁移到的错误Mikro-Orm,我已经被这个错误困扰了超过 3 天,该错误的问题是它不能帮助我知道它来自哪里,问题是它发生在随机区域,我评论了很多代码并试图隔离它的来源,但它是不可预测的。我做了很多研究,我想出了这个https://github.com/mysqljs/mysql/issues/1949https://github.com/sipcentric/node-pbx-client/issues/4,我唯一能想到的就是这mysql就是为什么我猜测 MikroOrm 可能会喜欢它。

任何专家的建议将不胜感激。

问题是我加粗的 Nestjs api 没有响应响应

堆栈跟踪

domain.js:547
  domain.enter();
         ^

TypeError: domain.enter is not a function
    at IncomingMessage.EventEmitter.emit (domain.js:547:10)
    at resume_ (_stream_readable.js:972:10)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Run Code Online (Sandbox Code Playgroud)

重现 我不知道它是如何发生的。

版本 以下是项目的所有依赖项:

 "dependencies": {
    "@angular/animations": "~10.1.4",
    "@angular/cdk": "^10.2.3",
    "@angular/common": "~10.1.4",
    "@angular/compiler": "~10.1.4",
    "@angular/core": "~10.1.4",
    "@angular/forms": "~10.1.4",
    "@angular/localize": "^10.0.4",
    "@angular/material": "^10.2.3",
    "@angular/platform-browser": "~10.1.4",
    "@angular/platform-browser-dynamic": "~10.1.4",
    "@angular/router": "~10.1.4",
    "@fortawesome/angular-fontawesome": "^0.7.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.30",
    "@fortawesome/free-brands-svg-icons": "^5.14.0",
    "@fortawesome/free-regular-svg-icons": "^5.14.0",
    "@fortawesome/free-solid-svg-icons": "^5.14.0",
    "@mikro-orm/core": "^4.3.4",
    "@mikro-orm/mariadb": "^4.3.4", …
Run Code Online (Sandbox Code Playgroud)

node.js nestjs mikro-orm

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

Nestjs Winston 日志文件是用颜色编码编写的

我面临与https://github.com/winstonjs/winston/issues/1416相同的问题,结果logger.info(\'Hello there. How are you?\');\xef\xbf\xbd[32minfo\xef\xbf\xbd[39m: \xef\xbf\xbd[32mHello there. How are you?\xef\xbf\xbd[39m

\n

我不知道在哪里colorize可以删除它,这是我的代码:

\n
  new winston.transports.File({\n    format: winston.format.combine(\n      winston.format.colorize({ // I added this but it\'s still not helping\n        all: false,\n        message: false,\n        level: false,\n      }),\n      winston.format.label({ label: \'API\' }),\n      winston.format.timestamp(),\n      winston.format.printf(({ level, message, label, timestamp }) => {\n        return `${timestamp} [${label}] ${level}: ${message}`;\n      }),\n    ),\n    filename: environment.logDirectory,\n    level: \'http\',\n    maxsize: 1024 * 1024 * 10,\n  }),\n
Run Code Online (Sandbox Code Playgroud)\n

在 中main.ts,我有

\n
import { WINSTON_MODULE_NEST_PROVIDER …
Run Code Online (Sandbox Code Playgroud)

winston nestjs express-winston

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