Skip to content

Instantly share code, notes, and snippets.

Jumper Chen jumperchen

Block or report user

Report or block jumperchen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jumperchen / socket-cheatsheet.js
Created Dec 22, 2017 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for
View socket-cheatsheet.js
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
jumperchen /
Created May 3, 2017
onClosing : 1001 reason
import java.util.concurrent.TimeUnit;
import okio.ByteString;
public class TestOKHttp {
private static OkHttpClient client;
private static WebSocket ws;
private static boolean success = false;
jumperchen /
Created Apr 29, 2016 — forked from digulla/
Make ZK play nice with Fediz SSO
jumperchen / Dockerfile
Created Dec 15, 2015
ZKSandbox's Dockerfile
View Dockerfile
FROM java:8-jdk
MAINTAINER Jumper Chen <>
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
# Config to get to install git, maven, and tomcat7
RUN apt-get update && apt-get install -y --force-yes git maven tomcat7
VOLUME /zksandbox
# copy your zksandbox (depends on where the Dockerfile located) folder
jumperchen /
Last active Nov 18, 2015
ZK MVVM with Spring MVC Example
public class Book {
private Set<Category> categories = new LinkedHashSet<Category>();
private String author;
private String name;
public Book() {}
public void setCategories(Set<Category> categories) {
this.categories = categories;
public Set<Category> getCategories() {
jumperchen /
Last active Nov 18, 2015
ZK Spring MVC Example
public class Todo {
private String message;
private boolean done;
public Todo() {}
public Todo(String message) {
this.message = message;
jumperchen /
Created May 29, 2015
Javassist with JDK 8 serialization issue
package issue;
import java.lang.reflect.Method;
import javassist.util.proxy.MethodFilter;
jumperchen /
Created May 6, 2015
ZK 8-RC Performance Testing
package org.zkoss.test;
import java.util.Collections;
import java.util.List;
public class ForEachVM {
private List<Integer> array = Collections.nCopies(30, 30);
public void setArray(List<Integer> array) {}
public List<Integer> getArray() {
return array;
jumperchen / t.zul
Created Dec 4, 2012
Global Monitor
View t.zul
zk.afterMount(function () {
zk.Desktop._dt.firstChild.appendChild(new GlobalResizeMonitor());
GlobalResizeMonitor = zk.$extends(zk.Widget, {
bind_: function () {
this.$supers('bind_', arguments);
zWatch.listen({onSize: this});
unbind_: function () {
jumperchen / ExampleTest.scala
Created Oct 7, 2011
an example of ZTL Scala test case
View ExampleTest.scala
@Tags(tags = "Example")
class ExampleTest extends ZTL4ScalaTestCase {
def testClick() = {
val zscript = {
Click "hello world", if you see the message change, it is ok.
public void doCreate(Event evt) {" hello,\\n world");
You can’t perform that action at this time.