小编Raj*_*hna的帖子

我正在使用Ubuntu 17.04,当我尝试安装android studio并运行我的虚拟设备时,它会出现这些错误

任何人都可以帮忙吗?我不能在Ubuntu上运行这个Android虚拟设备吗?

2:24 PM Executing tasks: [:app:assembleDebug]

2:24 PM Emulator: libGL error: unable to load driver: i965_dri.so

2:24 PM Emulator: libGL error: driver pointer missing

2:24 PM Emulator: libGL error: failed to load driver: i965

2:24 PM Emulator: libGL error: unable to load driver: i965_dri.so

2:24 PM Emulator: libGL error: driver pointer missing

2:24 PM Emulator: libGL error: failed to load driver: i965

2:24 PM Emulator: libGL error: unable to load driver: swrast_dri.so

2:24 PM Emulator: libGL error: failed to load …
Run Code Online (Sandbox Code Playgroud)

ubuntu android android-studio-3.0

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

如何在 log4j2 中以编程方式更改 Appender 布局?

以前在 log4j 1.x 中我能够在 Appender 上添加 appender.setLayout() 但现在在 log4j 2.x 中没有 setLayout() 这样的方法。如何在 log4j2 中以编程方式将布局设置为 Appender 对象?

java log4j2

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

无论如何,有没有验证jsonpath的语法是否正确?

嗨,我正在尝试找到一种在评估之前验证用户输入的jsonpath的方法。我希望使用正则表达式之类的东西来做到这一点,但到目前为止,我找不到有关如何验证jsonpath语法的任何文档/资源。

所有搜索到的返回资源都涉及评估表达式。甚至jayway.JsonPath库似乎也不执行任何语法检查。

无法对jsonpath语法进行语法检查吗?如果可以的话,请您指出正确的方向。

validation syntax json jsonpath

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

AWS ECS 中的 fs.file-max 和 ulimit nofile 是否受 EC2 的 fs.file-max 和 nofile 的限制?

我正在尝试在 ECS 上运行的 Nginx 上运行一些负载测试,并且我已ulimit通过文档中提到的任务定义将 设置为更高的值 (777001) 。

在容器内,容器内的ulimit -Hn命令和cat /proc/sys/fs/file-max运行将给出与输出相同的值 ()。

在运行容器(自动扩展集群中的 EC2 之一)的 EC2 上,ulimit -Hn指定为 1024,cat /proc/sys/fs/file-max指定为 777001。

当我运行负载时,too many open files当每秒请求数达到 500 左右时出现错误。(ECS 服务的 CPU 使用率和内存使用率似乎在 25% 左右)。

在对此进行一些挖掘时,我发现了这篇中等文章,其中引用了/etc/sysconfig/docker提供给 docker 守护程序的文件和启动选项。在我的情况下,cat /etc/sysconfig/docker输出如下。

# The max number of open files for the daemon itself, and all
# running containers.  The default value of 1048576 mirrors the value …
Run Code Online (Sandbox Code Playgroud)

amazon-ec2 ulimit amazon-web-services amazon-ecs docker

5
推荐指数
0
解决办法
1582
查看次数

将ultra-dynamic.xml替换为ultraesb 3.2.0中的ultra-custom.xml

我看过youtube ultraesb1.0.1演示用IntelliJ CE9包含的ultra-dynamic.xml可能会被ultraesb 3.2.0中的ultra-custom.xml所取代.

ultra-custom.xml

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:u="http://www.adroitlogic.org/ultraesb"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.adroitlogic.org/ultraesb http://schemas.ultraesb.org/ultraesb-2.0.xsd">

    <u:endpoint id="echo-service">
        <u:address>http://localhost:9000/service/EchoService</u:address>
    </u:endpoint>

    <u:sequence id="error-handler">
        <u:java><![CDATA[
            logger.error("Custom error handler : " + msg.getLastException().toString());
        ]]></u:java>
    </u:sequence>


    <u:proxy id="health-check">
        <u:transport id="http-8280"/>
        <u:transport id="https-8443"/>
        <u:target>
            <u:inSequence>
                <u:java><![CDATA[
                    msg = msg.createDefaultResponseMessage();
                    mediation.sendResponse(msg,org.adroitlogic.ultraesb.api.management.
                        ServerAdminImpl.getInstance().getUserDefinedStatusCode());
                ]]></u:java>
            </u:inSequence>
        </u:target>
    </u:proxy>

</beans>
Run Code Online (Sandbox Code Playgroud)

虽然我无法在互联网上找到ultra-dynamics.xml,但我会从youtube上关注ultraesb 1.0.1演示,以获得我最初的平滑输出.此外,我注意到ultra-custom.xml包含单独的独立标记,而ultra-dynamics.xml包含所有内容

任何人都可以帮忙

xml esb intellij-idea ultraesb adroitlogic

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

尝试启动嵌入式elasticsearch节点时,不支持http.type [netty3]

我知道不建议使用嵌入式Elasticsearch.我只是为了测试目的而尝试它.

我正在尝试启动一个嵌入式Elasticsearch节点,该节点提供以下elasticsearch.yml的配置

# Name for the cluster
cluster.name: elasticsearch
# Name for the embedded node
node.name: EmbeddedESNode
# Path to log files:
path.logs: logs
discovery.zen.ping.unicast.hosts: []
# Disable dynamic scripting
script.inline: false
script.stored: false
script.file: false
transport.type: local
http.type: netty3
Run Code Online (Sandbox Code Playgroud)

我正在使用es 5.1.1并且我的代码启动嵌入式节点如下.

    try {
        Settings elasticsearchSetting = Settings.builder()
                // Value for path.home is required for es but will not be used as long as other properties
                // path.logs, path.data and path.conf is set.
                .put(ES_PROPERTY_PATH_HOME, "nullpath")
                .put(ES_PROPERTY_PATH_CONF, confDir)
                .build();
        Node node …
Run Code Online (Sandbox Code Playgroud)

rest elasticsearch

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

Integer.decode(String s)

class Test{

    public static void main(String Args[]){

        Integer x;
        x = Integer.decode("0b111");
        System.out.println(x);
    }
}
Run Code Online (Sandbox Code Playgroud)

对于二进制的前缀0和前缀为0的八进制,这不起作用.正确的方法是什么?

java

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

由于并发访问,TreeMap中是否存在此空指针异常?

我知道TreeMap不是线程安全的.我正在尝试将TreeMap与ConcurrentSkipListMap进行比较.我使用的代码如下所示,我想确定我得到的错误是由于TreeMap不是线程安全而不是因为其他一些.

java中java.util.TreeMap.fixAfterInsertion(TreeMap.java:2127)的java.util.TreeMap.rotateLeft(TreeMap.java:2060)中的线程"pool-1-thread-52"java.lang.NullPointerException中的异常. util.TreeMap.put(TreeMap.java:574)位于java.util.concurrent.ThreadPoolExecutor $的java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)的ThreadTestTreeMap $ 1.run(ThreadTestTreeMap.java:39) java.lang.Thread.run上的Worker.run(ThreadPoolExecutor.java:615)(Thread.java:745)

import com.google.common.collect.Ordering;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

public class ThreadTestTreeMap {
    public static Map<String, Object> map;
    public static int THREADS =  100;
    public static long averageTime = 0;

public static void main(String args[]) throws InterruptedException {
    for (int i = 0; i < 1; i++) {
        map = new TreeMap<>(Ordering.natural());
//            map = new ConcurrentSkipListMap<>(Ordering.natural());

        long time = System.nanoTime();
        ExecutorService service = …
Run Code Online (Sandbox Code Playgroud)

java nullpointerexception treemap non-thread-safe

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