有没有谷歌和解决方案是在apache中使用iptables或mod重定向?由于我的应用程序使用websockets,上面的解决方案破坏了我的websocket连接,我再次使用端口8080连接到我的websockets.有没有办法可以在端口80上运行glassfish本身,这样我的websockets也可以在端口80上运行更容易对于公司防火墙后面的用户访问应用程序,因为corparates可能阻止8080.
我也有root访问权限.
默认情况下,如果未指定,则docker使用shm大小为64m,但可以使用--shm-size = 256m在docker中增加
我应该如何增加kuberenetes容器的shm大小或在kuberenetes中使用--shm-size of docker.
我试图在打字稿中使用生成器函数.但编译器会抛出错误
error TS2339: Property 'next' does not exist on type
下面是我最接近的代码示例.
export default class GeneratorClass {
constructor() {
this.generator(10);
this.generator.next();
}
*generator(count:number): Iterable<number | undefined> {
while(true)
yield count++;
}
}
Run Code Online (Sandbox Code Playgroud)
是什么KineticJS方法之间的区别layer.draw(),layer.drawScene()以及layer.drawHit()?
我正在尝试在我的vps中创建一个oracle xe数据库.
VPS OS:Cent OS.
当试图运行
/etc/init.d/oracle-xe configure
Run Code Online (Sandbox Code Playgroud)
它会引发错误数据库容错失败并检查日志但日志只显示ORA-01034:ORACLE不可用
以下是历史......
[root@vmcx-43 Disk1]# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
Preparing... ########################################### [100%]
/var/tmp/rpm-tmp.51363: line 186: bc: command not found
1:oracle-xe /var/tmp/rpm-tmp.51363: line 186: bc: command not fo und########################################### [100%]
Executing post-install steps...
/var/tmp/rpm-tmp.97984: line 76: bc: command not found
/var/tmp/rpm-tmp.97984: line 77: bc: command not found
/var/tmp/rpm-tmp.97984: line 78: [: -gt: unary operator expected
/var/tmp/rpm-tmp.97984: line 82: bc: command not found
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database. …Run Code Online (Sandbox Code Playgroud) 我正在尝试用spring创建一个websocket端点.但每当我尝试从客户端连接时,我得到404.我也有一个Java实现
@ServerEndpoint(value = "/websocket")
Run Code Online (Sandbox Code Playgroud)
这很好用.下面是我的spring实现的代码,它不起作用.我在这做错了什么?
package com.tlab.endpoint;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
@Configuration
@EnableWebSocket
public class WebSocketConfig implements WebSocketConfigurer {
@Override
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
registry.addHandler(socketHandler(),"/socket");;
}
@Bean
public WebSocketHandler socketHandler() {
return new SocketHandler();
}
}
Run Code Online (Sandbox Code Playgroud)
下面是处理程序
package com.tlab.endpoint;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;
public class SocketHandler extends TextWebSocketHandler {
@Override
public void handleTextMessage(WebSocketSession session, TextMessage message) {
}
}
Run Code Online (Sandbox Code Playgroud)
在客户端代码我尝试了所有diff可能的组合
在处理程序中使用/ socket
var websocket = new WebSocket("ws://localhost:8080/tsim/socket");
var websocket …Run Code Online (Sandbox Code Playgroud) 1)是否有任何摘要完成事件,我可以用它来更新我的画布.我有一个角度应用程序,它具有画布对象的不同属性的视图.每当我更改属性时,一旦摘要完成,如果我可以获得摘要完成事件,我可以更新画布(使用kineticJs)重绘具有最新属性的图表.

目前我正在从视图中调用方法

2)我只是在打开对象设置时使用视图并将其路由到新视图.在这种情况下,网址也随着网页/ #view而改变.它只是弹出窗口,我不需要页面末尾的#view,但仍然使用路由和视图概念.还有别的吗?
我试图通过websocket发送使用协议缓冲区编码的二进制消息.我能够使用Glassfish 4.0成功发送.但是相同的代码在tomcat 8中失败,下面有例外.
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:267)
at org.apache.tomcat.websocket.PerMessageDeflate.sendMessagePart(PerMessageDeflate.java:368)
at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessage(WsRemoteEndpointImplBase.java:297)
at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:270)
at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendBytes(WsRemoteEndpointImplBase.java:132)
at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendBinary(WsRemoteEndpointBasic.java:43)
at com.trsim.sim.endpoint.Whiteboard.broadcastSnapshot(Whiteboard.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:80)
at org.apache.tomcat.websocket.WsFrameBase.sendMessageBinary(WsFrameBase.java:586)
at org.apache.tomcat.websocket.WsFrameBase.processDataBinary(WsFrameBase.java:543)
at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:295)
at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:60)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:203)
at org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:194)
at org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:96)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:654)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:744)
Run Code Online (Sandbox Code Playgroud)
下面是我的java实现,用于处理二进制消息并将其发回
@OnMessage
public void broadcastSnapshot(ByteBuffer data, Session session) throws IOException {
//I am able to parse the incoming binary …Run Code Online (Sandbox Code Playgroud) 无法使用角度js ng-style指令设置渐变..能够通过使用下面设置正常颜色
<span ng-style="{'background-color': slidercolor}">works</span>
Run Code Online (Sandbox Code Playgroud)
但对于渐变它不起作用
下面是相同的jsfiddle.
<span ng-style="{'background-color':'-webkit-gradient(linear, left top, right top, color- stop(0%,'slidercolor'), color-stop(100%,rgba(125,185,232,0)))'}">didnt work</span>
Run Code Online (Sandbox Code Playgroud)
另外请告诉我哪些应该用引号括起来,哪些不应该...
javascript ×4
websocket ×3
angularjs ×2
glassfish ×2
java ×2
kineticjs ×2
css ×1
database ×1
docker ×1
ecmascript-6 ×1
generator ×1
glassfish-4 ×1
html ×1
html5 ×1
kubernetes ×1
oracle-xe ×1
oracle11g ×1
tomcat8 ×1
typescript ×1
vps ×1