小编Tej*_*sad的帖子

我应该使用哪一个?docker kill或docker stop?

请问docker stop如果容器内运行的进程无法停止失败?如果我使用docker kill,可以保留容器内未保存的数据.是docker stop比较费时docker kill?我想关闭容器但不丢失任何数据(没有高延迟来完成终止或停止进程).

docker

8
推荐指数
4
解决办法
3742
查看次数

加载rJava时出错

当我想加载rJava时出错.JDK已安装.(我在CentOS VM上运行R(cloudera demo vm cdh3u4))

> library(rJava)

Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/home/cloudera/R/x86_64-redhat-linux-gnu-library/2.15/rJava/libs/rJava.so':
  libjvm.so: cannot open shared object file: No such file or directory
Error: package/namespace load failed for ‘rJava’
Run Code Online (Sandbox Code Playgroud)

LD_LIBRARY_PATH设置有问题吗?如果是,我该如何解决?我需要运行rJava来安装rhdfs.

更多信息(如果需要):

[cloudera@localhost ~]$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
Run Code Online (Sandbox Code Playgroud)

java r centos rjava cloudera

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

使用JAVA(IOM Bridge)将变量插入SAS.我应该使用CORBA存根和JDBC还是有其他选择吗?

这是我的代码段的一部分

WorkspaceConnector connector = null;
WorkspaceFactory workspaceFactory = null;
String variableListString = null;
Properties sasServerProperties = new Properties();
sasServerProperties.put("host", host);
sasServerProperties.put("port", port);
sasServerProperties.put("userName", userName);
sasServerProperties.put("password", password);
Properties[] sasServerPropertiesList = { sasServerProperties };
workspaceFactory = new WorkspaceFactory(sasServerPropertiesList, null, logWriter);
connector = workspaceFactory.getWorkspaceConnector(0L);
IWorkspace sasWorkspace = connector.getWorkspace();
ILanguageService sasLanguage = sasWorkspace.LanguageService();
//send variable list string
//continued
Run Code Online (Sandbox Code Playgroud)

我需要通过IOM桥将"variableListString"发送到SAS服务器.Java SAS API没有给出明确的方法.使用CORBA和JDBC是最好的方法吗?给我一个提示如何做到这一点.有没有其他方法可以做到?

java corba jdbc sas

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

在 shell 脚本中解压缩文件时出错。- 需要PK兼容。v5.1(可以做v4.6)

unzip test.zip在 Shell 脚本中使用。但是在执行这一行时我得到一个错误

Archive:  test.zip
   skipping: hello.pdf                need PK compat. v5.1 (can do v4.6)
Run Code Online (Sandbox Code Playgroud)

即使我尝试从 ubuntu 的终端运行这个命令,它也会抛出同样的错误 need PK compat. v5.1 (can do v4.6)

卸载并重新安装解压缩也不起作用。或者,我必须安装p7zip-full以解压缩 test.zip 文件。如何解决这个问题并unzip在shell脚本中使用?

bash shell ubuntu sh ubuntu-14.04

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

nt:文件夹,吊索:文件夹和吊索:AEM中的orderedflder之间的区别?

我想知道是什么样的区别nt:folder,sling:foldersling:orderedfolder在AEM/CQ?

还有什么案例在实施时使用其中的每一个?

aem

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

如果具有相同接口的类具有相似但不同的方法签名,该怎么办?

如果具有相同接口的类具有相似但不同的方法签名,该怎么办?

假设我有一个计算不同成本的项目(最终得到总成本).

在我的节目,有几个计算器类,即ACostCalculator,BCostCalculator等等.当calculate()调用方法来计算成本时,成本容器也会传递给这些成本计算器.在一个好的场景中,我可以CostCalculator为每个成本计算器创建一个接口.

但是,不同成本的计算需要不同的资源.在我目前的计划中,它是这样的:

//getResource() are costly method while several costs need this. So do it outside calculate() method.
ResourceA resourceA = getResourceA(); 
ResourceB resourceB = getResourceB();

CostContainer costContainer = new CostContainer();
CostCalculator aCostCalculator = new ACostCalculator();
...
CostCalculator eCostCalculator = new ECostCalculator();

aCostCalculator.calculate(costContainer);
bCostCalculator.calculate(costContainer)
cCostCalculator.calculate(costContainer, resourceA);
dCostCalculator.calculate(costContainer, resourceA);
eCostCalculator.calculate(costContainer, resourceA, resourceB);
Run Code Online (Sandbox Code Playgroud)

如果签名完全相同,我可以方便地做一个循环来立即执行.但是,由于它们相似但不同,我甚至无法建立良好的界面.

我不确定是否有好方法可以这样做.我能想到的是将所有calculate()方法概括为

calculate(CostContainer costContainer, List<Object> resources);
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?谢谢回答.

java design-patterns interface

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

安装Open GRM thrax时出错

我已经在Ubuntu中安装了Open Fst并且工作正常.现在我正在尝试安装Open GRM thrax.我尝试过安装2个不同版本的thrax.

Thrax 1.1.0版:

thraxOpenGrm/thrax-1.1.0$ ./configure
Run Code Online (Sandbox Code Playgroud)

以下是我得到的错误.

checking how to hardcode library paths into programs... immediate
checking for bison... no
checking for byacc... no
checking for std::tr1::hash<long long unsigned>... yes
checking for __gnu_cxx::slist<int>... yes
checking fst/fst.h usability... yes
checking fst/fst.h presence... no
configure: WARNING: fst/fst.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: fst/fst.h: proceeding with the compiler's result
checking for fst/fst.h... yes
checking fst/extensions/far/far.h usability... yes
checking fst/extensions/far/far.h presence... no
configure: WARNING: fst/extensions/far/far.h: accepted by …
Run Code Online (Sandbox Code Playgroud)

c++ text-analysis text-mining ubuntu-14.04 openfst

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

名称节点处于安全模式

我提到这些问题名称节点处于安全模式.无法离开SafeModeException:Name节点处于安全模式.

我执行的命令如下

在此输入图像描述

它显示安全模式已关闭,但是下一个命令显示名称节点处于安全模式.

和ls/root如下所示

在此输入图像描述

怎么解决?

hadoop

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

如何在 Windows 上安装具有“MPEG-2 传输流解复用器”元素的 GStreamer 插件

我已经使用以下链接中的 .msi 文件在 Windows 上安装了 GStreamer - gstreamer-1.0-x86-1.2.0.msigstreamer-1.0-devel-x86-1.2.0.msi
我可以运行以下命令并播放 .webm视频文件没有任何问题。gst-launch-1.0 playbin uri="file:///D:/gstreamer_sample_media/sintel_trailer-480p.webm"

但是当我尝试使用以下命令播放测试 .mts 文件时:

gst-launch-1.0 playbin uri="file:///D:/MyTestMedia/Test1.mts"
Run Code Online (Sandbox Code Playgroud)

出现以下错误:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Missing element: MPEG-2 Transport Stream demuxer
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No dec
oder available for type 'video/mpegts, systemstream=(boolean)true, packetsize=(i
nt)192'.
Additional debug info:
gsturidecodebin.c(930): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin
:uridecodebin0
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecode
Bin:decodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gstdecodebin2.c(3896): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDeco
deBin:uridecodebin0/GstDecodeBin:decodebin0:
no …
Run Code Online (Sandbox Code Playgroud)

windows plugins gstreamer

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

当我试图提出支持票时,aws上的AccessDeniedException

我刚刚提到这个问题AmazonServiceException:用户无权执行:dynamodb:DescribeTable状态代码:400; 错误代码:具有类似错误的AccessDeniedException.但它对我没有帮助.

当我尝试提出支持票时,我收到此错误:

Invalid Input

User: arn:aws:iam::44324457964845364:user/testetest is not authorized to perform: support: (Service: AWSSupport; Status Code: 400; Error Code: AccessDeniedException; Request ID: 65dq34fedq234rde9-adqwef443432fasd-13q4wf4qqrf-9q34fewq431-9fasdff3wefw43efw3eas5b4)
Run Code Online (Sandbox Code Playgroud)

这是我正在使用的链接https://console.aws.amazon.com/support

amazon-s3 amazon-web-services amazon-iam

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

单独模式中的 Alembic 版本表

我有 100 个用于 postgres 中不同应用程序的 alembic 版本表。一些应用程序使用不同的用户名进行迁移,并且可以search_path在 postgres 中为这些应用程序迁移设置。基于数据库用户名,由于search_path,版本表是在不同的postgres schema 中创建的。一些应用程序使用通用用户名并最终在公共模式中出现版本表名称冲突,因为它们没有将 search_path 设置为特定模式。如何让 alembic 使用特定的 postgres 架构来创建版本表?

python-3.x alembic

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

Workday Soap API - 用户名/密码

我试图调用Workday Integration API.我能够连接,但收到无效的用户名或密码消息.我的问题是 - 我在哪里提供这些信息?我在wsdl中没有看到任何可以输入用户名或密码的内容.

Launch_Integration

谢谢你的帮助!养兔场

soap workday-api

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