小编mal*_*lat的帖子

bash.exe - 找不到入口点

在尝试安装cygwin时,我不断收到此错误消息:

无法在动态链接库cygreadline7.dll中找到入口点rl_filename_rewrite_hook

谁看过这个吗 ?

谢谢

cygwin

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

wsimport不工作

当我尝试使用wsimport命令提示符下面的命令时,它工作正常:

wsimport -d generated C:\Users\generated\wsdlfile.xml
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试使用wsimport如下时,它会抛出以下错误:

wsimport -d generated https://example.com/exampleService.svc?wsdl

Failed to read the WSDL document: https://example.com/exampleService.svc?wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.

[ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s): At least one WSDL with at least one service definition needs to be provided.

        Failed to parse the WSDL.
Run Code Online (Sandbox Code Playgroud)

我可以从浏览器访问URL,同样的事情是从其他系统(从我的PC)开始.可能是什么原因?

wsdl wsimport

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

严格的C90代码的GCC选项?

我试图找到在测试严格的 C90一致性时使用的gcc标志的组合.根据以前的帖子:最严格的C代码的GCC选项?,我应该只需要--std = c90.

不过这是我试过的:

$ cat t.c
#include <stdint.h> /* added in C99 */

int main()
{
  uint64_t t;
  return 0;
}
$ gcc -std=c90 -ansi -pedantic   t.c
Run Code Online (Sandbox Code Playgroud)

以上确实运作良好(没有产生警告/错误).

有谁知道:

  1. gcc标志具有严格的ISO/IEC 9899:1990一致性
  2. 一个不同的编译器(tcc,clang ...)有不同的标志集?

编辑:

对不起,我的措辞,是的,我真的想模仿一个严格符合C90的编译器,换句话说,如果代码试图使用以后添加的任何功能(C99会浮现在脑海中),它应该会失败.所以pthread包含头应当GNU/GCC调用C90模式时编译时发出警告(就像stdint.h头应该产生没有C99的警告).-pedantic很好地警告我使用long long,我不明白为什么它不应该警告我uint64_t.

我使用ISO/IEC 9899:1990的术语引用自:

1990年,ANSI C标准(格式化改变)被国际标准化组织(ISO)采用为ISO/IEC 9899:1990,有时称为C90.因此,术语"C89"和"C90"指的是相同的编程语言.

EDIT2:

GCC文档实际上非常清楚:

作为C99标准的一部分的一些功能在C90模式中被接受为扩展,并且作为C11标准的一部分的一些功能在C90和C99模式中被接受为扩展.

所以我的问题被重新定义为:

  • linux系统上是否有编译器+标准include头,它严格符合C90?

c gcc iso c89

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

JTable为LocalTime类型定义了一个编辑器

以下文档后我使用的是Java 8:

我想在编辑JTable中的列时设置专门的格式化程序.此列包含java.time.LocalTime实例.

JTable table;
...
table.setDefaultEditor(LocalTime.class, new LocalTimeEditor());
Run Code Online (Sandbox Code Playgroud)

其中LocalTimeEditor由(暂定)之一定义:

public class LocalTimeEditor extends DefaultCellEditor {
    JFormattedTextField ftf;

  public LocalTimeEditor() {
    super(new JFormattedTextField());
    ftf = (JFormattedTextField) getComponent();

    // Set up the editor for the LocalTime cells.
    DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("HH:mm:ss");
    ftf.setFormatterFactory(new DefaultFormatterFactory(dateFormatter));
Run Code Online (Sandbox Code Playgroud)

但这会导致以下编译错误:

The constructor DefaultFormatterFactory(DateTimeFormatter) is undefined
Run Code Online (Sandbox Code Playgroud)

我想远离涉及SimpleDateFormat(+ DateFormatter)的解决方案,如此此处所述,因为java.util.Date应该被视为遗留(请参阅此处的旧代码).

是否有整合的解决方案DateTimeFormatterJFormattedTextField,还是我阻止:

我也想远离MaskFormatter …

java swing

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

无范围枚举的基础类型?

我在Visual Studio 2013(调试/ Win32编译)下观察到以下行为。考虑以下c ++代码:

#include <iostream>
#include <climits>

int main(int argc, char *argv[])
{
  enum { V = (unsigned long long)ULLONG_MAX } E;
  std::cout << sizeof E << std::endl;

  enum : unsigned long long { W = (unsigned long long)ULLONG_MAX } F;
  std::cout << sizeof F << std::endl;

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

编译后将导致:

$ ./enum.exe
4
8
Run Code Online (Sandbox Code Playgroud)

如果我正确理解c ++标准(Standard C ++ 7.2 / 5),则这是无效的c ++行为。在这种情况下,由于枚举器的值不能适合int或,因此不需要显式定义基础类型unsigned int

所以:

  1. 这是Visual Studio 2013的众所周知的限制(也许其他版本也会受到影响)吗?
  2. 有没有一种方法可以强制编译器为c ++ 98样式枚举使用适当的基础类型?还是我需要使用固定类型切换到c ++ …

c++ visual-studio-2013

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

分层JPEG编码器/解码器

有谁知道分层JPEG模式的任何实现(ITU T.81)?我不是在谈论渐进模式(或顺序),我的意思是分层模式.

compression jpeg encoder decoder

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

可在DICOM中使用的专用标签号

我想为现有的DICOM图像添加一些私有标签.

我想知道我可以使用哪些奇数标签.我是否需要通知任何组织我的意图?

dicom

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

HTML和显示<img rel="nofollow noreferrer" />元素

我试图了解网络是否允许查看渐进式 JPEG.

假设我们有一个服务器(参见渐进式jpegs):

$ identify /var/www/test.jpg
/var/www/test.jpg JPEG 2048x1080 2048x1080+0+0 8-bit DirectClass 129KB 0.020u 0:00.019
$ identify -verbose /var/www/test.jpg | grep Inter
  Interlace: JPEG
Run Code Online (Sandbox Code Playgroud)

现在,如果我们放置以下HTML文档:

$ cat /var/www/test.html
<!DOCTYPE html>
<html>
<head><title>jpg test</title></head>
<body>
<p><img src="test.jpg" width="256" height="128"></p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

我试图了解是否(根据img元素),用户代理需要下载整个 2048x1080图像,而渲染区域只是256x128.

或者相反,允许用户代理考虑渲染区域:256x128,因此推断它只能处理渐进式 JPEG的一部分.知道完全分辨率没有意义,因为它不会向图像添加任何细节(从技术上讲,质量层即使在低分辨率下也会产生影响,这只是为了简化).

通常,我想在谷歌地图等应用程序中知道,如果用户代理可以中止(暂停?)检索当前显示的图像,因为用户决定仅根据解压缩渐进式 JPEG的部分结果放大一些(整个JPEG尚未在用户端).

html w3c jpeg web-applications

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

如何使用两个匹配项筛选Oracle Sql Developer中的列

我正在慢慢学习sqldeveloper,我知道如何基于单个匹配的字符串进行过滤:只需复制/粘贴您想要匹配的字符串,或者如果您幸运的话,双击它.

现在我想基于两个不同的字符串进行查询,比如说'ABC'或'DEF',如何在'Filter'选项中做到这一点(右键单击列)?

复杂的过滤

oracle-sqldeveloper

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

从初始化列表转换为“A”将使用显式构造函数“A::A(int)”

我正在尝试将旧的 C++03 代码库迁移到 C++11。但我无法理解 gcc 在以下情况下警告我的内容:

\n
% g++ -std=c++03 t.cxx\n% g++ -std=c++11 t.cxx\nt.cxx: In function \xe2\x80\x98int main()\xe2\x80\x99:\nt.cxx:8:21: warning: converting to \xe2\x80\x98A\xe2\x80\x99 from initializer list would use explicit constructor \xe2\x80\x98A::A(int)\xe2\x80\x99\n    8 | int main() { B b = {}; }\n      |                     ^\nt.cxx:8:21: note: in C++11 and above a default constructor can be explicit\n
Run Code Online (Sandbox Code Playgroud)\n
struct A {\n  explicit A(int i = 42) {}\n};\nstruct B {\n  A a;\n};\n    \nint main() {\n  B b = {};\n  return 0;\n}\n
Run Code Online (Sandbox Code Playgroud)\n

我在这里想做的只是基本的零初始化。这对于 C++03 似乎是合法的,但我无法理解如何在 …

c++ gcc-warning c++11

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