我将开始一个新项目.在这个项目中,我有一个服务器和许多客户端(超过100000).客户端和服务器将持续相互通信.他们只使用短信.我认为,用tcp套接字管理太难了所以我应该选择XMPP或SIP.我将在这个项目中使用Java.你建议我哪一个?他们的利弊是什么?或者你知道更有效的解决方案吗?
我正在使用weblogic 10.3.6.0和maven 3.我想用maven插件将我的项目部署到weblogic服务器.我在这个oracle文档中执行相同的步骤
但是当我构建我的项目时,我得到了这个错误
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss Portlet Bridge - JSF 2 Basic Portlet 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- weblogic-maven-plugin:2.9.5:deploy (default-cli) @ TestWeblogic ---
[WARNING] The POM for weblogic:weblogic:jar:10.3.6 is missing, no dependency i information available
[WARNING] The POM for weblogic:webservices:jar:10.3.6 is missing, no dependency information available …Run Code Online (Sandbox Code Playgroud) 我想在打开后更新内容primafaces对话框.可能吗?我的示例代码如下.
<p:dialog widgetVar="pictureSaveDialog" id="pictureDialog" closable="false" >
<p:outputPanel id="saveDialogPanel">
<p:selectOneRadio id="options" value="#{pictureDefinitionsView.radioValue}" >
<f:selectItem itemLabel="FILE" itemValue="FILE" />
<f:selectItem itemLabel="" itemValue="URL" />
<p:ajax update="fileUpload1 fileUpload2" event="click" process="options" />
</p:selectOneRadio>
<p:outputPanel id="fileUpload1" rendered="#{pictureDefinitionsView.selectedFileUpload}"> File </p:outputPanel>
<p:outputPanel id="fileUpload2" rendered="#{pictureDefinitionsView.selectedUrlUpload}"> URL </p:outputPanel>
</p:outputPanel id="saveDialogPanel">
Run Code Online (Sandbox Code Playgroud)
豆方法.
public boolean isSelectedFileUpload(){
return radioValue.equals("FILE");
}
public boolean isSelectedUrlUpload(){
return !isSelectedFileUpload();
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试学习Android USB主机/附件连接.我读Android设备可以行为usb主机或USB配件.因此我创建了两个项目,其中一个是usb主机项目,另一个是usb附件项目.我将这些项目安装到两个不同的Android设备上.其中一个有usb主机(Device A)项目,另一个有usb附件(Device B)项目.
我的问题是,我可以将usb主机项目连接到Device B.我可以看到有关设备的所有信息.但在配件项目(设备B)中我看不到有关设备A的任何事情.
manager.getAccessoryList()始终返回null.我的USB配件项目代码在这里.
UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
for (UsbAccessory accessory : manager.getAccessoryList()) {
String list = " DESCRIPTION : " + accessory.getDescription() + " MODEL : " + accessory.getModel() + " MANUFACTURER : " + accessory.getManufacturer() + " SERIAL : " + accessory.getSerial();
Toast.makeText(this, list, Toast.LENGTH_LONG).show();
}
Run Code Online (Sandbox Code Playgroud) 我尝试从评估板上读取数据。这是Stellaris EKK-LM4F232评估套件。它有五个按钮。我按一下板上的按钮,然后将数据发送到我的android设备。例如,我按一次,然后木板发送到1,第二次发送到2。...当我第一次按下按钮时,我从android设备接收到第一个值(表示1)。但是当我再次按下按钮时,我无法收到其他任何值,例如2,3,4,...。这是我的阅读代码。开始时会连续读取。你能帮助我吗?
public void startDataRecieve() {
new Thread(new Runnable() {
@Override
public void run() {
UsbEndpoint endpoint = null;
for (int i = 0; i < intf.getEndpointCount(); i++) {
if (intf.getEndpoint(i).getDirection() == UsbConstants.USB_DIR_IN) {
endpoint = intf.getEndpoint(i);
break;
}
}
UsbRequest request = new UsbRequest(); // create an URB
boolean initilzed = request.initialize(connection, endpoint);
if (!initilzed) {
Log.e("USB CONNECTION FAILED", "Request initialization failed for reading");
return;
}
while (true) {
int bufferMaxLength = endpoint.getMaxPacketSize();
ByteBuffer buffer = ByteBuffer.allocate(bufferMaxLength);
if (request.queue(buffer, …Run Code Online (Sandbox Code Playgroud)