我想在Windows下编写基本的程序集,我正在使用NASM,但我无法正常工作.
如何在Windows上没有C函数的帮助下编写和编译hello world?
在Hibernate中删除表中所有行的最佳方法是什么?
如果我迭代一个集合并称session.delete()它不符合我的知识.
如果我使用其他选项session.createQuery("delete ..."),则不会影响持久性上下文.
如果没有更好的变体,我应该使用这些方法吗?
我有一个Swing应用程序,即使我在try/中有所有内容,block也没有捕到异常.
public static void main(String[] args) {
try {
App app = new App();
app.setVisible(true);
} catch (Throwable e) {
System.err.println("never printed");
}
}
Run Code Online (Sandbox Code Playgroud)
我得到的只是这个堆栈跟踪:
Exception in thread "AWT-EventQueue-0"
java.lang.ArrayIndexOutOfBoundsException:
9 >= 9
at java.util.Vector.elementAt(Vector.java:427)
at javax.swing.table.DefaultTableModel.getValueAt(DefaultTableModel.java:633)
at javax.swing.JTable.getValueAt(JTable.java:2695)
at javax.swing.JTable.prepareRenderer(JTable.java:5712)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2075)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1977)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1773)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
at javax.swing.JComponent.paintComponent(JComponent.java:763)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JViewport.paint(JViewport.java:747)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at …Run Code Online (Sandbox Code Playgroud) 我创建了一个项目,并使用了svn import.现在我想对文件进行更改,如何做到这一点?
我有空~/.workspace/project/.svn/entries.
如果我尝试svn commit我得到这个:
$ svn commit src/dat/Win.java
svn: '/home/st/.workspace/dat/src/dat' is not a working copy
svn: Can't open file '/home/st/.workspace/dat/src/dat/.svn/entries': No such file or
Run Code Online (Sandbox Code Playgroud)
目录
......或者只是svn commit:
$ svn commit
svn: Can't read file '/home/st/.workspace/dat/.svn/entries': End of file found
Run Code Online (Sandbox Code Playgroud) 我正在考虑学习ruby和python一点点,我想到了,因为ruby/python有什么用?什么时候使用ruby和python,或者什么ruby/python不适合?:)
我应该用这些语言做什么?
谢谢
当我在client-config.wsdd中为WSDoAllSender和WSDoAllReceiver定义(使用轴1.4和wss4j)时,我有不同的signaturePropFiles,其中我有不同的密钥库,用不同的证书定义,我可以有不同的发送和接收证书.但是当我使用相同的keyPropFiles'时,我使用相同的密钥库.我尝试发送消息时收到此消息:
org.apache.ws.security.components.crypto.CryptoBase -- Cannot find key for alias: [monit] in keystore of type [jks] from provider [SUN version 1.5] with size [2] and aliases: {other, monit}
- Error during Signature: ; nested exception is:
org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is:
java.lang.Exception: Cannot find key for alias: [monit]
org.apache.ws.security.WSSecurityException: Error during Signature: ; nested exception is:
org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is:
java.lang.Exception: Cannot find key for alias: [monit]
at org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:60)
at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:202)
at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:168)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) …Run Code Online (Sandbox Code Playgroud) 我正在开发一个小型swing应用程序,我不确定是否应该使用printStackTrace().
如果我得到异常,我会通过JOptionPane向用户显示一条消息,例如:找不到文件等.
但与此同时,我正在使用printStackTrace(),我不确定既不向用户显示堆栈跟踪也不打印任何东西......以防万一需要它.
我可以将printStackTrace留在那里或为什么不离开?
谢谢你的建议.
我是Java新手,我想问一下.
在服务器上配置应用程序是否有意义,我只有控制台?
有没有合理的控制台分析器?
或者我应该只在localhost上分析应用程序?
嗨,我有一个webapp - 在一种方法中,我需要从请求加密部分数据并将它们存储在磁盘上并返回响应.
响应与加密无关.
然而,加密时间要求很高.如何在这个问题上正确地创建线程?
我试过类似的东西
线程线程......
thread.start();
要么
JobDetail job = encryptionScheduler.getJobDetail(jobDetail.getName(),jobDetail.getGroup());
encryptionScheduler.scheduleJob(的JobDetail,TriggerUtils.makeImmediateTrigger( "encryptionTrigger",1,1)
我尝试了servlet,在加密之前我关闭了outpuStream.
或:Executors.newFixedThreadPool(1);
但无论我尝试什么,客户都必须等待更长时间.
顺便问一下:为什么会这样?可以更快吗?
我没有尝试在上下文初始化后启动线程并等待某种方法需要加密.
如何加快这个?
谢谢
--------------编辑://我使用轴1.4,我有Handler,它在调用方法中加密一个值:
try {
LogFile logFile = new LogFile(strategy,nodeValue,path, new Date());
LogQueue.queue.add(logFile);
}
catch (Exception e) {
log.error(e.getMessage(),e);
}
EExecutor.executorService.execute(new Runnable() {
public void run() {
try {
LogFile poll = LogQueue.queue.poll();
String strategy = poll.getStrategy();
String value = poll.getNodeValue();
value = encrypt(strategy,value);
PrintWriter writer = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(poll.getPath(), true )),"UTF-8"));
writer.print(value);
writer.close();
}catch (IOException e ) …Run Code Online (Sandbox Code Playgroud)