小编jua*_*umn的帖子

无法在网络nat上创建端点:hnsCall在Win32中失败:该进程无法访问该文件

我正在尝试运行以下docker命令(最新Win10 2018年秋季更新,最新docker版本2.0):

docker run -d -p 1433:1433 -e sa_password=Test_123 -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer
Run Code Online (Sandbox Code Playgroud)

但是它失败并出现以下错误:

来自守护程序的错误响应:无法在网络nat上创建终结点unruffled_wozniak:hnsCall在Win32中失败:该进程无法访问该文件,因为该文件正在被另一个进程使用。(0x20)。

我尝试了以下方法:

  • 重新启动守护程序
  • docker system prune -a
  • 重新启动机器
  • 重新启动HNS服务
  • 重新安装码头工人
  • 从Windows禁用容器和Hyper-V功能

没事。有什么建议么?

docker dockerfile

13
推荐指数
5
解决办法
3553
查看次数

错误“必需:找到的字符串:字符串?” Kotlin 和 Android Studio

正如标题所示,我在“var myNote = Note(id, title, note, ServerValue.TIMESTAMP)”错误“Required:String Found:String?”这一行的“id”下得到一个红色下划线。Kotlin 和 Android Studio

class MainActivity : AppCompatActivity() {
    var mRef:DatabaseReference? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val database = FirebaseDatabase.getInstance()
        mRef = database.getReference("Notes")

        add_new_note.setOnClickListener {
            showDialogAddNote()
        }
    }

    fun showDialogAddNote() {
        val alertBuilder = AlertDialog.Builder(this)

        val view = layoutInflater.inflate(R.layout.add_note, null)

        alertBuilder.setView(view)

        val alertDialog = alertBuilder.create()
        alertDialog.show()

        view.btnSaveNote.setOnClickListener {
            val title = view.etTitle.text.toString()
            val note = view.etNote.text.toString()

            if (title.isNotEmpty() && note.isNotEmpty()) {
                var id = mRef!!.push().key

                var myNote = Note(id, …
Run Code Online (Sandbox Code Playgroud)

java android kotlin

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

Docker 构建抛出“react-scripts: not found”错误

我正在使用 create-react-app 并想用 Docker 发布我的项目。使用docker build . -t react-docker命令,我收到此错误:

/bin/sh: 1: react-scripts: not found 错误命令失败,退出代码为 127。

我删除package-lock.json并运行npm install,问题还是没有解决!

Dockerfile:

# stage: 1 
FROM node:8 as react-build 
WORKDIR /app 
COPY . ./ 
RUN yarn 
RUN yarn build 
# stage: 2 — the production environment 
FROM nginx:alpine 
COPY — from=react-build /app/build /usr/share/nginx/html 
EXPOSE 80 
CMD [“nginx”, “-g”, “daemon off;”]
Run Code Online (Sandbox Code Playgroud)

docker create-react-app

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

如何修复 Xcode 10 中的“XCtests 间歇性失败以在模拟器中启动应用程序”

当我尝试在模拟器中运行我的测试用例时,我收到此错误:

“请求 com.name.name 的自动化会话失败:61876:当应用程序在 Xcode 10 中启动时,等待“请求 com.name.name 的自动化会话”承诺的实现超时。

xcuitest

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

尝试在 linux ubuntu 18.04 LTS 上安装 docker 存储库时出错

抱歉语言是德语。

所以我添加了docker的存储库:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Run Code Online (Sandbox Code Playgroud)

但是当我更新源时出现错误:

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

Ign:3 https://download.docker.com/linux/ubuntu仿生 InRelease

Fehl:4 https://download.docker.com/linux/ubuntu仿生发布
证书验证失败:证书不受信任。证书颁发者未知。无法握手:证书验证出错。[IP:54.230.93.95 443]

Holen:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]

OK:6 http://archive.ubuntu.com/ubuntu bionic-security InRelease

Paketlisten werden gelesen... Fertig E: Das Depot » https://download.docker.com/linux/ubuntu仿生发布« enthält keine Release-Datei。

N: Eine Aktualisierung von solch einem Depot kann nicht auf eine sichere Art durchgeführt werden, daher ist es standardmäßig deaktiviert。

N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerkonfiguration finden Sie in …

linux ubuntu docker

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

Thymeleaf复选框绑定对象列表

我是Spring的Thymeleaf的新手,我想添加新的Employee内容列表Certificate.我曾经certificateService绑定th:checkbox从控制器传递的列表.我的代码:

调节器

<form action="#" th:action="@{/employee/add}" th:object="${employee}" method="post">
    <table>
        <tr>
            <td>Name</td>
            <td><input type="text" th:field="*{name}"></td>
        </tr>
        <tr>
            <td>Certificate</td>
            <td>
                <th:block th:each="certificate , stat : ${certificates}">
                    <input type="checkbox" th:field="*{certificates}" name="certificates" th:value="${certificate.id]}"/>
                    <label th:text="${certificate.name}" ></label>
                </th:block>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" value="Add"/></td>
        </tr>
    </table>
</form>
Run Code Online (Sandbox Code Playgroud)

豆子

雇员

@RequestMapping(value = "/add" , method = RequestMethod.GET)
public String add(Model model) {
    model.addAttribute("employee",new Employee());
    model.addAttribute("certificates",certificateService.getList());
    return "add";
}

@RequestMapping(value = "/add" , method = RequestMethod.POST)
public String addSave(@ModelAttribute("employee")Employee …
Run Code Online (Sandbox Code Playgroud)

spring spring-mvc thymeleaf

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

错误:初始化错误(打字稿).无法读取未定义的属性'getExecutingFilePath'

我通过npm配置了一个新的Angular2类型的应用程序.
我能够从节点命令提示符运行它ng serve.
但是在IntelliJ IDEA(2016.3.4)中,我无法从控制台运行.它显示错误:

错误:初始化错误(打字稿).无法读取未定义的属性'getExecutingFilePath'

在此输入图像描述

intellij-idea typescript angular

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

如何修复 Spring 中的 JSON 解码错误?

我正在通过包含一组对象的 REST 发送一个用户SimpleGrantedAuthority对象。在接收方,我遇到了一个例外:

org.springframework.core.codec.DecodingException:JSON 解码错误:无法构造实例 org.springframework.security.core.authority.SimpleGrantedAuthority (尽管至少存在一个创建者):无法从对象值反序列化(没有基于委托或属性的创建者);

我正在使用 Spring Boot 2.1.2 提供的默认 JSON 映射器。在接收方,我使用 WebFlux 的 WebClient(在本例中为 WebTestClient)。

任何人都可以向我解释为什么我会收到此错误以及如何解决它?

java spring jackson spring-webflux

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