AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

    • 主页
    • 系统&网络
    • Ubuntu
    • Unix
    • DBA
    • Computer
    • Coding
    • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-28142848

Milenko Markovic's questions

Martin Hope
Milenko Markovic
Asked: 2025-01-06 18:57:26 +0800 CST

如何使用非空断言重构我的代码?对象可能“未定义”

  • 5

我有问题

export const tfModules = (moduleIds: readonly string[], mapping: Map<string, [string, string]>): string[] =>
  moduleIds.map(m => mapping.get(m).at(0))
    .filter(m => m !== undefined)
    .map(m => m!);

得到

error TS2532: Object is possibly 'undefined'.

使用非空断言来表明值不能为空或未定义的最简单方法是什么?

typescript
  • 1 个回答
  • 29 Views
Martin Hope
Milenko Markovic
Asked: 2024-12-27 20:06:29 +0800 CST

为什么一个 pod 发生 CrashLoopBackOff 而另一个 pod 运行正常?

  • 5

我已经部署,但随着时间的推移,出现了错误。

NAME                                  READY   STATUS             RESTARTS        AGE
pod/picanagm-solution-5cb8887968-qk4pr   0/1     CrashLoopBackOff   140 (78s ago)   11h
pod/picanagm-solution-77f5fcfdc-kwd9w    1/1     Running            0               2d20h

失败 Pod 的日志

Events:
  Type     Reason   Age                     From     Message
  ----     ------   ----                    ----     -------
  Warning  BackOff  2m42s (x3258 over 11h)  kubelet  Back-off restarting failed container

和

Picked up JAVA_TOOL_OPTIONS: -Dlogging.config=/app/run/logback.xml -DcontentServer.factory-reset=folder -DcontentServer.factory-reset.folder-name=file:/app/bookmarks -DSameSite=none -Dconfiguration.sign-off.enabled=true -Ddata.extraction.templates.base.dir.path=${java.io.tmpdir} --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED

I> No access restrictor found, access to any MBean is allowed
Jolokia: Agent started with URL http://10.244.4.81:8778/jolokia/
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/activeviam/MINDZ/starter/main/MINDZApplication has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)

一个副本集正常,另一个副本集尚未准备好

replicaset.apps/picanagm-solution-5cb8887968   1         1         0       11h

为什么?如何调试此行为?

kubernetes
  • 1 个回答
  • 37 Views
Martin Hope
Milenko Markovic
Asked: 2024-12-26 21:40:37 +0800 CST

为什么我在编辑“rebase todo”并尝试继续后会出现“无效命令‘git’”?

  • 6

我试图切换我的分支,但是由于我正在重新定基,所以无法切换:

fatal: cannot switch branch while rebasing
Consider "git rebase --quit" or "git worktree add".

结果显示:

Next commands to do (2 remaining commands):
   pick d51f32027a0 Correct last code block not annotated
   pick 7380fa4a8e7 changed all @doc issues
  (use "git rebase --edit-todo" to view and edit)

所以我这么做了

git rebase --edit-todo

它在 Vim 中打开了一个文件,我对其进行了如下编辑:

pick d51f32027a0 Correct last code block not annotated
pick 7380fa4a8e7 changed all @doc issues
     git rebase --continue
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup [-C | -c] <commit> = like "squash" but keep only the previous
#                    commit's log message, unless -C is used, in which case
#                    keep only this commit's message; -c is same as -C but
#                    opens the editor

关闭它之后,我以为它会继续进行变基。但现在有这样的输出:

git rebase --continue
error: invalid command 'git'
error: invalid line 3:      git rebase --continue
error: please fix this using 'git rebase --edit-todo'.

我应该怎么办?

git
  • 2 个回答
  • 55 Views
Martin Hope
Milenko Markovic
Asked: 2024-12-13 17:30:40 +0800 CST

如何在 markdown 中添加 s3 的下载链接?

  • 5

我设法用 PHP 和 RUBY 来归档答案,但我需要在 markdown 中编辑下载链接。

我找到了 如何使用提供的 URL 从 s3 下载文件? 但它需要一个新文件。

https://us-east-1.console.aws.amazon.com/s3/object/mmteres-docs-website?region=us-east-1&bucketType=general&prefix=krivist-1.0.0-RC.tsv

下载链接应该是什么样的?

  • 1 个回答
  • 29 Views
Martin Hope
Milenko Markovic
Asked: 2024-11-15 18:56:57 +0800 CST

如何安装 node-debug?node-debug:未找到命令

  • 5

在看了一些教程之后,我尝试运行 node-debug

node-debug node_modules/@aws-sdk/client-s3
node-debug: command not found

我安装了 npm i debug,但那是其他模块。如何从控制台运行节点调试?

node.js
  • 1 个回答
  • 16 Views
Martin Hope
Milenko Markovic
Asked: 2024-11-14 22:12:30 +0800 CST

为什么“docusaurus”不被识别为内部或外部命令?

  • 5

我正在尝试运行一个简单的 React 项目

纱线开始

yarn run v1.22.22 docusaurus start 'docusaurus' is not recognized as an internal or external command, operable program or batch file. error Command failed with exit code 1.

为什么?

yarn global list 向我们展示了

yarn global v1.22.22info "[email protected]" has binaries:docusaurus-startdocusaurus-builddocusaurus-publishdocusaurus-examplesdocusaurus-write-translationsdocusaurus-versiondocusaurus-rename-versionDone in 0.69s.

我该如何解决这个问题?

我正在尝试按照官方文档文本设置 Docsaurus 网站

我正在提供我的依赖项,并且我很好奇它们应该是什么样子。

  "devDependencies": {
    "@algolia/client-search": "^4.24.0",
    "@aws-sdk/client-s3": "^3.511.0",
    "@aws-sdk/credential-providers": "3.511.0",
    "@aws-sdk/signature-v4-crt": "^3.511.0",
    "@babel/helper-get-function-arity": "^7.16.7",
    "@docusaurus/core": "^2.4.1",
    "@docusaurus/preset-classic": "^2.4.1",
    "@docusaurus/theme-mermaid": "^2.4.1",
    "@mdx-js/react": "^1.6.21",
    "@types/react": "^16.8.0",
    "buffer": "^6.0.3",
    "cli-progress": "3.12.0",
    "clsx": "^2.0.0",
    "configure-webpack": "file:plugins/configure-webpack",
    "eslint": "9.2.0",
    "jest": "^29.7.0",
    "util": "^0.12.5",
    "webpack": "5.93.0"
  },
  "dependencies": {
    "mermaid": "^10.3.1",
    "react": "^17.0.2",
    "react-dom": "^17.0.0",
    "rehype-katex": "5",
    "remark-math": "3"
  },

yarn 应该如何提供更多有关到底出了什么问题的信息?

yarnpkg
  • 1 个回答
  • 17 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    重新格式化数字,在固定位置插入分隔符

    • 6 个回答
  • Marko Smith

    为什么 C++20 概念会导致循环约束错误,而老式的 SFINAE 不会?

    • 2 个回答
  • Marko Smith

    VScode 自动卸载扩展的问题(Material 主题)

    • 2 个回答
  • Marko Smith

    Vue 3:创建时出错“预期标识符但发现‘导入’”[重复]

    • 1 个回答
  • Marko Smith

    具有指定基础类型但没有枚举器的“枚举类”的用途是什么?

    • 1 个回答
  • Marko Smith

    如何修复未手动导入的模块的 MODULE_NOT_FOUND 错误?

    • 6 个回答
  • Marko Smith

    `(表达式,左值) = 右值` 在 C 或 C++ 中是有效的赋值吗?为什么有些编译器会接受/拒绝它?

    • 3 个回答
  • Marko Smith

    在 C++ 中,一个不执行任何操作的空程序需要 204KB 的堆,但在 C 中则不需要

    • 1 个回答
  • Marko Smith

    PowerBI 目前与 BigQuery 不兼容:Simba 驱动程序与 Windows 更新有关

    • 2 个回答
  • Marko Smith

    AdMob:MobileAds.initialize() - 对于某些设备,“java.lang.Integer 无法转换为 java.lang.String”

    • 1 个回答
  • Martin Hope
    Fantastic Mr Fox msvc std::vector 实现中仅不接受可复制类型 2025-04-23 06:40:49 +0800 CST
  • Martin Hope
    Howard Hinnant 使用 chrono 查找下一个工作日 2025-04-21 08:30:25 +0800 CST
  • Martin Hope
    Fedor 构造函数的成员初始化程序可以包含另一个成员的初始化吗? 2025-04-15 01:01:44 +0800 CST
  • Martin Hope
    Petr Filipský 为什么 C++20 概念会导致循环约束错误,而老式的 SFINAE 不会? 2025-03-23 21:39:40 +0800 CST
  • Martin Hope
    Catskul C++20 是否进行了更改,允许从已知绑定数组“type(&)[N]”转换为未知绑定数组“type(&)[]”? 2025-03-04 06:57:53 +0800 CST
  • Martin Hope
    Stefan Pochmann 为什么 {2,3,10} 和 {x,3,10} (x=2) 的顺序不同? 2025-01-13 23:24:07 +0800 CST
  • Martin Hope
    Chad Feller 在 5.2 版中,bash 条件语句中的 [[ .. ]] 中的分号现在是可选的吗? 2024-10-21 05:50:33 +0800 CST
  • Martin Hope
    Wrench 为什么双破折号 (--) 会导致此 MariaDB 子句评估为 true? 2024-05-05 13:37:20 +0800 CST
  • Martin Hope
    Waket Zheng 为什么 `dict(id=1, **{'id': 2})` 有时会引发 `KeyError: 'id'` 而不是 TypeError? 2024-05-04 14:19:19 +0800 CST
  • Martin Hope
    user924 AdMob:MobileAds.initialize() - 对于某些设备,“java.lang.Integer 无法转换为 java.lang.String” 2024-03-20 03:12:31 +0800 CST

热门标签

python javascript c++ c# java typescript sql reactjs html

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助
subwaysurfers
my femboy roommate

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve