小编twi*_*zle的帖子

将png图像合并为一个pdf文件

如何.png在Unix中将多个文件合并为一个PDF文件?

unix pdf merge png

79
推荐指数
4
解决办法
4万
查看次数

编译使用jni.h的c文件

我在编译以下程序时遇到问题

PPConverter.java:

 public class PPConverter {
    private native void convert(String s);
    public static void main(String[] args){
        new PPConverter().convert(args[0]);
    }
    static {
        System.loadLibrary("converter");
    }
}
Run Code Online (Sandbox Code Playgroud)

converter.c:

 #include <jni.h>
 #include <stdio.h>
 #include "PPConverter.h"

 JNIEXPORT void JNICALL Java_PPConverter_convert (JNIEnv *, jobject, jstring){
    printf(jstring);
    return;
  }
Run Code Online (Sandbox Code Playgroud)

由于我在UNIX上工作,我使用以下命令编译converter.c文件:

cc -I/usr/lib/jvm/java-6-openjdk/include  converter.c -o libconverter.so
Run Code Online (Sandbox Code Playgroud)

但我收到以下错误:

converter.c: In function âJava_PPConverter_convertâ:
converter.c:5: error: parameter name omitted
converter.c:5: error: parameter name omitted
converter.c:5: error: parameter name omitted
converter.c:6: error: expected expression before âjstringâ
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么??

java-native-interface

6
推荐指数
2
解决办法
3259
查看次数

在mouseover和mouseout上使用fadeOut()和fadeIn()

我的问题是,当我在mouseover上使用fadeOut()和在mouseout()(在<li>组件上)使用fadeIn()时,我没有得到我期望的结果.会发生的事情是,有时当鼠标不在对象上时,我想要fadeOut()的按钮只是在循环中保持淡入和淡出,有时循环停止,有时则不然.

使用鼠标悬停和鼠标悬停使用fadeOut和fadeIn的正确方法是什么?

这是代码:

comment.onmouseout = function() {mouseOut(comment);};
comment.onmouseover = function() {mouseOver(comment);}; 
Run Code Online (Sandbox Code Playgroud)

其中comment是一个基本的<li>,按钮作为子项

function mouseOut(parent){
    var children = parent.childNodes;
    var i=0;
    for(i=1;i<children.length;i++){
        if(children.item(i).tagName=="INPUT"){
            $(children.item(i)).fadeOut();
        }
    }
}
function mouseOver(parent){
    var children = parent.childNodes;
    var i=0;
    for(i=1;i<children.length;i++){
        if(children.item(i).tagName=="INPUT"){
            $(children.item(i)).fadeIn();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

jquery fadeout fadein

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

标签 统计

fadein ×1

fadeout ×1

java-native-interface ×1

jquery ×1

merge ×1

pdf ×1

png ×1

unix ×1