我在编译以下程序时遇到问题
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)
我究竟做错了什么??
我的问题是,当我在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)