小编Cai*_*der的帖子

Eclipse RCP,为什么透视栏不会出现?

我在WorkbenchWindowAdvisor的postWindowOpen方法中调用了这样的方法

windowConfigurer.setShowPerspectiveBar(真);

但透视栏仍然没有显示出来

eclipse-rcp

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

是否有支持动画GIF的自定义Label小部件?

我正在尝试编写一个Label支持动画GIF 的自定义小部件,但我发现它对我来说很难.是否已经有这样的小部件可供使用?

编辑 ------------------------------------------------- --------------------------------
当我尝试使用GifCLabel类时,它可以正常使用gif图片(动画) ,但是如果我在动画线程运行时尝试设置静态png图片,则不会显示png图片,但会显示动画gif的帧,这是我的代码:

public PageDemo(Shell parentShell) {
        super(parentShell);
        Composite topComp = new Composite(parentShell, SWT.NONE);
        topComp.setLayout(new FormLayout());
        final GifCLabel gl = new GifCLabel(topComp, SWT.CENTER);
        gl.setText("some message");
        gl.setGifImage("c://loading.gif");
        Display.getCurrent().timerExec(5000, new Runnable(){
            @Override
            public void run() {
                // gl.setGifImage("c:\\filter.png"); // also not work
                gl.setImage(SWTResourceManager.getImage("c:\\filter.png"));
            }
        });

    }
Run Code Online (Sandbox Code Playgroud)

错误修复 ------------------------------------------------ --------------------------------
我认为Sorceror的代码很好,但似乎有一个小错误:

public void run() {
            while (run) {
                int delayTime = loader.data[imageNumber].delayTime;
                try {
                    Thread.sleep(delayTime * 10);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                if (!GifCLabel.this.isDisposed()) { …
Run Code Online (Sandbox Code Playgroud)

swt

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

在html页面中显示javascript代码

在IE Quirks模式下,我想使用以下代码在html页面上显示一些javascript函数:

document.write('<pre>' + someFunction + '</pre>');
Run Code Online (Sandbox Code Playgroud)

但是如果函数的源包含'<',则只显示'<'之前的源代码.

例如 :

function a(j){
   var i = 0;
   if(i<j){
       alert(j + ' is greater than zero');
   }
}
Run Code Online (Sandbox Code Playgroud)

将显示为:

function a(j){
       var i = 0;
       if(i
Run Code Online (Sandbox Code Playgroud)

如何让它显示一个函数的完整源代码?

html javascript internet-explorer-6

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

如何更改Oracle 10gr2 express Edition的默认字符集

我在笔记本电脑上安装了oracle 10gr2 express版.当我导入由oracle 10gr2企业版生成的.dmp文件时,会发生错误.

生成.dmp文件的数据库服务器正在运行 GBK字符集,但我的oracle express服务器正在运行UTF-8.

SQL> select userenv('language') from dual;

USERENV('LANGUAGE')
--------------------------------------------------------------------------------
SIMPLIFIED CHINESE_CHINA.AL32UTF8
Run Code Online (Sandbox Code Playgroud)

如何配置我自己的oracle服务器来导入.dmp文件?

编辑------------------------------------------------- - 我自己的oracle express服务器:

SQL> select * from v$nls_parameters where parameter like '%CHARACTERSET';

PARAMETER
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET
AL32UTF8

NLS_NCHAR_CHARACTERSET
AL16UTF16
Run Code Online (Sandbox Code Playgroud)

oracle10g ora-12899

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