Skip to content
View VolatileTest.java
/**
* @author <a href="mailto:l.weinan@gmail.com">Weinan Li</a>
*/
public class Lock {
volatile boolean waiting = true;
public void test() {
new Thread(new Runnable() {
public void run() {
View Counter.java
package concurrent.course.intro01;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicLong;
/**
* @author <a href="mailto:l.weinan@gmail.com">Weinan Li</a>
View TimeoutLock.java
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
/**
* @author <a href="mailto:l.weinan@gmail.com">Weinan Li</a>
*/
public class TimeoutLock implements Lock {
View generated.js
power:resteasy-jsapi-testing weinanli$ mvn -q jetty:run
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Aug 18, 2015 12:43:48 AM org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap
WARNING: The use of javax.ws.rs.core.Application is deprecated, please use javax.ws.rs.Application as a context-param instead
Aug 18, 2015 12:43:48 AM org.jboss.resteasy.spi.ResteasyDeployment
INFO: Deploying javax.ws.rs.core.Application: class org.jboss.resteasy.jsapi.testing.TestApplication
Aug 18, 2015 12:43:48 AM org.jboss.resteasy.spi.ResteasyDeployment
INFO: Adding singleton resource org.jboss.resteasy.jsapi.testing.AddImpl from Application class org.jboss.resteasy.jsapi.testing.TestApplication
Aug 18, 2015 12:43:48 AM org.jboss.resteasy.spi.ResteasyDeployment
INFO: Adding singleton resource org.jboss.resteasy.jsapi.testing.MinusImpl from Application class org.jboss.resteasy.jsapi.testing.TestApplication
View BC.java
package bc;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import java.security.Provider;
import java.security.Security;
import java.util.Iterator;
/**
* @author <a href="mailto:l.weinan@gmail.com">Weinan Li</a>
View resteasy-smime-upgrade.patch
diff --git a/jaxrs/security/resteasy-crypto/pom.xml b/jaxrs/security/resteasy-crypto/pom.xml
index 2f36cc4..a78637e 100755
--- a/jaxrs/security/resteasy-crypto/pom.xml
+++ b/jaxrs/security/resteasy-crypto/pom.xml
@@ -52,15 +52,16 @@
View Rpn.java
import java.util.Scanner;
import java.util.Stack;
/**
* @author <a href="mailto:l.weinan@gmail.com">Weinan Li</a>
*/
public class Rpn {
static int TOK_NUM = -2;
static int TOK_OP = -3;
View m2b.rb
# convert markdown to bbcode
class Main
$code_buffer = []
$quote_buffer = []
$is_code_sec = false
$is_quote_sec = false
def flush_buffer(buf, flag, close_tag)
eval "$#{buf}.each { |line| puts line }"
puts close_tag
View u2b.rb
# convert ulysses markdown to bbcode
class Main
$code_buffer = []
$is_code_sec = false
def flush_code_buffer
$code_buffer.each do |line|
puts line
end
puts '[/code]'
View RESTEASY1081.java
package org.jboss.resteasy.test;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
Something went wrong with that request. Please try again.