我有一个FixMessage,我想手动计算CheckSum.
8=FIX.4.2|9=49|35=5|34=1|49=ARCA|52=20150916-04:14:05.306|56=TW|10=157|
Run Code Online (Sandbox Code Playgroud)
这里的体长计算如下:
8=FIX.4.2|9=49|35=5|34=1|49=ARCA|52=20150916-04:14:05.306|56=TW|10=157|
0 + 0 + 5 + 5 + 8 + 26 + 5 + 0 = 49(correct)
Run Code Online (Sandbox Code Playgroud)
checkSum是157(10 = 157).在这种情况下如何计算?
我从Java开始,我正在学习setter,getters和encapsulation.我有一个非常简单的程序,两个类:
Container有一个私有的int array(numArray)与他的setter和getter.
Main创建一个Container对象并在totalArray方法中使用它.
public class Container {
private int numArray[]= {0,0,0};
public int[] getNumArray() {
return numArray;
}
public void setNumArray(int index, int value){
numArray[index] = value;
}
}
public class Main {
public static void main(String[] args) {
Container conte = new Container();
System.out.println(totalArray(conte.getNumArray()));
conte.getNumArray()[2]++;
System.out.println(totalArray(conte.getNumArray()));
}
private static int totalArray (int v[]){
int total=0;
for (int conta =0; conta<v.length;conta++){
total+=v[conta];
}
return total;
}
}
Run Code Online (Sandbox Code Playgroud)
问题:我可以通过getter更改private int数组,我知道这是因为getNumArray返回引用 …
过去几天我一直遇到这个错误,同时从Eclipse发布到JBoss EAP 6.3或Wildfly 8.2.
Error renaming D:\Servers\wildfly-8.2.0.Final\standalone\tmp\tmp9064011157118650757.jar
to D:\Servers\wildfly-8.2.0.Final\standalone\deployments\BusinessService.war\WEB-INF\lib\spring-web-4.2.3.RELEASE.jar.
This may be caused by incorrect file permissions, or your server's temporary deploy
directory may be on a different filesystem than the final destination. You may adjust
these settings in the server editor.
Run Code Online (Sandbox Code Playgroud)
当我从服务器"添加和删除..."项目,然后尝试发布它们时,会出现问题,因此服务器可以启动.
我在两台不同的机器(家庭(Wildfly)和工作(JBoss EAP))上遇到过这个问题.
我正在使用:
使用Eclipse和命令行中的maven构建没有任何区别.服务器配置为将项目部署为压缩存档.在这两台机器上,我的用户具有管理员权限,并拥有服务器目录的完全权限.
到目前为止,我已经尝试过:
我真的很茫然,我不知道如何解决这个问题.请帮忙.
我目前有以下查询:
select
DATEADD(MONTH, DATEDIFF(MONTH, 0, StartDate), 0) as MonthYear, count(*) as Count
from
visit
where
StartDate >= DATEADD(year,-1,GETDATE())
and clientid = 142
group by
DATEADD(MONTH, DATEDIFF(MONTH, 0, StartDate), 0)
Run Code Online (Sandbox Code Playgroud)
返回以下结果:
+-------------------------+----+
| 2015-12-01 00:00:00.000 | 1 |
| 2016-02-01 00:00:00.000 | 13 |
| 2016-03-01 00:00:00.000 | 1 |
| 2016-04-01 00:00:00.000 | 22 |
| 2016-05-01 00:00:00.000 | 22 |
| 2016-06-01 00:00:00.000 | 25 |
| 2016-07-01 00:00:00.000 | 36 |
+-------------------------+----+
Run Code Online (Sandbox Code Playgroud)
我也有以下查询:
SELECT TOP (12)
DATEADD(MONTH, DATEDIFF(MONTH, …Run Code Online (Sandbox Code Playgroud) 昨天我们的Web应用程序在WildFly 9上正常运行.从今天早上开始,我在Web浏览器中只获得了"Forbidden".我们不使用JAAS.也没有区别,如果我下面的值设置为false在standalone.xml:
...
<subsystem xmlns="urn:jboss:domain:ejb3:3.0">
...
<default-missing-method-permissions-deny-access value="true"/>
...
</subsystem>
...
Run Code Online (Sandbox Code Playgroud)
WildFly只显示"禁止"页面的原因是什么?
编辑
如果我将包的日志级别设置org.jboss.security为TRACE我在调用页面时在日志文件中收到以下消息:
2016-01-27 12:58:15,354 TRACE [org.jboss.security] (default task-5) PBOX00354: Setting security roles ThreadLocal: null
Run Code Online (Sandbox Code Playgroud)
不知道这意味着什么......
对于我正在努力解决的问题,我需要一些帮助.
示例表:
ID |Identifier1 | Identifier2
---------------------------------
1 | a | c
2 | b | f
3 | a | g
4 | c | h
5 | b | j
6 | d | f
7 | e | k
8 | i |
9 | l | h
Run Code Online (Sandbox Code Playgroud)
我想将两列之间相互关联的标识符分组,并分配唯一的组ID.
期望的输出:
Identifier | Gr_ID | Gr.Members
---------------------------------------------------
a | 1 | (a,c,g,h,l)
b | 2 | (b,d,f,j)
c | 1 | (a,c,g,h,l)
d | 2 | (b,d,f,j)
e …Run Code Online (Sandbox Code Playgroud) 我需要一个简单的例子来说明如何初始化会话并发送一条FIX消息.我有这个初始代码:
SessionSettings settings = new SessionSettings( new FileInputStream("fix.cfg"));
Application application = new Application(settings);
MessageStoreFactory messageStoreFactory = new FileStoreFactory(settings);
LogFactory logFactory = new ScreenLogFactory( true, true, true);
MessageFactory messageFactory = new DefaultMessageFactory();
Initiator initiator = new SocketInitiator(application, messageStoreFactory, settings, logFactory, messageFactory);
initiator.start();
Run Code Online (Sandbox Code Playgroud) 我有一个进程,第一步是检查其他进程的状态。如果其他过程完成,我想运行其余步骤,如果没有,我想退出工作。
我有一个表格来查看状态,如果全部完成,它将标记为“完成”。那么我应该在第一步中输入什么,以便当状态不是“完成”时,会使步骤 1 失败?
我在WildFly 10服务器上运行我的应用程序.我不希望将我的连接细节放在我的应用程序src代码上,因此我试图将它放在WildFly 10服务器本身.
但是我遇到了问题.
在[WILDFLY_HOME]\modules\system\layers\base\com\microsoft,我创建了以下目录sqlserver\main,并将我的JAR文件和我的XML文件放在主文件夹中.
我正在使用的JAR是sqljdbc.jar.
module.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- JDBC Drivers module.xml file to configure your JDBC drivers-->
<!-- SQL Server 2014 example -->
<module xmlns="urn:jboss:module:1.3" name="com.microsoft.sqlserver">
<resources>
<resource-root path="sqljdbc.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
Run Code Online (Sandbox Code Playgroud)
接下来[WILDFLY_HOME]\standalone\configuration,我修改了standalone.xml.在子系统数据源部分下,我添加了SQL Server的详细信息.
standalone.xml:
<subsystem xmlns="urn:jboss:domain:datasources:4.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jndi-name="java:/TestDS" pool-name="TestDS" enabled="true" use-java-context="true">
<connection-url>jdbc:sqlserver://localhost\test:1433;databaseName=test</connection-url>
<driver>mssql</driver>
<security>
<user-name>sa</user-name>
<password>Password123!</password>
</security>
<pool> …Run Code Online (Sandbox Code Playgroud) java ×4
sql-server ×4
wildfly ×3
fix-protocol ×2
arrays ×1
eclipse ×1
getter ×1
jboss ×1
math ×1
maven ×1
mssql-jdbc ×1
quickfix ×1
quickfixj ×1
random ×1
server ×1
sql ×1
t-sql ×1
wildfly-10 ×1
wildfly-9 ×1