JumpNote:未指定主类型

我正在Android / GoogleApp中迈出第一步,我正在尝试探索Jumpnote示例: http : //code.google.com/p/jumpnote/ 我能够将Android和Appengine项目导入eclipse,但在尝试运行Jumpnote-web部分时遇到了以下问题(android运行良好)。 运行Web部件时出现错误Main type is not specified哪个AFAIK暗示该项目缺少主要function。 跳转示例确实如此,我需要手动添加它,或者我错过了其他的东西?

怀疑使用java获取昨天的日期

我想用java获取昨天的日期。 我使用了以下代码但每次都给出不同的日期,请检查代码是否必须在任何地方更改。 提前致谢。 SimpleDateFormat formatter= new SimpleDateFormat(“yyyy-mm-dd “); Calendar currentDate = Calendar.getInstance(); String previous = formatter.format(currentDate.getTime())+ “00:00:00.000000000”; System.out.println(“previous =”+previous); currentDate.add(Calendar.DATE, -1); String previousDate = formatter.format(currentDate.getTime())+ “00:00:00.000000000”; Timestamp updateTimestamp = Timestamp.valueOf(previousDate); System.out.println(“Update date =”+updateTimestamp); 这是我最后跑的时候得到的输出 上一个= 2010-15-11 00:00:00.000000000 更新日期= 2011-03-10 00:00:00.0

如何实现或找到线程安全的CompletionService的等价物?

我有一个在Tomcat容器中运行的简单Web服务,它本质上是multithreading的。 在进入服务的每个请求中,我想要对外部服务进行并发调用。 java.util.concurrent中的ExecutorCompletionService使我部分得到了。 我可以为它提供一个线程池,它将负责执行我的并发调用,当任何结果准备就绪时我会收到通知。 处理特定传入请求的代码可能如下所示: void handleRequest(Integer[] input) { // Submit tasks CompletionService completionService = new ExecutorCompletionService(Executors.newCachedThreadPool()); for (final Integer i : input) { completionService.submit(new Callable() { public Integer call() { return -1 * i; } }); } // Do other stuff… // Get task results try { for (int i = 0; i < […]

检索解密数据时出现问题

我正在研究加密 – 解密程序。 程序从用户获取输入并加密。 然后它将加密数据存储在ms访问数据库表中。 稍后,从表中检索数据,解密并返回给用户。 我将数据存储为ms访问中的文本。 加密算法返回一个大小为16的字节数组。但是当我从数据库中检索数据时,我得到一个大小为8的字节数组。 帮我解决这个问题……

审核数据库中多个表的历史记录

我的数据库中有3-4个表,我想跟踪它们的变化。 我主要关注更新。 每当发生更新时,我想在审计表中存储先前的条目(值或完整行)。 我想到的基本专栏如下: AuditId, TableName, PK1, PK2, PK3, PKVal1, PKVal2, PKVal3, UpdateType, PrevEntryJSON JSON将采用以下格式: Key:Value ,我更喜欢随着列的不断变化,我希望保留所有值,即使它们没有变化。 其他选项是删除带有100个列的JSON,这些列的名称与不同的列相同(所有表的累计)。 我想听听别人对此的看法。 我怎么能改进它以及我可以面对哪些问题? 通过触发器可能不是更好的方式,但我对此持开放态度。 谢谢,

SecurityException:升级到JRE 1.7.0_13后错误的applet类名

升级到JRE 1.7.0_13后,我的Applet不再运行了。 我得到以下安全例外: basic: Fortschritts-Listener hinzugefügt: sun.plugin.util.ProgressMonitorAdapter@25a091 basic: Ausnahme: Bad applet class name. ExitException[ 3]java.lang.SecurityException: Bad applet class name at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) basic: Fortschritts-Listener entfernt: sun.plugin.util.ProgressMonitorAdapter@25a091 棘手的是applet没有从Web服务器加载,而是安装在JRE lib / ext目录中。 我认为’bad applet class name’已经与_013一起介绍了,因为我找不到任何关于它的信息。 该消息没有给我任何关于改变内容的提示。 下面是applet在网页中的嵌入。 有人知道该怎么办?

Wicket 6 IColumn名称除字符串外的类型如何?

接口IColumn包含一个方法getSortProperty(),它返回任何类型S的值。名称的类型可以是除字符串以外的类型? /** * Returns the name of the property that this header sorts. If null is returned the header will * be unsortable. * * @return the sort property */ S getSortProperty(); http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/extensions/markup/html/repeater/data/table/IColumn.html 在wicket旧版本6: PropertyColumn column = new PropertyColumn(Model.of(“Header”), “sortProperty”, “propertyExpression”); Wicket 6:描述: PropertyColumn(IModel displayModel, S sortProperty, String propertyExpression); 例: PropertyColumn column = new PropertyColumn(Model.of(“Header”), […]

Tomcat是否使用pl / sql模块的缓存版本?

好想象一下这种情况。 我对pl / sql模块进行了更改,重新编译它,一切都很好。 没有错误。 然后我尝试访问在Tomcat上运行的应用程序的GUI屏幕。 该屏幕调用oracle数据库中的pl / sql模块。 当我提交应该调用pl / sql模块来处理数据的表单时,我收到此错误 ORA-20001: ORA-06508: PL/SQL: could not find program unit being called 我检查了$ USER_OBJECTS中的所有包,并且没有状态为INVALID。 我重新启动了Tomcat,然后它开始工作。 这是否意味着当我第一次重新编译包时,我有效地删除了对Tomcat使用的包的一些缓存引用? 与数据库的连接是通过JDBC和DBCP连接池实现的。 重新编译可能会使连接无效吗?

斯坦福NLP – 处理文件列表时OpenIE内存不足

我正在尝试使用Stanford CoreNLP中的OpenIE工具从多个文件中提取信息,当几个文件传递给输入时,它会产生内存不足错误,而不是只有一个。 All files have been queued; awaiting termination… java.lang.OutOfMemoryError: GC overhead limit exceeded at edu.stanford.nlp.graph.DirectedMultiGraph.outgoingEdgeIterator(DirectedMultiGraph.java:508) at edu.stanford.nlp.semgraph.SemanticGraph.outgoingEdgeIterator(SemanticGraph.java:165) at edu.stanford.nlp.semgraph.semgrex.GraphRelation$GOVERNER$1.advance(GraphRelation.java:267) at edu.stanford.nlp.semgraph.semgrex.GraphRelation$SearchNodeIterator.initialize(GraphRelation.java:1102) at edu.stanford.nlp.semgraph.semgrex.GraphRelation$SearchNodeIterator.(GraphRelation.java:1083) at edu.stanford.nlp.semgraph.semgrex.GraphRelation$GOVERNER$1.(GraphRelation.java:257) at edu.stanford.nlp.semgraph.semgrex.GraphRelation$GOVERNER.searchNodeIterator(GraphRelation.java:257) at edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher.resetChildIter(NodePattern.java:320) at edu.stanford.nlp.semgraph.semgrex.CoordinationPattern$CoordinationMatcher.matches(CoordinationPattern.java:211) at edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher.matchChild(NodePattern.java:514) at edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher.matches(NodePattern.java:542) at edu.stanford.nlp.naturalli.RelationTripleSegmenter.segmentVerb(RelationTripleSegmenter.java:541) at edu.stanford.nlp.naturalli.RelationTripleSegmenter.segment(RelationTripleSegmenter.java:850) at edu.stanford.nlp.naturalli.OpenIE.relationInFragment(OpenIE.java:354) at edu.stanford.nlp.naturalli.OpenIE.lambda$relationsInFragments$2(OpenIE.java:366) at edu.stanford.nlp.naturalli.OpenIE$$Lambda$76/1438896944.apply(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) […]

Java EE安装程序在Mac OS X Mavericks上崩溃

试图在OS 10.9 Mavericks上安装Java EE 7 / Glassfish 4并且每次都崩溃。 我已经尝试安装Apple JDK和Oracle JDK,但都不起作用。 有没有人碰到这个? 我记得安装在10.8上它工作得很好。 谢谢! 环境变量: $ echo $ JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home 输出: $ chmod +x java_ee_sdk-7-jdk7-macosx-x64.sh $ ./java_ee_sdk-7-jdk7-macosx-x64.sh Extracting the installer archive… Extracting the installer runtime… Extracting the installer resources… Extracting the installer metadata… Welcome to GlassFish installer Using the user defined JAVA_HOME : /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home Entering […]