我刚刚开始在一个已经存在的项目上使用 Docker(它运行到 Docker 容器中)。我没有太多的 Docker 背景 - 我只是通过 GUI 通过按“播放”按钮来使用它。
现在我有一个项目运行到容器中,但我在启动它时遇到了困难。
我收到此错误:
[2022-03-31T15:30:27.408Z] Error: Command failed: docker-compose -f c:\Users\Octavian\Desktop\django-analyzer\docker-compose.dev.yml config
[2022-03-31T15:30:27.408Z] at Ru (c:\Users\Octavian\.vscode\extensions\ms-vscode-remote.remote-containers-0.231.1\dist\spec-node\devContainersSpecCLI.js:209:813)
[2022-03-31T15:30:27.408Z] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-03-31T15:30:27.408Z] at async dR (c:\Users\Octavian\.vscode\extensions\ms-vscode-remote.remote-containers-0.231.1\dist\spec-node\devContainersSpecCLI.js:181:643)
[2022-03-31T15:30:27.408Z] at async hR (c:\Users\Octavian\.vscode\extensions\ms-vscode-remote.remote-containers-0.231.1\dist\spec-node\devContainersSpecCLI.js:178:2075)
[2022-03-31T15:30:27.408Z] at async RR (c:\Users\Octavian\.vscode\extensions\ms-vscode-remote.remote-containers-0.231.1\dist\spec-node\devContainersSpecCLI.js:223:2195)
[2022-03-31T15:30:27.408Z] at async Jw (c:\Users\Octavian\.vscode\extensions\ms-vscode-remote.remote-containers-0.231.1\dist\spec-node\devContainersSpecCLI.js:223:3221)
[2022-03-31T15:30:27.409Z] at async TR (c:\Users\Octavian\.vscode\extensions\ms-vscode-remote.remote-containers-0.231.1\dist\spec-node\devContainersSpecCLI.js:223:13880)
[2022-03-31T15:30:27.409Z] at async FR (c:\Users\Octavian\.vscode\extensions\ms-vscode-remote.remote-containers-0.231.1\dist\spec-node\devContainersSpecCLI.js:223:13605)
[2022-03-31T15:30:27.417Z] Stop (3507 ms): Run: C:\Users\Octavian\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\Octavian\.vscode\extensions\ms-vscode-remote.remote-containers-0.231.1\dist\spec-node\devContainersSpecCLI.js up --container-data-folder .vscode-server/data/Machine --container-system-data-folder /var/vscode-server --workspace-folder c:\Users\Octavian\Desktop\django-analyzer --workspace-mount-consistency cached --id-label vsch.local.folder=c:\Users\Octavian\Desktop\django-analyzer --id-label vsch.quality=stable …Run Code Online (Sandbox Code Playgroud) docker docker-compose visual-studio-code vscode-devcontainer
所以我有这段代码,我认为可以改进,但我不知道如何改进
IList<User> users = await _unitOfWork.UserRepository.SelectAllAsync();
users = users.Where(x => x.Field == MyField).ToList();
foreach (var user in users)
{
user.Active = IsActive;
await _unitOfWork.UserRepository.UpdateAsync(user);
}
Run Code Online (Sandbox Code Playgroud)
我想要实现的是:
1) get all entries
2) filter them
3) on the filtered list, update their active status
Run Code Online (Sandbox Code Playgroud)
如何改进这段代码,无论是性能方面还是清洁方面?
谢谢。
我有一个 Keycloak 领域,其中一些用户作为 Nodejs + Typescript 项目的 IdP。
如果我按“全部注销”,它们就会从这里消失,但它们仍然有效。
例子:
1) I create a new session. I get its JWT token as a response
2) I do a GET req on one of the protected routes with the token attached. It works.
4) I logout all sessions by pressing the button in that photo
5) I do the same GET req on the same protected route. It still works.
I expect it NOT to work, because I previously logged …Run Code Online (Sandbox Code Playgroud) 所以我有这个清单:
['test.csv', 'test2.csv']
Run Code Online (Sandbox Code Playgroud)
我需要它的最终形式如下:
[('test.csv', 'test.csv'),('test2.csv', 'test2.csv')]
Run Code Online (Sandbox Code Playgroud)
从性能角度来看,在 Python 中执行此操作的最佳方法是什么?
谢谢。
.net-6.0 ×1
asp.net-core ×1
c# ×1
docker ×1
jwt ×1
keycloak ×1
node.js ×1
python ×1
python-3.8 ×1
python-3.x ×1