在eclipse中,我遇到了与构建路径相关的错误.
错误:
Project 'XX' is missing required library: 'middlegen-2.1.jar'
Run Code Online (Sandbox Code Playgroud)
但是在构建路径配置之前删除了库.
缓存可能有问题吗?
有没有人知道为什么eclipse说即使在构建路径配置之前删除了库也需要库.
最好的
当我尝试使用ant构建项目时,我收到了以下警告.我的build.xml是从eclipse自动生成的:
warning: NotImplementedException is internal proprietary API and may be removed in a future release
Run Code Online (Sandbox Code Playgroud)
在Eclipse中,该行没有错误,如果我删除该行(是休眠的注释),则错误将在另一行中发生.似乎错误出现在我的java文件的第一行.
我试图用新版本和javax持久性替换hibernate和注释.但没有任何帮助.
我希望其他人有同样的失败,知道我需要做什么.
编辑:
@Entity
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
@Table(name="myclass")
public class MYCLASS implements Cloneable {
Run Code Online (Sandbox Code Playgroud)
第二行生成警告.但如果我删除该行,下一个将生成相同的警告.如果我删除所有注释,最后一行会生成警告.
如何分离来自管道的线.在管道中有这样的文字:
HALLO:500\n
TEST:300\N
ADAD
ADAWFFA
AFAGAGAEG
Run Code Online (Sandbox Code Playgroud)
我想将管道与管道分开,因为我想将值保存在变量中.
这是我的c代码:
#include <stdio.h>
#include <stdlib.h>
#define BUFFERSIZE 1
int main(int argc, char **argv){
unsigned char buffer[BUFFERSIZE];
FILE *instream;
int bytes_read=0;
int buffer_size=0;
buffer_size=sizeof(unsigned char)*BUFFERSIZE;
/* open stdin for reading */
instream=fopen("/dev/stdin","r");
/* did it open? */
if(instream!=NULL){
/* read from stdin until it's end */
while((bytes_read=fread(&buffer, buffer_size, 1, instream))==buffer_size){
fprintf(stdout, "%c", buffer[0]);
}
}
/* if any error occured, exit with an error message */
else{
fprintf(stderr, "ERROR opening stdin. aborting.\n");
exit(1);
} …Run Code Online (Sandbox Code Playgroud) 我用一个会话连接到我的数据库.我在整个计划中总是使用相同的会话.我的线程"1"从数据库中捕获主数据.必须允许用户取消此线程.因此,如果用户经常或快速按下取消按钮(这是我的解释),则会发生以下错误:
ERROR org.hibernate.AssertionFailure - HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: possible non-threadsafe access to the session
Run Code Online (Sandbox Code Playgroud)
如果我在我的线程"1"完成并尝试从数据库加载另一个主数据集后取消我在后台运行的线程"2",则会发生相同的错误.
我在两个线程中使用相同会话的失败是什么?
解决这个问题的正确方法是什么?
我需要执行这个sql:
select * from
(select nt.*,
rank() over (partition by feld0 order by feld1 desc) as ranking
from (select bla from test) nt)
where ranking < 3
order by 1,2
Run Code Online (Sandbox Code Playgroud)
这个sql在我的oracle数据库中工作正常,但是在我使用的h2数据库中,这有点不起作用,因为没有定义rank和partition.
所以我需要转换这个sql,以便它在h2和oracle中工作.
我想用java来执行这个sql.那么有可能将这个sql拆分成不同的sqls而没有rank和partition吗?然后用java处理它?
我在oracle中有以下功能,我必须转换为h2.任何人都可以帮助我.我不知道这样做:
create or replace function unpack_info (p_trackchar table.ordchar%type)
return varchar2 is
l_res varchar2(8);
begin
select decode(bitand(to_number(ascii(p_trackchar)),1),1,'1','0') ||
decode(bitand(to_number(ascii(p_trackchar)),2),2,'1','0') ||
decode(bitand(to_number(ascii(p_trackchar)),4),4,'1','0') ||
decode(bitand(to_number(ascii(p_trackchar)),8),8,'1','0') ||
decode(bitand(to_number(ascii(p_trackchar)),16),16,'1','0') ||
decode(bitand(to_number(ascii(p_trackchar)),32),32,'1','0') ||
decode(bitand(to_number(ascii(p_trackchar)),64),64,'1','0') into l_res
from dual;
return l_res;
end;
Run Code Online (Sandbox Code Playgroud)
我曾尝试先做一些基础知识但是这个函数的创建不起作用:
CREATE ALIAS HTS.TEST AS $$
String nextPrime(String value){
return null;
}
$$;
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
错误:SQL Befehl中的语法Fehler"CREATE ALIAS HTS.TEST AS [ ] $$ String nextPrime(String value){return null"SQL语句中的语法错误"CREATE ALIAS HTS.TEST AS [ ] $$ String nextPrime(String value) {return null"[42000-162]
这是翻译的正确方法还是我能做什么?
我创建了一个别名(测试一个)并且可以执行它.现在,我必须为unpack:info创建别名.有人可以帮助我解决语法等问题.该函数在h2中如何看作别名?
我想忽略特定文件抛出的ant的警告.
这不是强制性的,为什么有警告我只想找到一种方法,任何忽略警告形成一个特定的类文件.
有没有办法做到这一点?
java compiler-construction ant compiler-warnings suppress-warnings
我需要将双精度值放入文件中。因此,对于所有其他字符串,我必须使用 fputs 输出,因为我认为并计时 fputs 比 fprintf 更快。
但如果我想输出双精度值,我无法使用 fputs 做到这一点,所以我尝试了 fprintf。这非常慢。如果我替换 fprintf 并放入 fputs("TEST",file); 我需要更多时间;
我怎样才能像字符串一样快地输出双精度数。我需要先将其转换为字符串吗?
我发现了一些转换。但如果我使用它们,我会像使用 fprintf 一样慢。
那么我怎样才能像将字符串放入文件一样快地将双精度数放入文件中呢?
fputs("TEST",fileout); //FAST
fprintf(fileout, "%f",p); //SLOW
Run Code Online (Sandbox Code Playgroud)
编辑:
使用 fprintf double 的时间:
END.PROCESSING.DATA: 2013-04-26 08:10:33.000
END.CALC.IN.FILE: 2013-04-26 08:11:13.000
Run Code Online (Sandbox Code Playgroud)
使用 fputs 字符串的时间:
END.PROCESSING.DATA: 2013-04-26 08:14:10.000
END.CALC.IN.FILE: 2013-04-26 08:14:37.000
Run Code Online (Sandbox Code Playgroud)
当时的代码:
now = time (0);
strftime (buff, 100, "%Y-%m-%d %H:%M:%S.000", localtime (&now));
printf ("END.PROCESSING.DATA: %s\n", buff);
//output file
FILE *fileout;
fileout = fopen("out.txt","w");
double p;
for(i=0; i<17000;i++){
for(j=0; j<i;j++){
for(z=0;z<400;z++){
//DO SOME WORK
}
p …Run Code Online (Sandbox Code Playgroud)