小编Lak*_*age的帖子

Minikube安装在Ubuntu vm_VT-X/AMD-v中,可以在另一个VM内部启用VM

我想在Ubuntu vm中安装minikube(在虚拟框中).我为vm启用了VT-X/AMD-v.但是我得到了以下错误.

# minikube start
Starting local Kubernetes cluster...
E0217 15:00:35.395801    3869 start.go:107] Error starting host: Error creating host: Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory".

 Retrying.
E0217 15:00:35.396019    3869 start.go:113] Error starting host:  Error creating host: Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory"
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information …
Run Code Online (Sandbox Code Playgroud)

ubuntu kubernetes minikube

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

MongoDB:服务器有启动警告

我今天首先安装了MongoDB 3.2.5.但是当我启动它并使用MongoDB shell时,它给了我以下警告:

C:\Windows\system32>mongo
MongoDB shell version: 3.2.5
connecting to: test
Server has startup warnings:
2016-04-16T11:06:17.943+0800 I CONTROL  [initandlisten]
2016-04-16T11:06:17.943+0800 I CONTROL  [initandlisten] ** WARNING: Insecure configuration, access control is not enabled and no --bind_ip has been specified.
2016-04-16T11:06:17.943+0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted,
2016-04-16T11:06:17.943+0800 I CONTROL  [initandlisten] **          and the server listens on all available network interfaces.
2016-04-16T11:06:17.943+0800 I CONTROL  [initandlisten]
>
Run Code Online (Sandbox Code Playgroud)

我的操作系统是Microsoft Windows [版本10.0.10586].

windows mongodb

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

Google应用引擎与Spring框架的兼容性

我已经开始使用谷歌应用程序引擎和Spring 4开发一个Web应用程序.但现在我已经明白Spring 4并不完全支持Google应用程序引擎.现在我需要最新版本的Spring框架,完全支持谷歌应用程序引擎.有人可以帮帮我吗?

google-app-engine spring spring-mvc

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

git pull 、 git fetch 和 git rebase 之间有什么区别?

git pullgit fetch和之间有什么区别git rebase?我感觉pull和fetch是一样的。

git git-pull git-fetch

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

Kubernetes kube-dns pod正在申请中

我试过这个doc在Ubuntu VM中安装和设置Kubernetes.我已经完成了3/4,现在kube-dns pod处于待定状态.我怎么能弄清楚这个?这里是结果kubectl get pods --namespace=kube-systemkubectl describe pod <pod name>

# kubectl get pods --namespace=kube-system
NAME                              READY     STATUS    RESTARTS   AGE
dummy-2088944543-jk2t2            1/1       Running   0          3h
etcd-ubuntu                       1/1       Running   0          3h
kube-apiserver-ubuntu             1/1       Running   0          3h
kube-controller-manager-ubuntu    1/1       Running   0          3h
kube-discovery-1769846148-h88v4   1/1       Running   0          3h
kube-dns-2924299975-dfp17         0/4       Pending   0          3h
kube-proxy-zdcxw                  1/1       Running   0          3h
kube-scheduler-ubuntu             1/1       Running   0          3h
weave-net-xwfhj                   2/2       Running   0          2h

# kubectl describe pod kube-dns-2924299975-dfp17
Error from server (NotFound): pods …
Run Code Online (Sandbox Code Playgroud)

ubuntu kubernetes ubuntu-16.04 kubeadm

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

在 NIFI 中创建自定义控制器服务时无法生成扩展文档

我尝试使用本指南创建自定义控制器服务。它在 nifi 1.9.2 版本中完美运行。但是当我尝试使用 NIFI 1.11.3 版本时,我遇到了以下问题。我用谷歌搜索了它,但找不到解决这个问题的方法。有人可以帮我吗?

[INFO] Found a dependency on version 1.11.3 of NiFi API
[ERROR] Could not generate extensions' documentation
org.apache.maven.plugin.MojoExecutionException: Failed to create Extension Documentation
    at org.apache.nifi.NarMojo.generateDocumentation (NarMojo.java:596)
    at org.apache.nifi.NarMojo.execute (NarMojo.java:499)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at …
Run Code Online (Sandbox Code Playgroud)

java apache-nifi

6
推荐指数
2
解决办法
1646
查看次数

jQuery使用数组中的数据创建选择标签

我需要访问数据库并更新选择标记的选项。我的代码在这里。

 $(window).load(function () {

     $.getJSON('http://localhost/ABC/web/app_dev.php/doctorFillOption', function (data) {

         var length = data.length,
             element = null;
         $('#idcatFill').append('<select id ="idCat"  style="width:200px;margin-left:30px;margin-top:5px;" type="text"><option value=""></option>');

         for (var i = 0; i < length; i++) {
             row = data[i];
             alert("id" + row['id'] + ' ' + row['category_name']);
             $('#idcatFill').append(
                 '<option value="' + row['id'] + '">' + row['category_name'] + '</option>'
             );
         }

     });
     $('#idcatFill').append('</select><br/>');
 });
Run Code Online (Sandbox Code Playgroud)

但是它没有选择权。需要帮忙。谢谢。

html jquery symfony

5
推荐指数
2
解决办法
2584
查看次数

弹性搜索如何添加新字段并从现有字段中添加值

我有一个弹性搜索索引如下,

 {
  "payment_transaction": {
    "mappings": {
      "message_logs": {
        "properties": {
          "@timestamp": {
            "type": "date"
          },
          "changed_date": {
            "type": "date"
          },
          "created_date": {
            "type": "date"
          }
        }
      }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

我需要添加另外三个字段(年,月,日).并且需要从现有字段(created_date)中分配值.created_date的格式为2016-11-22T22:20:21.000Z.我怎样才能做到这一点 ?弹性搜索版本是5.0.

elasticsearch elasticsearch-5

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

Spring引导XML更改根元素名称

我编写了一个spring boot应用程序来接受Http get Request并发送XML响应作为输出.我需要通过HTTP获取以下XML作为输出

<response xmlns="">
    <userId>235</userId>
    <amount>345.0</amount>
</response>
Run Code Online (Sandbox Code Playgroud)

而我的DTO课程如下,

@XmlRootElement(name = "response")
public class CgPayment {
    @XmlElement
    private String userId;
    @XmlElement
    private double amount;

    @XmlElement
    public String getUserId() {
        return userId;
    }

    @XmlElement
    public void setUserId(String userId) {
        this.userId = userId;
    }

    @XmlElement
    public void setAmount(double amount) {
        this.amount = amount;
    }

    @XmlElement
    public double getAmount() {

        return amount;
    }
}
Run Code Online (Sandbox Code Playgroud)

但是我得到了以下响应作为输出.

<CgPayment xmlns="">
    <userId>235</userId>
    <amount>345.0</amount>
</CgPayment>
Run Code Online (Sandbox Code Playgroud)

如何更改根元素.响应类型为APPLICATION_XML_VALUE

java xml spring spring-boot jackson-dataformat-xml

2
推荐指数
2
解决办法
3555
查看次数

静态方法中变量的竞争条件

我有一个方法如下:

public static void method() {

int i = 0;
i = i + 1;

}
Run Code Online (Sandbox Code Playgroud)

我在静态方法中有一个int变量.并且该方法由几个线程访问.
我的问题是:

  1. i变量是否符合竞争条件?
  2. 如果在Spring Web应用程序中访问该方法并由多个用户同时访问该怎么办?

java static multithreading static-methods race-condition

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

Log4J 与 Tomcat 的集成 - catalina.out 日志文件轮换

我使用 log4j 版本 2 作为 Tomcat 8 的记录器,现在问题是 catalina.out 文件不是每天轮换。我的 log4j.property 文件如下,

log4j.rootLogger = INFO, CATALINA, CONSOLE

# Define all the appenders
log4j.appender.CATALINA = org.apache.log4j.DailyRollingFileAppender
log4j.appender.CATALINA.File = ${catalina.base}/logs/catalina
log4j.appender.CATALINA.Append = true
log4j.appender.CATALINA.Encoding = UTF-8
# Roll-over the log once per day
log4j.appender.CATALINA.DatePattern = '.'yyyy-MM-dd'.log'
log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
log4j.appender.CATALINA.layout.ConversionPattern = %d [%t] %-5p %c- %m%n

log4j.appender.LOCALHOST = org.apache.log4j.DailyRollingFileAppender
log4j.appender.LOCALHOST.File = ${catalina.base}/logs/localhost
log4j.appender.LOCALHOST.Append = true
log4j.appender.LOCALHOST.Encoding = UTF-8
log4j.appender.LOCALHOST.DatePattern = '.'yyyy-MM-dd'.log'
log4j.appender.LOCALHOST.layout = org.apache.log4j.PatternLayout
log4j.appender.LOCALHOST.layout.ConversionPattern = %d [%t] %-5p %c- %m%n

log4j.appender.MANAGER …
Run Code Online (Sandbox Code Playgroud)

logging tomcat log4j log4j2 tomcat8

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

Java"||" 字符串替换为"OR"

我有一个字符串

"age = 18 || name ='Mistic'|| civilstatus ='married'|| gender ='0'"

我需要替换"||" 通过"或".我试着跟随代码.

System.out.println("age = 18 || name = 'Mistic' || civilstatus = 'married' || gender = '0'".replaceAll("||", "OR"));
Run Code Online (Sandbox Code Playgroud)

但我得到了

"ORaORgOReOR OR = OR OR1OR8OR OR |和| OR ORnORaORmOReOR OR = OR OR'ORMORiORsORtORiORcOR'OR OR |和| OR ORcORiORvORiORlORsORtORaORtORuORsOR OR = OR OR'ORmORaORrORrORiOReORdOR'OR OR |和| OR ORgOReORnORdOReORrOR OR = OR OR'OR0OR'OR"

我需要的是

"年龄= 18或姓名='Mistic'或civilstatus ='已婚'或性别='0'"

我怎样才能做到这一点.

编辑我已经阅读了这个问题的问题和答案,并不是类似的.因为这个问题是关于替换字符串而我的问题是关于为我的代码获取不熟悉的结果.

java string replaceall

-1
推荐指数
2
解决办法
1207
查看次数