小编Jun*_*ndl的帖子

Windows10 WSL2 Ubuntu / Debian # 无网络

从 WSL 升级到 WSL2 后

sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

不再起作用。后:

wsl --set-version Ubuntu-18.04 2

输出是:

> sudo apt-get update
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Temporary failure resolving …
Run Code Online (Sandbox Code Playgroud)

ubuntu debian apt windows-subsystem-for-linux wsl-2

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

Typescript jest 全局变量示例

这是同一个问题,这里正确回答了jest global variable example,但问题是 Typescript。

console.log(__DEV__);
Run Code Online (Sandbox Code Playgroud)

结果是:

console.log(__DEV__);
Run Code Online (Sandbox Code Playgroud)

全局变量__DEV__在 package.json 中定义为:

  "jest": {
    "globals": {
      "__DEV__": true
    }
  }
Run Code Online (Sandbox Code Playgroud)

有人有解决方案或解决方法吗?

相关笑话文档:https://jestjs.io/docs/en/next/configuration#globals-object

typescript jestjs

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

apache-camel:http 查询字符串参数作为标头?

我是骆驼的新手,更喜欢使用 Spring DSL 进行路由定义。现在我发现它令人困惑,http 查询字符串参数被命名和处理为标头,它们不是。这是骆驼的架构错误吗?

dsl uri apache-camel query-parameters http-headers

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