小编Pon*_*nty的帖子

在GWT 2.4中拖放

我有一个自定义小部件,实际上是一个图像,我希望能够将它拖动到AbsolutePanel内并每次都得到它的坐标.我想使用GWT 2.4的新DND API,但我很难实现它.有人可以提出我必须采取的基本步骤吗?

gwt drag-and-drop gwt2

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

在C中删除文件

我编写了一个操作文件的程序,有时我会删除一个文件.所以我搜索并在C中的stdio头文件中找到了remove()函数.

问题是有时有效,有时无效.有时文件被删除,其他perror()显示一条消息,说明权限被拒绝但我没有在文件上指定任何特殊权限.事实上,该文件之前由另一个函数创建.我必须考虑的任何特殊条件?

这是创建文件的加载函数:

...
int loadF ( const char *filename, plist_t pl, int size, int createFlag ) {
    FILE *pFile = NULL;
    pnode_t pn = NULL;
    int fsize;
    int total;
    int i;

    // Get file stream.
    pFile = fopen ( filename, "rb" );
    if ( !pFile ) { // File does not exist.
        if ( createFlag ) {
            if ( !createF ( filename ) ) {
                return 0;   // fail
            }
        } else {    // abort
            perror ( "loadF:fopen" ); …
Run Code Online (Sandbox Code Playgroud)

c

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

在Windows 7 64位上运行时出现Tiny Pe文件格式程序错误

我正在尝试在Windows 7 Ultimate 64位中运行以下汇编代码(与Nasm一起组装).

; tiny.asm

BITS 32

;
; MZ header
;
; The only two fields that matter are e_magic and e_lfanew

mzhdr:
    dw "MZ"                       ; e_magic
    dw 0                          ; e_cblp UNUSED
    dw 0                          ; e_cp UNUSED
    dw 0                          ; e_crlc UNUSED
    dw 0                          ; e_cparhdr UNUSED
    dw 0                          ; e_minalloc UNUSED
    dw 0                          ; e_maxalloc UNUSED
    dw 0                          ; e_ss UNUSED
    dw 0                          ; e_sp UNUSED
    dw 0                          ; e_csum UNUSED
    dw 0                          ; e_ip UNUSED
    dw …
Run Code Online (Sandbox Code Playgroud)

assembly nasm portable-executable windows-7

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

标签 统计

assembly ×1

c ×1

drag-and-drop ×1

gwt ×1

gwt2 ×1

nasm ×1

portable-executable ×1

windows-7 ×1